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 f1037ff
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build_installer.sh
Original file line number Diff line number Diff line change
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 USE_UBI=1 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 f1037ff

Please sign in to comment.