U-boot-toradex broken on LinuxImage3.0 branch (imx6ull) when building core-image-minimal

After creating a new build following procedure mentioned here: OpenEmbedded (core) - Toradex System/Computer on Modules the build fails with the following error:

> ERROR:
> u-boot-toradex-1_2019.07+gitAUTOINC+26d926eda0-r0
> do_compile: oe_runmake failed ... ...
> 
> | make[1]: Entering directory
> '/octp/builds/imx_poky_exp/oe-core/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/u-boot-toradex/1_2019.07+gitAUTOINC+26d926eda0-r0/build' | make[1]: *** No rule to make target
> 'u-boot-nand.imx'.  Stop. | make[1]:
> Leaving directory
> '/octp/builds/imx_poky_exp/oe-core/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/u-boot-toradex/1_2019.07+gitAUTOINC+26d926eda0-r0/build' | ERROR: oe_runmake failed |
> Makefile:148: recipe for target
> 'sub-make' failed | make: ***
> [sub-make] Error 2 | make: Leaving
> directory
> '/octp/builds/imx_poky_exp/oe-core/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/u-boot-toradex/1_2019.07+gitAUTOINC+26d926eda0-r0/git

Fails either when building core-image-minimal or console-image-tdx
In my build only options applied to conf/local.conf are:

MACHINE = "colibri-imx6ull"
ACCEPT_FSL_EULA = "1"

No custom layers, no modifications, just raw vanilla build.

Hi

With the update of U-Boot to 2019.07 the make target u-boot-nand.imx no longer exists.
This is accounted for in a correct installation of openembedded.

Did you update your OE build tree from an older installation? Can you merge your conf/local.conf and conf/bblayers.conf files with the initial ones in …/layers/meta-toradex-distro/buildconf and try again?
Easiest is probably to copy the two files and re-add the two lines you added to local.conf.

If that doesn’t help:
Can you attach the u-boot.txt and layers.txt file created by:

bitbake -e virtual/bootloader > u-boot.txt
cd buildhistory; git show > ../layers.txt; cd  ..

Max

Requested file attached: https://share.toradex.com/d2l5mupjswxrt4h?direct

As I mentioned on the original question, this is a vanilla installation using:
repo init -u http://git.toradex.com/toradex-bsp-platform.git -b LinuxImage3.0 -m default.xml

Only modification from my side is the definition of the variables MACHINE and ACCEPT_FSL_EULA, the build crashes the same way in different environments (even using a container with CROPS).

Hi

Can you move your changes to the local.conf file to the top of the file and not to end?

Max

Moving MACHINE declaration to the commented MACHINE declarations area just fixes the issue. Thanks!

Anyway, just to avoid future mistakes, any explanation on why this happens? afaik declaring the variable on the bottom of the file is perfectly “legal” and should override any other previous declarations. In fact same declarations worked flawlessly in previous versions.

The last line of local conf includes a file with the name of the machine. Obviously there ${MACHINE} is evaluated immediately. So you include the wrong file, e.g. you miss some important settings from meta-toradex-nxp/conf/machine/include/colibri-imx6ull.inc.