diff options
author | Tom Hochstein <tom.hochstein@nxp.com> | 2024-09-11 09:46:22 -0700 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2024-09-14 21:23:00 -0300 |
commit | c3de76272c3db540d1c4e45c3bc908673d81f07e (patch) | |
tree | 2feea6e9c70179773f6df60f714b932756e61240 /classes | |
parent | a154db932b97080cd36abd96c53a407a0624b342 (diff) | |
download | meta-freescale-uuu.tar.gz |
boot: Fix UUU tagging, extend to fslcuuu
Using the UUU-tagged bootloader image directly with UUU can cause UUU
to hang. The bootloader image is split on a certain transmit size, and
the hang occurs if the tag does not fit with the final bytes of the
bootloader image and must be split into a new transmit package.
The UUU tag is needed by UUU only in the SD Card image file itself so
that UUU can find the end of the boot partition.
Rework the design so the default bootloader and the default imx-boot
binaries are not tagged.
Also, extend the UUU tagging to fslc so it can gain the same benefit.
Fixes: https://github.com/Freescale/meta-freescale/pull/1762
Fixes: https://github.com/nxp-imx/mfgtools/issues/416
Co-authored-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/imx-boot-container.bbclass | 2 | ||||
-rw-r--r-- | classes/uuu_bootloader_tag.bbclass | 24 |
2 files changed, 17 insertions, 9 deletions
diff --git a/classes/imx-boot-container.bbclass b/classes/imx-boot-container.bbclass index 8ba32cac..b0d3dc1f 100644 --- a/classes/imx-boot-container.bbclass +++ b/classes/imx-boot-container.bbclass | |||
@@ -96,7 +96,7 @@ do_deploy:append() { | |||
96 | if [ ! -f "${DEPLOYDIR}/imx-boot" ]; then | 96 | if [ ! -f "${DEPLOYDIR}/imx-boot" ]; then |
97 | ln -sf flash.bin-${MACHINE}-${type} flash.bin | 97 | ln -sf flash.bin-${MACHINE}-${type} flash.bin |
98 | ln -sf flash.bin-${MACHINE}-${type} imx-boot | 98 | ln -sf flash.bin-${MACHINE}-${type} imx-boot |
99 | 99 | ln -sf flash.bin.tagged imx-boot.tagged | |
100 | else | 100 | else |
101 | bbwarn "Use custom wks.in for $UBOOT_CONFIG = $type" | 101 | bbwarn "Use custom wks.in for $UBOOT_CONFIG = $type" |
102 | fi | 102 | fi |
diff --git a/classes/uuu_bootloader_tag.bbclass b/classes/uuu_bootloader_tag.bbclass index 87745660..b41d22a9 100644 --- a/classes/uuu_bootloader_tag.bbclass +++ b/classes/uuu_bootloader_tag.bbclass | |||
@@ -1,12 +1,20 @@ | |||
1 | # Append a tag to the bootloader image used in the SD card image. The tag | 1 | # Create a tagged boot partition file for the SD card image file. The tag |
2 | # contains the size of the bootloader image so UUU can easily find the end of | 2 | # contains the size of the boot partition image so UUU can easily find |
3 | # the bootloader in the SD card image. | 3 | # the end of it in the SD card image file. |
4 | # | ||
5 | # IMPORTANT: The tagged boot partition file should never be used directly with | ||
6 | # UUU, as it can cause UUU to hang. | ||
7 | |||
8 | UUU_BOOTLOADER = "${UBOOT_BINARY}" | ||
9 | UUU_BOOTLOADER:mx8-generic-bsp = "${@d.getVar('UBOOT_PROVIDES_BOOT_CONTAINER') == '0' and 'imx-boot' or 'flash.bin'}" | ||
10 | UUU_BOOTLOADER:mx9-generic-bsp = "${@d.getVar('UBOOT_PROVIDES_BOOT_CONTAINER') == '0' and 'imx-boot' or 'flash.bin'}" | ||
11 | |||
4 | do_deploy:append() { | 12 | do_deploy:append() { |
5 | if [ "${UUU_BOOTLOADER}" != "" ]; then | 13 | if [ "${UUU_BOOTLOADER}" != "" ]; then |
6 | cp ${DEPLOYDIR}/${UUU_BOOTLOADER} ${DEPLOYDIR}/${UUU_BOOTLOADER_TAGGED} | 14 | cp ${DEPLOYDIR}/${UUU_BOOTLOADER} \ |
7 | cp ${DEPLOYDIR}/${UUU_BOOTLOADER} ${DEPLOYDIR}/${UUU_BOOTLOADER_UNTAGGED} | 15 | ${DEPLOYDIR}/${UUU_BOOTLOADER}.tagged |
8 | ln -sf ${UUU_BOOTLOADER_TAGGED} ${DEPLOYDIR}/${UUU_BOOTLOADER} | 16 | stat -L -cUUUBURNXXOEUZX7+A-XY5601QQWWZ%sEND \ |
9 | stat -L -cUUUBURNXXOEUZX7+A-XY5601QQWWZ%sEND ${DEPLOYDIR}/${UUU_BOOTLOADER_TAGGED} \ | 17 | ${DEPLOYDIR}/${UUU_BOOTLOADER}.tagged \ |
10 | >> ${DEPLOYDIR}/${UUU_BOOTLOADER_TAGGED} | 18 | >> ${DEPLOYDIR}/${UUU_BOOTLOADER}.tagged |
11 | fi | 19 | fi |
12 | } | 20 | } |