Simple tdx-reference-multimedia-image build fails

Hi guys,
I just followed this tutorial , to build basic multimedia image , but it failing every time , i tried 3 diffrent machine also , same error.
cat /etc/os-release
PRETTY_NAME=“Ubuntu 22.04.5 LTS”
NAME=“Ubuntu”
VERSION_ID=“22.04”
VERSION=“22.04.5 LTS (Jammy Jellyfish)”
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL=“https://www.ubuntu.com/”
SUPPORT_URL=“https://help.ubuntu.com/”
BUG_REPORT_URL=“https://bugs.launchpad.net/ubuntu/”
PRIVACY_POLICY_URL=“https://www.ubuntu.com/legal/terms-and-policies/privacy-policy”
UBUNTU_CODENAME=jammy
$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 1.6G 2.5M 1.6G 1% /run
/dev/nvme0n1p5 295G 167G 113G 60% /
tmpfs 7.7G 151M 7.6G 2% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
efivarfs 438K 206K 228K 48% /sys/firmware/efi/efivars
/dev/nvme0n1p1 246M 118M 129M 48% /boot/efi
tmpfs 1.6G 136K 1.6G 1% /run/user/1000

$ free -h
total used free shared buff/cache available
Mem: 15Gi 4.4Gi 2.1Gi 664Mi 8.8Gi 9.9Gi
Swap: 15Gi 1.0Gi 15Gi

terminal-output.txt (397.4 KB)

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


Before I can help troubleshoot your Yocto build failure, I need to gather some information about your setup:

Required Information

To guide you properly, could you please provide:

  1. Which Toradex module are you building for? (e.g., Verdin iMX8M Plus, Colibri iMX6ULL, Apalis iMX8, etc.)

  2. Which BSP version are you trying to build? (e.g., 7.0.0, 7.1.0, 6.0.0, etc.)

  3. What specific error message are you seeing in the build output? You mentioned you have a terminal output file - could you share the key error messages from that file?

You can also use the tdx-info command on your module to get detailed information about your hardware and software configuration. For more details, see: tdx-info documentation

Initial Observations

Your host system appears to meet the basic requirements(1):

  • Ubuntu 22.04.5 LTS - This is a supported Linux distribution for Yocto builds
  • 113 GB available disk space - Meets the ~120 GB recommendation
  • 15 GB RAM - Meets the recommended 16 GB for building multimedia images

However, without seeing the specific error messages and knowing your target hardware and BSP version, I cannot provide specific troubleshooting steps.

Please share these details so I can assist you further.

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

  1. Verdin am62

  2. BPS version - 7.3.0

  3. error: ERROR: linux-libc-headers-6.6-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:
    0001:
    *** 0002:perform_packagecopy(d)
    0003:
    File: ‘/home/seyadanasarif/Verdin/am62/build/../layers/openembedded-core/meta/classes-global/package.bbclass’, lineno: 363, function: perform_packagecopy
    0359: rpath_replace (dvar, d)
    0360:}
    0361:perform_packagecopy[cleandirs] = “${PKGD}”
    0362:perform_packagecopy[dirs] = “${PKGD}”
    *** 0363:
    0364:python populate_packages () {
    0365: oe.package.populate_packages(d)
    0366:}
    0367:populate_packages[dirs] = “${D}”
    File: ‘/usr/lib/python3.10/subprocess.py’, lineno: 421, function: check_output
    0417: else:
    0418: empty = b’’
    0419: kwargs[‘input’] = empty
    0420:
    *** 0421: return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
    0422: **kwargs).stdout
    0423:
    0424:
    0425:class CompletedProcess(object):
    File: ‘/usr/lib/python3.10/subprocess.py’, lineno: 526, function: run
    0522: # We don’t call process.wait() as .exit does that for us.
    0523: raise
    0524: retcode = process.poll()
    0525: if check and retcode:
    *** 0526: raise CalledProcessError(retcode, process.args,
    0527: output=stdout, stderr=stderr)
    0528: return CompletedProcess(process.args, retcode, stdout, stderr)
    0529:
    0530:
    Exception: subprocess.CalledProcessError: Command ‘tar --exclude=./sysroot-only -cf - -C /home/seyadanasarif/Verdin/am62/build/tmp/work/aarch64-tdx-linux/linux-libc-headers/6.6/image -p -S . | tar -xf - -C /home/seyadanasarif/Verdin/am62/build/tmp/work/aarch64-tdx-linux/linux-libc-headers/6.6/package’ returned non-zero exit status 2.

Thank you for providing those details! The error you’re encountering with linux-libc-headers during the packaging stage is a known issue that can occur during Yocto builds.

Root Cause

The error Command 'tar --exclude=./sysroot-only -cf - -C ... | tar -xf - -C ...' returned non-zero exit status 2 typically indicates one of the following issues:

  1. Disk space exhaustion during the build process
  2. Corrupted build state from a previous failed build
  3. File system or permission issues

Troubleshooting Steps

1. Clean the Build State

First, try cleaning the specific recipe that’s failing:

$ cd ~/Verdin/am62/build
$ bitbake -c cleanall linux-libc-headers

Then retry the build:

$ bitbake tdx-reference-multimedia-image

2. Check Available Disk Space

Monitor your disk space during the build. Although you showed 113 GB available, Yocto builds can consume significant space, especially for multimedia images. The tmp directory can grow quite large.

$ df -h

If space is getting low, consider:

  • Cleaning the build directory: rm -rf tmp
  • Using INHERIT += "rm_work" in your conf/local.conf to automatically remove temporary work files after each recipe completes

3. Verify Build Environment

Ensure you’ve properly sourced the environment setup:

$ cd ~/Verdin/am62
$ source export

4. Check for File System Issues

The tar error can sometimes indicate file system problems. Run a file system check if possible.

5. Start Fresh (If Above Steps Fail)

If the issue persists, consider starting with a clean build directory:

$ cd ~/Verdin/am62/build
$ rm -rf tmp sstate-cache
$ bitbake tdx-reference-multimedia-image

Additional Considerations

Based on a similar issue reported in the community(1), temporary network or repository access issues can sometimes cause build failures. Ensure your internet connection is stable and that you can access the required repositories.

If you continue to experience issues after trying these steps, please share:

  • The output after running the clean commands
  • Any additional error messages
  • The contents of your conf/local.conf file

Best regards,
Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.