toradex / meta-toradex-security

MIT License
4 stars 9 forks source link

imx-boot-hab: Wrong U-Boot binaries copied in case of multiple U-Boot configs #36

Closed aflorian closed 4 months ago

aflorian commented 4 months ago

In do_compile of the imx-boot recipe the u-boot artifacts for the current configuration are copied to ${BOOT_STAGING} directory by calling compile_${SOC_FAMILY}: https://github.com/Freescale/meta-freescale/blob/fbea18dbdb750d567cbd8a4e73baed94ced02043/recipes-bsp/imx-mkimage/imx-boot_1.0.bb#L191

in imx-boot-hab.inc some targets are re-generated without copying the artifacts for the current U-Boot configuration which means that always the artifacts e.g. u-boot-nodtb.bin from the last configuration type from the list is used.

The issue can be fixed by calling again compile_${SOC_FAMILY} in sign_common().

0001-imx-boot-hab-Fix-using-wrong-U-Boot-artifacts-in-cas.patch

sergioprado commented 4 months ago

@aflorian thanks for reporting.

Think you can submit a pull request for review?