Commit 60774248a5570899a66f9f88e597cc4f723d6278 solves issues when i or j have been set in other shell functions.
Since j is not unset after the inner loop, the image will only be copied for the first configuration. Unsetting i and j after the loops also prevents index issues in other functions. Signed-off-by: Florian Amstutz <[email protected]> --- meta/classes/uboot-sign.bbclass | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/meta/classes/uboot-sign.bbclass b/meta/classes/uboot-sign.bbclass index 6bb4ddc600..f3bbd8980e 100644 --- a/meta/classes/uboot-sign.bbclass +++ b/meta/classes/uboot-sign.bbclass @@ -137,8 +137,7 @@ concat_dtb_helper() { if [ -n "${UBOOT_CONFIG}" ] then - i=0 - j=0 + unset i j for config in ${UBOOT_MACHINE}; do i=$(expr $i + 1); for type in ${UBOOT_CONFIG}; do @@ -146,9 +145,12 @@ concat_dtb_helper() { if [ $j -eq $i ] then cp ${UBOOT_IMAGE} ${B}/${CONFIG_B_PATH}/u-boot-$type.${UBOOT_SUFFIX} + break fi done + unset j done + unset i fi else bbwarn "Failure while adding public key to u-boot binary. Verified boot won't be available." -- 2.34.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#202118): https://lists.openembedded.org/g/openembedded-core/message/202118 Mute This Topic: https://lists.openembedded.org/mt/107252638/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
