-
Notifications
You must be signed in to change notification settings - Fork 258
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
uuu_bootloader_tag.bbclass: Add UUU_BOOTLOADER_UNTAGGED #1762
uuu_bootloader_tag.bbclass: Add UUU_BOOTLOADER_UNTAGGED #1762
Conversation
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 5a90636) Signed-off-by: Hiago De Franco <[email protected]>
@@ -4,6 +4,7 @@ | |||
do_deploy:append() { | |||
if [ "${UUU_BOOTLOADER}" != "" ]; then | |||
cp ${DEPLOYDIR}/${UUU_BOOTLOADER} ${DEPLOYDIR}/${UUU_BOOTLOADER_TAGGED} | |||
cp ${DEPLOYDIR}/${UUU_BOOTLOADER} ${DEPLOYDIR}/${UUU_BOOTLOADER_UNTAGGED} | |||
ln -sf ${UUU_BOOTLOADER_TAGGED} ${DEPLOYDIR}/${UUU_BOOTLOADER} | |||
stat -L -cUUUBURNXXOEUZX7+A-XY5601QQWWZ%sEND ${DEPLOYDIR}/${UUU_BOOTLOADER} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use UUU_BOOTLOADER_TAGGED
here to make the code more specific and saying.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @MrCry0, it's a valid point, however this was already merged into master and I'm just backporting it to kitkstone now. Let's keep it like this and we can fix it on master and backport the change, if required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hiagofranco please prepare a PR fixing this as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, PR opened: #1764
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the optional note, LGTM
The UUU-tagged bootloader causes problems when used outside of the wic context. See the fixes below. Restore the default bootloader image to the untagged version and use the tagged version only in the wic context. Fixes: Freescale#1762 Fixes: nxp-imx/mfgtools#416 Signed-off-by: Tom Hochstein <[email protected]>
The UUU tag on the default bootloader image causes problems when the bootloader is used outside of the Wic context. Rework the design so the default bootloader and the default imx-boot binaries are not tagged, and only the Wic image will use the tagged binaries. Fixes: Freescale#1762 Fixes: nxp-imx/mfgtools#416 Signed-off-by: Tom Hochstein <[email protected]>
The UUU tag on the default bootloader image causes problems when the bootloader is used outside of the Wic context. Rework the design so the default bootloader and the default imx-boot binaries are not tagged, and only the Wic image will use the tagged binaries. Fixes: Freescale#1762 Fixes: nxp-imx/mfgtools#416 Signed-off-by: Tom Hochstein <[email protected]>
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. Fixes: Freescale#1762 Fixes: nxp-imx/mfgtools#416 Signed-off-by: Tom Hochstein <[email protected]>
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: Freescale#1762 Fixes: nxp-imx/mfgtools#416 Signed-off-by: Tom Hochstein <[email protected]>
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: #1762 Fixes: nxp-imx/mfgtools#416 Co-authored-by: Otavio Salvador <[email protected]> Signed-off-by: Tom Hochstein <[email protected]>
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: #1762 Fixes: nxp-imx/mfgtools#416 Co-authored-by: Otavio Salvador <[email protected]> Signed-off-by: Tom Hochstein <[email protected]>
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: Freescale#1762 Fixes: nxp-imx/mfgtools#416 Co-authored-by: Otavio Salvador <[email protected]> Signed-off-by: Tom Hochstein <[email protected]>
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: Freescale#1762 Fixes: nxp-imx/mfgtools#416 Co-authored-by: Otavio Salvador <[email protected]> Signed-off-by: Tom Hochstein <[email protected]>
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: Freescale#1762 Fixes: nxp-imx/mfgtools#416 Co-authored-by: Otavio Salvador <[email protected]> Signed-off-by: Tom Hochstein <[email protected]>
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: #1762 Fixes: nxp-imx/mfgtools#416 Co-authored-by: Otavio Salvador <[email protected]> Signed-off-by: Tom Hochstein <[email protected]> (cherry picked from commit ef8b4c4)
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 5a90636)
Signed-off-by: Hiago De Franco [email protected]