Yocto image build 7.0.0 fails

Dear community,
I am tying to build a reference multimedia image BSP 7.0.0 with yocto, following the instructions here:

Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer…

To create the image I performed the following steps:

mkdir ./toradex-mini-7.0.0
cd ./toradex-mini-7.0.0
repo init -u git://git.toradex.com/toradex-manifest.git -b refs/tags/7.0.0 -m tdxref/default.xml
repo sync
. ./export

echo 'MACHINE ?= "verdin-imx8mm"' >> conf/local.conf

echo 'ACCEPT_FSL_EULA = "1"' >> conf/local.conf

bitbake tdx-reference-multimedia-image

And the error obtained was as follows:

ERROR: ExpansionError during parsing /home/cocinero/toradex-mini-7.0.0/build/../layers/meta-toradex-bsp-common/recipes-bsp/u-boot/u-boot-toradex_mainline.bb
Traceback (most recent call last):
  File "/home/cocinero/toradex-mini-7.0.0/layers/openembedded-core/bitbake/lib/bb/fetch2/__init__.py", line 1248, in srcrev_internal_helper(ud=<bb.fetch2.FetchData object at 0x737118443790>, d=<bb.data_smart.DataSmart object at 0x73711838d0f0>, name='default'):
             d.setVar("__BBAUTOREV_ACTED_UPON", True)
    >        srcrev = ud.method.latest_revision(ud, d, name)

......................................................

bb.data_smart.ExpansionError: Failure expanding variable fetcher_hashes_dummyfunc[vardepvalue], expression was ${@bb.fetch.get_hashvalue(d)} which triggered exception FetchError: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export PATH="/home/cocinero/toradex-mini-7.0.0/build/tmp/work/verdin_imx8mm-tdx-linux/u-boot-toradex/mainline/recipe-sysroot-native/usr/bin/python3-native:/home/cocinero/toradex-mini-7.0.0/layers/openembedded-core/scripts:/home/cocinero/toradex-mini-7.0.0/build/tmp/work/verdin_imx8mm-tdx-linux/u-boot-toradex/mainline/recipe-sysroot-native/usr/bin/aarch64-tdx-linux:/home/cocinero/toradex-mini-7.0.0/build/tmp/work/verdin_imx8mm-tdx-linux/u-boot-toradex/mainline/recipe-sysroot/usr/bin/crossscripts:/home/cocinero/toradex-mini-7.0.0/build/tmp/work/verdin_imx8mm-tdx-linux/u-boot-toradex/mainline/recipe-sysroot-native/usr/sbin:/home/cocinero/toradex-mini-7.0.0/build/tmp/work/verdin_imx8mm-tdx-linux/u-boot-toradex/mainline/recipe-sysroot-native/usr/bin:/home/cocinero/toradex-mini-7.0.0/build/tmp/work/verdin_imx8mm-tdx-linux/u-boot-toradex/mainline/recipe-sysroot-native/sbin:/home/cocinero/toradex-mini-7.0.0/build/tmp/work/verdin_imx8mm-tdx-linux/u-boot-toradex/mainline/recipe-sysroot-native/bin:/home/cocinero/toradex-mini-7.0.0/layers/openembedded-core/bitbake/bin:/home/cocinero/toradex-mini-7.0.0/build/tmp/hosttools"; export HOME="/home/cocinero"; git -c gc.autoDetach=false -c core.pager=cat -c safe.bareRepository=all ls-remote https://source.denx.de/u-boot/u-boot.git  failed with exit code 128, output:
fatal: unable to access 'https://source.denx.de/u-boot/u-boot.git/': Failed to connect to source.denx.de port 443 after 36 ms: Connection refused

The variable dependency chain for the failure is: fetcher_hashes_dummyfunc[vardepvalue]

ERROR: Parsing halted due to errors, see error messages above

Summary: There were 3 WARNING messages.
Summary: There were 2 ERROR messages, returning a non-zero exit code.

Searching the forum I saw this post and re-created the image incorporating these two lines in the local.conf:

echo 'TDX_PURPOSE="Release"' >> conf/local.conf
echo 'TDX_BUILDNBR="1"' >> conf/local.conf

And the error obtained was as follows:

NOTE: Executing Tasks
ERROR: linux-toradex-6.6.23+git-r0 do_package: Error executing a python function in exec_func_python() autogenerated:

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_func_python() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:split_kernel_module_packages(d)
     0003:
File: '/home/cocinero/toradex-mini-7.0.0/build/../layers/openembedded-core/meta/classes-recipe/kernel-module-split.bbclass', lineno: 183, function: split_kernel_module_packages
     0179:    module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')
     0180:    module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX')
     0181:    module_pattern = module_pattern_prefix + kernel_package_name + '-module-%s' + module_pattern_suffix

..................................................................................

Exception: subprocess.CalledProcessError: Command 'aarch64-tdx-linux-objcopy -j .modinfo -O binary /home/cocinero/toradex-mini-7.0.0/build/tmp/work/verdin_imx8mm-tdx-linux/linux-toradex/6.6.23+git/package/usr/lib/modules/6.6.23-7.0.0-g558ba3740880/kernel/drivers/bluetooth/.debug/btusb.ko /home/cocinero/toradex-mini-7.0.0/build/tmp/work/verdin_imx8mm-tdx-linux/linux-toradex/6.6.23+git/tmp1oxxm6x1' returned non-zero exit status 132.

ERROR: Logfile of failure stored in: /home/cocinero/toradex-mini-7.0.0/build/tmp/work/verdin_imx8mm-tdx-linux/linux-toradex/6.6.23+git/temp/log.do_package.2431719
ERROR: Task (/home/cocinero/toradex-mini-7.0.0/build/../layers/meta-toradex-nxp/recipes-kernel/linux/linux-toradex_6.6-2.0.x.bb:do_package) failed with exit code '1'
NOTE: Tasks Summary: Attempted 6760 tasks of which 2 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 5 seconds

Any suggestions?
Thanks to all of you for your collaboration.
Julián

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Julián,

Thank you for reaching out to the community with your issue. Let’s address the errors you’re encountering during the Yocto build process for BSP 7.0.0.

  1. U-Boot Fetch Error:

    • The error indicates a failure to connect to the U-Boot source repository, likely due to network issues. Please ensure your internet connection is stable and that no firewall settings are blocking access to https://source.denx.de.
    • If the problem persists, consider checking if there are alternative mirrors or repository URLs available for U-Boot. You might need to adjust the SRC_URI in the U-Boot recipe accordingly.
  2. Linux Kernel Packaging Error:

    • The error during the do_package task suggests an issue with the objcopy command, possibly due to missing dependencies or configuration errors.
    • Verify that all necessary build dependencies are installed on your host system. The Yocto Project documentation provides a list of required packages.
    • Review your local.conf and other configuration files for any potential misconfigurations.
    • You can try cleaning the build environment for the kernel package by running bitbake -c clean linux-toradex and then rebuilding it with bitbake linux-toradex.
  3. General Troubleshooting Tips:

    • Ensure your host system meets the recommended specifications for building Yocto images, including adequate RAM and disk space.
    • Examine the build logs for any additional warnings or errors that might offer more insight into the issues.

By following these steps, you should be able to resolve the errors and successfully build the reference multimedia image. If you have further questions, feel free to ask.

Best regards,
Toradex AI Assistant

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

Yocto Build fails for Verdin (Dunfell) - imx-gpu-viv.

Thank you for messaging us @jbruno,

Just for completion sake I am adding here, that according to your message the issue was due to a transient server access problem, which should be resolved by now. :slight_smile: