From 9439e55b0e1cfdc49d5f98b1d06bb8b78d4c2293 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Fri, 1 Mar 2024 18:52:11 +0000 Subject: [PATCH] also build bl2 image for debugging issue ERROR: BL2: Failed to load image id 5 (-2) If you encounter this issue, please use mtk_uartboot to load this special bl2 image which will give lots of debugging output and hopefully tell us what's happening. --- .github/workflows/blank.yml | 2 +- build_installer.sh | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/blank.yml b/.github/workflows/blank.yml index bf07b8b..888bd8b 100644 --- a/.github/workflows/blank.yml +++ b/.github/workflows/blank.yml @@ -58,4 +58,4 @@ jobs: # https://cli.github.com/manual/gh_release_upload - name: Upload assets - run: gh release upload ${{ inputs.tag || github.ref_name }} images/*.itb --clobber + run: gh release upload ${{ inputs.tag || github.ref_name }} images/*.*i* --clobber diff --git a/build_installer.sh b/build_installer.sh index 4037bb0..cf6c8cf 100755 --- a/build_installer.sh +++ b/build_installer.sh @@ -261,6 +261,13 @@ build_bl2_for_uartboot() cp "${WORKDIR}/arm-trusted-firmware/build/mt7622/release/bl2.bin" "${DESTDIR}/bl2-for-mtk_uartboot.bin" } +build_bl2_for_snfi_debug() +{ + git clone https://github.com/mtk-openwrt/arm-trusted-firmware.git "${WORKDIR}/arm-trusted-firmware-debug" + make -C "${WORKDIR}/arm-trusted-firmware-debug" CROSS_COMPILE=aarch64-linux-gnu- PLAT=$TFA_PLAT UBI=1 OVERRIDE_UBI_START_ADDR=0x80000 LOG_LEVEL=50 BOOT_DEVICE=snand $TFA_MAKEARGS bl2 + cp "${WORKDIR}/arm-trusted-firmware-debug/build/mt7622/release/bl2.bin" "${DESTDIR}/bl2-for-debug-snand-issue.bin" +} + linksys_e8450_installer() { TFA_PLAT=mt7622 # OPENWRT_RELEASE="23.05.0" @@ -310,6 +317,7 @@ linksys_e8450_installer() { fi build_bl2_for_uartboot + build_bl2_for_snfi_debug mv "${WORKDIR}/${FILEBASE}-installer"* "${DESTDIR}" rm -rf "${WORKDIR}"