-
Notifications
You must be signed in to change notification settings - Fork 16
Description
compile_mx93 & do_compile define the same global (i.e., persistent through the do_compile task) variables:
UBOOT_CONFIG_EXTRABOOT_CONFIG_MACHINE_EXTRA
These functions unset this global variables at the end of their respective block, essentially emptying the value of the variable.
The problem is that do_compile calls the other one and still attempts to read BOOT_CONFIG_MACHINE_EXTRA afterwards
compile_${SOC_FAMILY} # transformed to a call to compile_mx93 or compile_mx8ulp
# [...]
if [ -e "${BOOT_STAGING}/flash.bin" ]; then
cp ${BOOT_STAGING}/flash.bin ${S}/${BOOT_CONFIG_MACHINE_EXTRA}-${target}
fi(see https://github.com/Avnet/meta-maaxboard/blob/scarthgap/recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend)
This code will create a "-${target}" file that won't be found during the do_deploy task and the image won't build.
Since these function set the variables to the same values, the easiest fix is to make all that initialization into do_compile and never change or unset those global variables in any other "sub-function".
If you wish to temporarily shadow a variable, then use function-local variables (just prefix the name by local).
Though, bash is a bit special compared to other languages since a "function-local" variable are accessible to any function called.