diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 18e9682f..0a9e322d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -208,6 +208,9 @@ jobs: run: | echo "8.8.8.8 invisible-mirror.net" | sudo tee -a /etc/hosts echo "8.8.8.8 distfiles.dereferenced.org" | sudo tee -a /etc/hosts + make prepare + git clone https://github.com/openipc/br-cache + ln -s ${GITHUB_WORKSPACE}/br-cache $(ls -d output/buildroot-*)/dl make BOARD=${{matrix.platform}}_${{matrix.release}} br-source echo - Download time: $(date -d @${SECONDS} +%M:%S) diff --git a/Makefile b/Makefile index 46fe8b14..dbc73bda 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ BR_VER = 2023.02.2 BR_MAKE = $(MAKE) -C $(TARGET)/buildroot-$(BR_VER) BR2_EXTERNAL=$(PWD)/general O=$(TARGET) -BR_LINK = https://github.com/buildroot/buildroot/archive/refs/tags +BR_LINK = https://github.com/buildroot/buildroot/archive BR_FILE = /tmp/buildroot-$(BR_VER).tar.gz TARGET ?= $(PWD)/output @@ -44,12 +44,14 @@ build: defconfig br-%: defconfig @$(BR_MAKE) $(subst br-,,$@) -defconfig: +defconfig: prepare @echo --- $(or $(CONFIG),$(error variable BOARD is not found)) + @$(BR_MAKE) BR2_DEFCONFIG=$(PWD)/$(CONFIG) defconfig + +prepare: @if test ! -e $(TARGET)/buildroot-$(BR_VER); then \ wget -c -q $(BR_LINK)/$(BR_VER).tar.gz -O $(BR_FILE); \ mkdir -p $(TARGET); tar -xf $(BR_FILE) -C $(TARGET); fi - @$(BR_MAKE) BR2_DEFCONFIG=$(PWD)/$(CONFIG) defconfig toolname: @general/scripts/show_toolchains.sh $(CONFIG)