From c402339da3cb0d95df0a6f874c5fe7ef48b22323 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20=C5=A0urda?= Date: Mon, 2 Jan 2023 14:09:42 +0800 Subject: [PATCH] Move downloading to Dockerfile --- .buildbot/openwrt/Dockerfile | 19 +++++++++++++++++++ .buildbot/openwrt/build.sh | 13 +------------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/.buildbot/openwrt/Dockerfile b/.buildbot/openwrt/Dockerfile index 0a86171..1204acd 100644 --- a/.buildbot/openwrt/Dockerfile +++ b/.buildbot/openwrt/Dockerfile @@ -1,5 +1,7 @@ FROM ubuntu:focal +ENV OPENWRT_VERSION=22.03.2 + RUN apt -y update RUN DEBIAN_FRONTEND=noninteractive TZ=UTC \ @@ -7,3 +9,20 @@ RUN DEBIAN_FRONTEND=noninteractive TZ=UTC \ build-essential rsync git-core subversion mercurial libssl-dev \ libncurses5-dev unzip gawk zlib1g-dev libncursesw5-dev zlib1g-dev \ gettext xsltproc wget unzip python + +RUN mkdir /Downloads + +WORKDIR /Downloads + +RUN wget -q \ + 'https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/\ +targets/bcm27xx/bcm2711/\ +openwrt-imagebuilder-${OPENWRT_VERSION}-bcm27xx-bcm2711.Linux-x86_64.tar.xz' +RUN wget -q \ + 'https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/\ +targets/bcm27xx/bcm2711/\ +openwrt-sdk-${OPENWRT_VERSION}-bcm27xx-bcm2711_gcc-11.2.0_musl.Linux-x86_64.tar.xz' +RUN wget -q \ + 'https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/\ +targets/bcm27xx/bcm2711/\ +openwrt-toolchain-${OPENWRT_VERSION}-bcm27xx-bcm2711_gcc-11.2.0_musl.Linux-x86_64.tar.xz' diff --git a/.buildbot/openwrt/build.sh b/.buildbot/openwrt/build.sh index 3cd5770..fe8402e 100755 --- a/.buildbot/openwrt/build.sh +++ b/.buildbot/openwrt/build.sh @@ -2,18 +2,7 @@ # use imagebuilder -OPENWRT_VERSION=22.03.2 - -# for i in openwrt-imagebuilder-${OPENWRT_VERSION}-bcm27xx-bcm2711.Linux-x86_64.tar.xz \ -# openwrt-sdk-${OPENWRT_VERSION}-bcm27xx-bcm2711_gcc-11.2.0_musl.Linux-x86_64.tar.xz \ -# openwrt-toolchain-${OPENWRT_VERSION}-bcm27xx-bcm2711_gcc-11.2.0_musl.Linux-x86_64.tar.xz -for i in openwrt-imagebuilder-${OPENWRT_VERSION}-bcm27xx-bcm2711.Linux-x86_64.tar.xz - do - wget -q \ - https://downloads.openwrt.org/releases/${OPENWRT_VERSION}/targets/bcm27xx/bcm2711/$i || exit 1 -done - -tar -xJf openwrt-imagebuilder-${OPENWRT_VERSION}-*.tar.xz +tar -xJf /Downloads/openwrt-imagebuilder-${OPENWRT_VERSION}-*.tar.xz cd openwrt-imagebuilder-*/ make info