summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHiago De Franco <hiago.franco@toradex.com>2024-03-08 15:57:31 -0300
committerHiago De Franco <hiago.franco@toradex.com>2024-03-08 18:39:22 -0300
commit4375edbb9da1eb18a46b30a29d2574f06b331a88 (patch)
tree2167b897168f58a3898935e69a2d0ea1fef782a8
parent4999c52f67a82361182973ca99b1b20223b071a7 (diff)
downloadmeta-freescale-4375edbb9da1eb18a46b30a29d2574f06b331a88.tar.gz
uuu_bootloader_tag.bbclass: Add UUU_BOOTLOADER_UNTAGGED
Add UUU_BOOTLOADER_UNTAGGED flag to add the possibility to deploy a imx-boot binary without the tagged footer 'UUUBURNXXOEUZX7+A-XY5601QQWWZ%sEN' at the end. The addition of the footer 'UUUBURNXXOEUZX7+A-XY5601QQWWZ%sEN' at the end causes issues when the binary is loaded into RAM memory, this footer may cause issues where the binary size exceeds the typical USB package size used by UUU (1021 bytes). As example, if the footer is split across two distinct USB packages, such as sending 'UUUBURNXXXOE' in the last packet and 'UZX7+A-XY5601QQWWZ%sEND' in the next one, it can lead to UUU halting while waiting for a response in SDPS mode. After sending 'UUUBURNXXXOE', iMX8MP's boot room starts SPL, not waiting for the next packet ('UZX7+A-XY5601QQWWZ%sEND'), leading to UUU breaking. Therefore, deploy both binaries separately (-tagged and -untagged) to allow users to choose the appropriate binary. (cherry picked from commit 5a906365fd29) Signed-off-by: Hiago De Franco <hiago.franco@toradex.com>
-rw-r--r--classes/uuu_bootloader_tag.bbclass1
-rw-r--r--recipes-bsp/imx-mkimage/imx-boot_1.0.bb1
2 files changed, 2 insertions, 0 deletions
diff --git a/classes/uuu_bootloader_tag.bbclass b/classes/uuu_bootloader_tag.bbclass
index fb6acd72..52ab360a 100644
--- a/classes/uuu_bootloader_tag.bbclass
+++ b/classes/uuu_bootloader_tag.bbclass
@@ -4,6 +4,7 @@
4do_deploy:append() { 4do_deploy:append() {
5 if [ "${UUU_BOOTLOADER}" != "" ]; then 5 if [ "${UUU_BOOTLOADER}" != "" ]; then
6 cp ${DEPLOYDIR}/${UUU_BOOTLOADER} ${DEPLOYDIR}/${UUU_BOOTLOADER_TAGGED} 6 cp ${DEPLOYDIR}/${UUU_BOOTLOADER} ${DEPLOYDIR}/${UUU_BOOTLOADER_TAGGED}
7 cp ${DEPLOYDIR}/${UUU_BOOTLOADER} ${DEPLOYDIR}/${UUU_BOOTLOADER_UNTAGGED}
7 ln -sf ${UUU_BOOTLOADER_TAGGED} ${DEPLOYDIR}/${UUU_BOOTLOADER} 8 ln -sf ${UUU_BOOTLOADER_TAGGED} ${DEPLOYDIR}/${UUU_BOOTLOADER}
8 stat -L -cUUUBURNXXOEUZX7+A-XY5601QQWWZ%sEND ${DEPLOYDIR}/${UUU_BOOTLOADER} \ 9 stat -L -cUUUBURNXXOEUZX7+A-XY5601QQWWZ%sEND ${DEPLOYDIR}/${UUU_BOOTLOADER} \
9 >> ${DEPLOYDIR}/${UUU_BOOTLOADER} 10 >> ${DEPLOYDIR}/${UUU_BOOTLOADER}
diff --git a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
index 37f58e64..677e57c2 100644
--- a/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
+++ b/recipes-bsp/imx-mkimage/imx-boot_1.0.bb
@@ -25,6 +25,7 @@ inherit deploy uuu_bootloader_tag
25 25
26UUU_BOOTLOADER = "${BOOT_NAME}" 26UUU_BOOTLOADER = "${BOOT_NAME}"
27UUU_BOOTLOADER_TAGGED = "${BOOT_NAME}-tagged" 27UUU_BOOTLOADER_TAGGED = "${BOOT_NAME}-tagged"
28UUU_BOOTLOADER_UNTAGGED = "${BOOT_NAME}-untagged"
28 29
29# Add CFLAGS with native INCDIR & LIBDIR for imx-mkimage build 30# Add CFLAGS with native INCDIR & LIBDIR for imx-mkimage build
30CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR_NATIVE} -L ${STAGING_LIBDIR_NATIVE}" 31CFLAGS = "-O2 -Wall -std=c99 -I ${STAGING_INCDIR_NATIVE} -L ${STAGING_LIBDIR_NATIVE}"