Created attachment 5033 [details] adjustment of do_uboot_assemble_fitimage task to multiple UBOOT_CONFIG definitions Possible issue in UBOOT_CONFIG interation in code located in uboot-sign.bbclass, task do_uboot_assemble_fitimage(): unset i j k <------- possible issue for config in ${UBOOT_MACHINE}; do i=$(expr $i + 1); bberror "i = $i, config = ${config}" for type in ${UBOOT_CONFIG}; do j=$(expr $j + 1); bberror "j = $j, type = ${type}" if [ $j -eq $i ]; then break; fi done for binary in ${UBOOT_BINARIES}; do k=$(expr $j + 1); <------- possible issue bberror "k = $k, binary = ${binary}" if [ $k -eq $i ]; then break; fi done cd ${B}/${config} bberror "uboot_assemble_fitimage ${type} ${binary}" uboot_assemble_fitimage_helper ${type} ${binary} done For following definitions: UBOOT_CONFIG[conf_1] = "conf_1_defconfig,,u-boot.bin_1" UBOOT_CONFIG[conf_2] = "conf_2_defconfig,,u-boot.bin_2" I get following log prints: i = 1, config = conf_1_defconfig j = 1, type = conf_1 k = 2, binary = u-boot.bin_1 k = 2, binary = u-boot.bin_2 uboot_assemble_fitimage conf_1 u-boot.bin_2 i = 2, config = conf_2_defconfig j = 2, type = conf_1 k = 3, binary = u-boot.bin_1 k = 3, binary = u-boot.bin_2 uboot_assemble_fitimage conf_1 u-boot.bin_2 The correct binary file never gets hit ($k never equals $i) and the one from last iteration is passed do uboot_assemble_fitimage() function. What's more, the $j is not reset after upper loop iteration, and while iterating over UBOOT_CONFIG the second time the condition $j -eq $i is true for the first entry (conf_1 in my example, whereas it should be conf_2). With change in attacked diff file it is working for me correctly.
Please send the patch to the list with a good commit log. Patch reviewed quickly in a meeting... Thanks, ../Randy
Created attachment 5036 [details] Patch with fix proposal Patch proposal with detailed description.
Created attachment 5037 [details] Fix iteration over UBOOT_BINARIES in uboot-sign.bbclass
Likley fixed. Randy to find the commit.
Seems to be fixed by: https://git.yoctoproject.org/poky/commit/?id=ed7cd56a8ac50ce77bc33cd10354862ce5260f8f