Colibri iMX6ULL - Yocto build fails at recipe u-boot-toradex

I am getting an error when building recipe u-boot-toradex:

-boot-toradex-1_2022.07-r0 do_install: ExecutionError('/home/v/oe-core/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/u-boot-toradex/1_2022.07-r0/temp/run.do_install.1578589', 1, None, None)

This is a brand-new repo setup as per the instructions provided.
I am using a Colibri iMX6ULL with 512 NAND and RAM.
OS: Ubuntu 22.04 LTS
Any clues?
Thanks,
Antonio Fernandez

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

The error you’re encountering during the u-boot-toradex recipe build process could be due to a variety of reasons, including missing dependencies, configuration issues, or compatibility problems with the build environment. Given the information provided, here are a few steps you can take to troubleshoot and potentially resolve the issue:

  1. Dependencies: Ensure all dependencies required for building U-Boot for the Colibri iMX6ULL are installed. This includes the arm cross-compiler and other tools specified in the Yocto Project documentation for your board.

  2. Configuration: Verify that your local.conf and bblayers.conf files are correctly set up for building for the Colibri iMX6ULL. This includes setting the correct MACHINE variable in local.conf.

  3. Clean Build: Try cleaning the u-boot-toradex recipe and rebuilding it. Sometimes, previous build artifacts can cause issues. You can clean the recipe using the following command:

    bitbake -c cleansstate u-boot-toradex
    

    And then attempt to rebuild it.

  4. Check for Patches: Sometimes, specific patches are required for U-Boot to build and work correctly on certain hardware. Check the Toradex community forums and the meta-toradex-nxp layer for any patches or updates that might be relevant to your hardware version.

  5. Build Environment: Although you are using Ubuntu 22.04 LTS, which is generally compatible with the Yocto Project, ensure that your build environment matches the requirements specified by Toradex for building images for the Colibri iMX6ULL. This includes the correct version of the Yocto Project and any specific host packages that need to be installed.

  6. Detailed Log Analysis: The error message provided is quite generic. Look into the log file mentioned in the error message (/home/v/oe-core/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/u-boot-toradex/1_2022.07-r0/temp/log.do_install.1578589) for more specific error messages that could indicate what went wrong during the build process.

  7. U-Boot Version Compatibility: Ensure that the version of U-Boot you are trying to build is compatible with the Colibri iMX6ULL. Sometimes, newer versions of U-Boot introduce changes that may not be compatible with all hardware out of the box.

If after following these steps you

Please, also check if these links can help you solve your problem:

Secure Boot on Torizon OS | Toradex Developer Center.

Hey @afor20000,

A few questions:
Can you tell me your overall goal? You can build u-boot from source if needed

Can you give me the output from the top working directory of repo info ?I’m looking for the branch tag to see what repo you have pulled.

What BSP are you trying to build for?
What image are you trying to build? And what bitbake command to build it?
Have you tried just building the image?

Thanks
-Eric

Hello Eric,

Attached is the repo info.
I am trying to build the tdx-reference-minimal-image recipe, however u-boot-toradex seems to be the issue.

When I try to run the build, I get the following error:

cannot stat ‘/home/v/oe-core/build/tmp/work/colibri_imx6ull-tdx-linux-gnueabi/u-boot-toradex/1_2022.07-r0/build/u-boot-nand.imx’: No such file or directory

Also, I have tried building u-boot as directed in the linked page you share, but I am met with another error:
CHK version_gen.h

CC fdtdump.o

In file included from fdtdump.c:14:

fdtdump.c: In function ‘main’:

libfdt/libfdt.h:251:28: error: array subscript ‘struct fdt_header[0]’ is partly outside array bounds of ‘unsigned char[4]’ [-Werror=array-bounds]

251 | fdth->name = cpu_to_fdt32(val); \

libfdt/libfdt.h:253:1: note: in expansion of macro ‘fdt_set_hdr_’

253 | fdt_set_hdr_(magic);

^~~~~~~~~~~~

fdtdump.c:216:31: note: while referencing ‘smagic’

216 | unsigned char smagic[FDT_MAGIC_SIZE];

^~~~~~

cc1: all warnings being treated as errors

make: *** [Makefile:345: fdtdump.o] Error 1

Just in case it is of help, I am also attaching my ~/oe-core/build/local.conf.

Thanks,

Antonio Fernadez

toradex-oe-core-repo-info.txt (4.07 KB)

local.conf (13.9 KB)

Hi Eric,

Please disregard the u-boot build errors highlighted below, as I overlooked checking out v1.7.0 as mentioned on the documentation.
On a different note, I tried to build the u-boot-toradex recipe setting my local.conf with MACHINE ?= “colibri-imx6” and that seems to work fine.
Any thoughts on why using MACHINE ?= “colibri-imx6ull” breaks the build?
I keep getting the missing boot-nand.imx file error shown bellow.

Thanks,

Antonio

Hey @afor20000,

For the machine value, you would be looking for: colibri-imx6ull-emmc

Please see: Build Torizon OS from Source With Yocto Project/OpenEmbedded | Toradex Developer Center

-Eric

Hi Eric,

Thanks for your email.

I figured out the issue. It turned out to be the location (line) of the MACHINE property at the ~/oe-core/build/local/local.conf file.

It seems to me that the documentation is not quite robust in this sense, as it should probably direct the user to uncomment rather than adding the desired MACHINE type.
After taking a stock local.conf file an uncommenting the appropriate MACHINE property, the build was successful.

Best Regards,

Antonio Fernandez