TorizonCore Builder fails to build with 6.1.0 input image

We made a TorizonCore Builder project to customize the TorizonCore image for our custom carrier board and application. As input image we were using using the following 5.7.0 nightly build image: torizon-core-docker-colibri-imx6-Tezi_5.7.0-devel-20220704+build.657. It builds correctly with this image but we needed to update it to a newer image built with some kernel options we requested to be enabled.

For the new input image, we thought it would a good idea to get back a production release and so we chose the most recent quarterly released image: torizon-core-docker-colibri-imx6-Tezi_6.1.0+build.1.

Our TorizonCore Builder project applies custom device tree and overlays, sets a custom splash screen, applies captured touch screen calibration changes and builds and copies an external kernel module to the custom image. When we try building it with the new input image, as it’s about to build the external kernel module it fails with the following error message and stack trace:

An unexpected Exception occured. Please provide the following stack trace to
the Toradex TorizonCore support team:

Traceback (most recent call last):
  File "/builder/torizoncore-builder", line 217, in <module>
  File "/builder/tcbuilder/cli/", line 471, in do_build
    build(args.config_fname, args.storage_directory,
  File "/builder/tcbuilder/cli/", line 441, in build
    fs_changes = handle_customization_section(
  File "/builder/tcbuilder/cli/", line 175, in handle_customization_section
    handle_kernel_customization(props["kernel"], storage_dir=storage_dir)
  File "/builder/tcbuilder/cli/", line 231, in handle_kernel_customization
  File "/builder/tcbuilder/cli/", line 94, in kernel_build_module
  File "/builder/tcbuilder/backend/", line 59, in build_module
    subprocess.check_output(f"""PATH=$PATH:{toolchain} make -C {linux_src} ARCH={arch} \
  File "/usr/lib/python3.9/", line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/usr/lib/python3.9/", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'PATH=$PATH:/storage/toolchain/gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf/bin make -C /storage/linux ARCH=arm         CROSS_COMPILE=arm-none-linux-gnueabihf- modules_prepare' returned non-zero exit status 2.

If we comment out the external kernel module section from the tcbuild.yaml, the custom image builds and works correctly as far as we have been able to test it.

We are using torizoncore-builder 3.6.0.

Best regards.

Hey @mmarcos.sensor,

I’ll try and recreate the situation on our end.
Can you tell me what SoM and if you are using a particular carrier board?

Also to narrow down the issue a bit. Is this the only kernel module you are trying to load? And can you share any information about the kernel module in question?



We are using the Colibri iMX6DL 512BM V1.1A SoM.

Our carrier board is custom made but mostly based of the Colibri Evaluation Board v2.1.

We are only trying to load a single kernel module and it’s a modified version of the in-tree SJA1000 kernel driver. You can read all about it in our previous thread: Enabling SJA1000 support on iMX6 for custom carrier board

If you read the aforementioned thread you will see that our first attempt was to use the in-tree kernel driver, which wasn’t enabled by default and so we requested that the necessary kernel options be enabled. Later we discovered that the in-tree driver wouldn’t work for us as is, and so we had to modify it and added to the custom image as an external module. So our previous custom image included both the in-tree and external modules. Fortunately the correct one(the external modified one) was loaded at runtime and the peripheral worked correctly.

Best regards.


Unfortunately I have found out that the kernel build_moduleis not supported for TorizonCore 6.X.Y. with TorizonCore Builder 3.6.0. This will be patched/fixed with the the release of 3.7.0. Again unfortunately I do not have a better ETA than ‘soon’ as it stands now. Are you able to maintain using the 5.7.0 image until this this requirement is met?



Thank you for confirming the error.

I think we can wait for the release of TorizonCore Builder 3.7.0. For the time being we are not using the driver, so we’ll leave it commented out from our tcbuild.yaml.

Best regards.