Error on torizoncode-build build image based on version 7.1.0

I´m trying to use torizoncore-builder to build my own image, to run on a Verdin iMX8MP board with Mallow base board :

$ cat tcbuild.yaml 

# Documentation https://developer.toradex.com/torizon/os-customization/torizoncore-builder-workflow/#customizing-the-configuration-file
# Configuration file outline:
# ⚠️ Mouse hover to the properties to see documentation
# ⚠️ ctrl+space inside an object or property to get the autocompletion tips
input:
  easy-installer:
    toradex-feed:
      version: "7.1.0"
      release: quarterly
      machine: verdin-imx8mp
      distro: torizon
      variant: torizon-docker
      build-number: 4 

customization:
  splash-screen: test_splash_screen.png
  device-tree:
    include-dirs:
      - linux/include
      - linux/arch/arm64/boot/dts/freescale/
    custom: linux/arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-mallow.dts
    overlays:
      add:
      - device-trees/overlays/verdin-imx8mp_hdmi_overlay.dts
      - overlays/gpio_pullup.dts

output:
  easy-installer:
    local: test-os
#    bundle: 
#      compose-file: docker-compose.yml
  ostree:
    branch: test-os
    commit-subject: test-os

On building, I´m getting the following error:

Building image as per configuration file 'tcbuild.yaml'...

=>> Handling input section
Fetching URL 'https://artifacts.toradex.com/artifactory/torizoncore-oe-prod-frankfurt/scarthgap-7.x.y/release/4/verdin-imx8mp/torizon/torizon-docker/oedeploy/torizon-docker-verdin-imx8mp-Tezi_7.1.0+build.4.tar' into '/tmp/torizon-docker-verdin-imx8mp-Tezi_7.1.0+build.4.tar'
[========================================] 
Download Complete!
Downloaded file name: '/tmp/torizon-docker-verdin-imx8mp-Tezi_7.1.0+build.4.tar'
No integrity check performed because checksum was not specified.
Unpacking Toradex Easy Installer image.
Unpacking TorizonCore Toradex Easy Installer image.
Importing OSTree revision 9f462a30d840b1df1c67a909de3968d0047d3ab3906fa5af77815150ec552548 from local repository...
1259 metadata, 9864 content objects imported; 645.7 MB content written          
0 metadata, 0 content objects imported; 0 bytes content written                 
Unpacked OSTree from Toradex Easy Installer image:
  Commit checksum: 9f462a30d840b1df1c67a909de3968d0047d3ab3906fa5af77815150ec552548
  TorizonCore Version: 7.1.0+build.4

=>> Handling customization section

=> Setting splash screen
splash screen merged to initramfs

=> Handling device-tree subsection

=> Selecting custom device-tree 'linux/arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-mallow.dts'
An unexpected Exception occurred. Please provide the following stack trace to
the Toradex TorizonCore support team:


Traceback (most recent call last):
  File "/builder/torizoncore-builder", line 230, in <module>
    mainargs.func(mainargs)
  File "/builder/tcbuilder/cli/build.py", line 665, in do_build
    build(args.config_fname, args.storage_directory,
  File "/builder/tcbuilder/cli/build.py", line 628, in build
    fs_changes = handle_customization_section(
  File "/builder/tcbuilder/cli/build.py", line 194, in handle_customization_section
    handle_dt_customization(props["device-tree"], storage_dir=storage_dir)
  File "/builder/tcbuilder/cli/build.py", line 213, in handle_dt_customization
    dt_cli.dt_apply(dts_path=props["custom"],
  File "/builder/tcbuilder/cli/dt.py", line 85, in dt_apply
    with open(dts_path, 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: 'linux/arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-mallow.dts'

Help appreciated to solve this error.

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 there!

It seems like you’re encountering an issue with missing device tree source files. This is a common step when customizing your device tree on Toradex hardware using TorizonCore Builder. Let’s walk through the process to resolve this.

First, you’ll need to check out the Toradex device tree repository. This is essential before you can apply any customizations. Here’s how you can do it:

  1. Run the following command to check out the device tree sources:

    $ torizoncore-builder dt checkout
    

    This command will download the necessary device tree files into a subdirectory named device-trees within the TorizonCore Builder’s working directory.

  2. Once the repository is checked out, ensure that the paths in your tcbuild.yaml file match the actual file locations in the checked-out repository. This includes verifying that:

    • The include directories exist.
    • The custom device tree file is located at the specified path.
    • Any overlay files are present at their specified paths.

For more detailed instructions, you can refer to the TorizonCore Builder Workflow documentation and the TorizonCore Builder Tool Build Command prerequisites.

If you need further assistance with configuring the device tree paths in your tcbuild.yaml file, feel free to ask!

Best regards,
Toradex AI Assistant

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

TorizonCore Builder Tool “build” command | Toradex Developer Center.

Hi @renatom

You can see the error message here. Can you confirm if this file exists?

Also, which branch of linux-toradex are you using?

For Torizon 7.1.0, you should use toradex_6.6-2.1.x-imx.

Not working…

The dt checkout command is not supported on TorizonCore 6 and newer. Learn how to clone the device trees and overlays repositories on https://developer.toradex.com/torizon/os-customization/use-cases/device-tree-overlays-on-torizon/#clone-the-toradex-repositories-and-check-the-available-device-trees-and-overlays

So, I have downloaded manually:

$ git clone -b toradex_6.6-2.1.x-imx git://git.toradex.com/linux-toradex.git linux
$ git clone -b toradex_6.6-2.1.x-imx git://git.toradex.com/device-tree-overlays.git device-trees

And then a new build:

$ torizoncore-builder build

And everything worked fine. Case closed.