Skip to content

Commit

Permalink
also build bl2 image for debugging issue
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dangowrt committed Mar 1, 2024
1 parent c7f8bc7 commit 9439e55
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/blank.yml
Expand Up @@ -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
8 changes: 8 additions & 0 deletions build_installer.sh
Expand Up @@ -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"
Expand Down Expand Up @@ -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}"
Expand Down

0 comments on commit 9439e55

Please sign in to comment.