mirror of https://github.com/OpenIPC/firmware.git
Makefile: update buildroot download usage
parent
3e0336170b
commit
01aedb8529
|
@ -14,7 +14,7 @@ env:
|
||||||
TAG_NAME: latest
|
TAG_NAME: latest
|
||||||
TG_TOKEN: ${{secrets.TELEGRAM_TOKEN_BOT_OPENIPC}}
|
TG_TOKEN: ${{secrets.TELEGRAM_TOKEN_BOT_OPENIPC}}
|
||||||
TG_CHANNEL: ${{secrets.TELEGRAM_CHANNEL_OPENIPC_DEV}}
|
TG_CHANNEL: ${{secrets.TELEGRAM_CHANNEL_OPENIPC_DEV}}
|
||||||
TG_OPTIONS: -s --connect-timeout 30 --retry 10 --http1.1 -o /dev/null -w %{http_code}
|
TG_OPTIONS: --connect-timeout 30 --retry 10 --http1.1 -o /dev/null -w %{http_code}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildroot:
|
buildroot:
|
||||||
|
@ -207,7 +207,6 @@ jobs:
|
||||||
- name: Build firmware
|
- name: Build firmware
|
||||||
run: |
|
run: |
|
||||||
echo "8.8.8.8 invisible-mirror.net" | sudo tee -a /etc/hosts
|
echo "8.8.8.8 invisible-mirror.net" | sudo tee -a /etc/hosts
|
||||||
CONFIG=$(find br-ext-chip-* -name ${{matrix.platform}}_${{matrix.release}}_defconfig)
|
|
||||||
|
|
||||||
export GIT_HASH=$(git rev-parse --short ${GITHUB_SHA})
|
export GIT_HASH=$(git rev-parse --short ${GITHUB_SHA})
|
||||||
export GIT_BRANCH=${GITHUB_REF_NAME}
|
export GIT_BRANCH=${GITHUB_REF_NAME}
|
||||||
|
@ -216,14 +215,7 @@ jobs:
|
||||||
|
|
||||||
mkdir -p /tmp/ccache
|
mkdir -p /tmp/ccache
|
||||||
ln -s /tmp/ccache ${HOME}/.ccache
|
ln -s /tmp/ccache ${HOME}/.ccache
|
||||||
|
make BOARD=${{matrix.platform}}_${{matrix.release}} all
|
||||||
echo ------------------------------------------------------------
|
|
||||||
echo ${CONFIG}
|
|
||||||
echo ------------------------------------------------------------
|
|
||||||
cat ${CONFIG}
|
|
||||||
echo ------------------------------------------------------------
|
|
||||||
make BOARD=${CONFIG} all
|
|
||||||
echo ------------------------------------------------------------
|
|
||||||
|
|
||||||
TIME=$(date -d @${SECONDS} +%M:%S)
|
TIME=$(date -d @${SECONDS} +%M:%S)
|
||||||
echo TIME=${TIME} >> ${GITHUB_ENV}
|
echo TIME=${TIME} >> ${GITHUB_ENV}
|
||||||
|
|
29
Makefile
29
Makefile
|
@ -1,5 +1,5 @@
|
||||||
BR_VER = 2023.02.1
|
BR_VER = 2023.02.1
|
||||||
BR_MAKE = $(MAKE) -C buildroot-$(BR_VER) BR2_EXTERNAL=$(PWD)/general O=$(TARGET)
|
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/refs/tags
|
||||||
BR_FILE = /tmp/buildroot-$(BR_VER).tar.gz
|
BR_FILE = /tmp/buildroot-$(BR_VER).tar.gz
|
||||||
TARGET ?= $(PWD)/output
|
TARGET ?= $(PWD)/output
|
||||||
|
@ -44,17 +44,18 @@ defconfig: prepare
|
||||||
@$(BR_MAKE) BR2_DEFCONFIG=$(PWD)/$(CONFIG) defconfig
|
@$(BR_MAKE) BR2_DEFCONFIG=$(PWD)/$(CONFIG) defconfig
|
||||||
|
|
||||||
prepare:
|
prepare:
|
||||||
@test -e $(BR_FILE) || wget -c -q $(BR_LINK)/$(BR_VER).tar.gz -O $(BR_FILE)
|
@if test ! -e $(TARGET)/buildroot-$(BR_VER); then \
|
||||||
@test -e buildroot-$(BR_VER) || tar -xf $(BR_FILE) -C $(PWD)
|
wget -c -q $(BR_LINK)/$(BR_VER).tar.gz -O $(BR_FILE); \
|
||||||
|
mkdir -p $(TARGET); tar -xf $(BR_FILE) -C $(TARGET); fi
|
||||||
|
|
||||||
toolname:
|
toolname:
|
||||||
@general/scripts/show_toolchains.sh $(CONFIG)
|
@general/scripts/show_toolchains.sh $(CONFIG)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rf $(TARGET)/target $(TARGET)/.config
|
@rm -rf $(TARGET)/images $(TARGET)/target
|
||||||
|
|
||||||
distclean:
|
distclean:
|
||||||
@rm -rf buildroot-$(BR_VER) $(BR_FILE) $(TARGET)
|
@rm -rf $(BR_FILE) $(TARGET)
|
||||||
|
|
||||||
list:
|
list:
|
||||||
@ls -1 br-ext-chip-*/configs
|
@ls -1 br-ext-chip-*/configs
|
||||||
|
@ -64,10 +65,10 @@ deps:
|
||||||
curl file fzf git libncurses-dev libtool lzop make rsync unzip wget
|
curl file fzf git libncurses-dev libtool lzop make rsync unzip wget
|
||||||
|
|
||||||
select:
|
select:
|
||||||
$(eval MENULIST = $(shell find ./br-ext-*/configs/*_defconfig | sort | \
|
$(eval MENU_LIST = $(shell find ./br-ext-*/configs/*_defconfig | sort | \
|
||||||
sed -E "s|br-ext-chip-(.+).configs.(.+)_defconfig|'\2' '\1 \2'|"))
|
sed -E "s|br-ext-chip-(.+).configs.(.+)_defconfig|'\2' '\1 \2'|"))
|
||||||
@$(MAKE) BOARD=$(shell whiptail --title "Available boards" --menu "Please select a board:" \
|
@$(MAKE) BOARD=$(shell whiptail --title "Available boards" --menu "Please select a board:" \
|
||||||
20 76 12 --notags $(MENULIST) 3>&1 1>&2 2>&3) all
|
20 76 12 --notags $(MENU_LIST) 3>&1 1>&2 2>&3) all
|
||||||
|
|
||||||
repack:
|
repack:
|
||||||
ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS),y)
|
ifeq ($(BR2_TARGET_ROOTFS_SQUASHFS),y)
|
||||||
|
@ -97,11 +98,11 @@ endef
|
||||||
|
|
||||||
define REPACK_FIRMWARE
|
define REPACK_FIRMWARE
|
||||||
mkdir -p $(TARGET)/images/$(3)
|
mkdir -p $(TARGET)/images/$(3)
|
||||||
cd $(TARGET)/images && cp -f $(1) $(3)/$(1).$(BR2_OPENIPC_SOC_MODEL)
|
cd $(TARGET)/images/$(3) && cp -f ../$(1) $(1).$(BR2_OPENIPC_SOC_MODEL)
|
||||||
cd $(TARGET)/images && cp -f $(2) $(3)/$(2).$(BR2_OPENIPC_SOC_MODEL)
|
cd $(TARGET)/images/$(3) && cp -f ../$(2) $(2).$(BR2_OPENIPC_SOC_MODEL)
|
||||||
cd $(TARGET)/images && md5sum $(1) > $(3)/$(1).$(BR2_OPENIPC_SOC_MODEL).md5sum
|
cd $(TARGET)/images/$(3) && md5sum $(1).$(BR2_OPENIPC_SOC_MODEL) > $(1).$(BR2_OPENIPC_SOC_MODEL).md5sum
|
||||||
cd $(TARGET)/images && md5sum $(2) > $(3)/$(2).$(BR2_OPENIPC_SOC_MODEL).md5sum
|
cd $(TARGET)/images/$(3) && md5sum $(2).$(BR2_OPENIPC_SOC_MODEL) > $(2).$(BR2_OPENIPC_SOC_MODEL).md5sum
|
||||||
cd $(TARGET)/images && tar -czf $(TARGET)/openipc.$(BR2_OPENIPC_SOC_MODEL)-$(3)-$(BR2_OPENIPC_FLAVOR).tgz \
|
cd $(TARGET)/images/$(3) && tar -czf $(TARGET)/openipc.$(BR2_OPENIPC_SOC_MODEL)-$(3)-$(BR2_OPENIPC_FLAVOR).tgz \
|
||||||
$(3)/$(1).$(BR2_OPENIPC_SOC_MODEL) $(3)/$(1).$(BR2_OPENIPC_SOC_MODEL).md5sum \
|
$(1).$(BR2_OPENIPC_SOC_MODEL) $(1).$(BR2_OPENIPC_SOC_MODEL).md5sum \
|
||||||
$(3)/$(2).$(BR2_OPENIPC_SOC_MODEL) $(3)/$(2).$(BR2_OPENIPC_SOC_MODEL).md5sum
|
$(2).$(BR2_OPENIPC_SOC_MODEL) $(2).$(BR2_OPENIPC_SOC_MODEL).md5sum
|
||||||
endef
|
endef
|
||||||
|
|
Loading…
Reference in New Issue