Add custom dts with torizoncore builder

Hi,

I have a question regarding how to properly load a custom DTS into my TorizonCore image. I am using TorizonCore Builder with a custom tcbuilder.yaml. Below is my configuration:

---
input:
  easy-installer:
    local: images/torizon-docker-verdin-imx8mp-Tezi_7.5.0+build.30.tar
customization:
  kernel:
    modules:
      - source-dir: modules_kernel/
        autoload: yes
  device-tree:
    include-dirs:
      - linux-toradex/include
      - device-trees/overlays
    custom: linux-toradex/arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-mallow.dts
    overlays:
      add:
        - device-trees/overlays/verdin-imx8mp_panel-touch-10inch-lvds_overlay_custom.dts
output:
  easy-installer:
    name: custom_demo_0.2.0
    local: custom-torizon-image
    bundle:
      compose-file: containers/docker-compose.yml

I build my image with this command torizoncore-builder build.
Then I flash the resulting image to my target using the Toradex Easy Installer.
However, after booting the system I still see these U‑Boot variables:

ethprime=eth0
fdt_addr_r=0x50200000
fdt_board=dev
fdtcontroladdr=bfadf940
fdtfile=imx8mp-verdin-wifi-dev.dtb

Why is the variable fdt_board set to dev instead of mallow?
And why is fdtfile still imx8mp-verdin-wifi-dev.dtb instead of imx8mp-verdin-wifi-mallow.dtb?

What am I doing wrong? What is the issue?

Hi, I’m the Toradex AI Assistant.

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


I’d be glad to help! Could you let me know which OS and version you are using?

Additionally, to better assist you with your device tree customization issue, please run the tdx-info command on your device to get detailed information about your hardware configuration. You can find more information about this command at tdx-info documentation.

This information will help me provide more accurate guidance for your specific setup, as integration guidance varies significantly by platform and OS version.

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.

Hi,
this is the tdx-info output:


Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           6.6.119-7.5.0-ge5c5595adb06 #1-Torizon SMP PREEMPT Mon Jan  5 09:23:13 UTC 2026
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/4e6c42a18b99530973ff8944dc3a85127053140575939763723721fa61abc669/0
Distro name:              NAME="Torizon OS"
Distro version:           VERSION_ID=7.5.0-build.30
Distro variant:           VARIANT="Docker"
Hostname:                 verdin-imx8mp-15603379
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin iMX8M Plus WB on Mallow Board
Toradex version:          0064 V1.1A
Serial number:            15603379
Processor arch:           aarch64
------------------------------------------------------------

Thanks

Thank you for providing the detailed information. Based on your tdx-info output, you’re running Torizon OS 7.5.0-build.30 on a Verdin iMX8M Plus with a Mallow Board.

Understanding the Issue

The U-Boot variables you’re seeing (fdt_board=dev and fdtfile=imx8mp-verdin-wifi-dev.dtb) are still pointing to the development board configuration instead of your custom Mallow board device tree. This happens because U-Boot’s environment variables are set during the bootloader phase and may not automatically update when you specify a custom device tree in TorizonCore Builder(1).

Device Tree Customization Process

When using TorizonCore Builder to customize device trees for Torizon OS, the process involves four main steps(2):

  1. Choose the base Device Tree Source(2)
  2. Customize it according to your particular hardware(2)
  3. Compile the Device Tree Source(2)
  4. Deploy the Device Tree to your custom OS image(2)

TorizonCore Builder Configuration

Your tcbuilder.yaml configuration appears correct for specifying a custom device tree(3). The custom: field under device-tree: should properly set your custom DTS file(3).

However, for Torizon OS 7, device tree customization should work as TorizonCore Builder takes a source file and compiles it, which shouldn’t be specific to OS version, assuming you cloned the correct kernel sources for 7.X(4).

Recommended Solutions

1. Verify Device Tree Deployment

Check if your custom device tree was properly deployed by examining the boot partition:

ls /boot/

2. Build Process Verification

When using the build command with TorizonCore Builder, it should compile and deploy the device tree in a single step along with all other customizations described in the tcbuild.yaml file(3).

3. Manual Deployment for Testing

For evaluation purposes, you can also test device tree overlays using TorizonCore Builder commands(5):

torizoncore-builder dto deploy --remote-host <ip-addr> --remote-username torizon --remote-password torizon --force --reboot <overlay-file>

Next Steps

  1. Verify that your custom device tree file path is correct in the tcbuilder.yaml
  2. Ensure you’re using the appropriate branch for Torizon OS 7.X kernel sources
  3. Check the generated image to confirm the custom device tree was properly included
  4. Consider testing with device tree overlays first to isolate the issue

The U-Boot variables may need to be updated separately, or the custom device tree deployment process may need verification to ensure it’s properly overriding the default configuration.

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.

Hi,

if i run ls /boot on my target i see:

torizon@verdin-imx8mp-15603379:/$ ls /boot
boot  loader  loader.1  ostree

I found my dts file on:

/usr/lib/modules/6.6.119-7.5.0-ge5c5595adb06/dtb/imx8mp-verdin-wifi-mallow.dtb

Then, the kernel branch is:

toradex@toradex-VirtualBox:~/projects/custom/linux-toradex$ git branch 
* (HEAD scollegato su origin/toradex_6.6-2.2.x-imx)

The torizonecore build output is:

toradex@toradex-VirtualBox:~/projects/custom$ torizoncore-builder build
Building image as per configuration file 'tcbuild.yaml'...

=>> Handling input section
Unpacking Toradex Easy Installer image.
Unpacking TorizonCore Toradex Easy Installer image.
Importing OSTree revision b48dbccb33ac49e6a61d82a6ae7953ddc00e624569caaabc1033b4cf6adfd793 from local repository...
1286 metadata, 9890 content objects imported; 652.2 MB content written                                                                                                                        
0 metadata, 0 content objects imported; 0 bytes content written                                                                                                                               
Unpacked OSTree from Toradex Easy Installer image:
  Commit checksum: b48dbccb33ac49e6a61d82a6ae7953ddc00e624569caaabc1033b4cf6adfd793
  TorizonCore Version: 7.5.0+build.30

=>> Handling customization section

=> Handling device-tree subsection

=> Selecting custom device-tree 'linux-toradex/arch/arm64/boot/dts/freescale/imx8mp-verdin-wifi-mallow.dts'
Compiling Device Tree with DTC 1.6.0...
The device tree was compiled with warnings. To view them, run the command again with debug log level enabled (torizoncore-builder --log-level debug <command>).
Please note that some warnings can come from .dtsi files included in the device tree source e.g. from the SoC vendor.
The warnings don't necessarily indicate a breaking issue with the device tree.
'imx8mp-verdin-wifi-mallow.dts' compiles successfully.
warning: removing currently applied device tree overlays
Device tree imx8mp-verdin-wifi-mallow.dtb successfully applied.

=> Adding device-tree overlay 'device-trees/overlays/verdin-imx8mp_panel-touch-10inch-lvds_overlay_custom.dts'
Compiling Device Tree with DTC 1.6.0...
The device tree was compiled with warnings. To view them, run the command again with debug log level enabled (torizoncore-builder --log-level debug <command>).
Please note that some warnings can come from .dtsi files included in the device tree source e.g. from the SoC vendor.
The warnings don't necessarily indicate a breaking issue with the device tree.
'verdin-imx8mp_panel-touch-10inch-lvds_overlay_custom.dts' compiles successfully.
/tmp/tmprnn7pk2g: Device Tree Blob version 17, size=89280, boot CPU=0, string block size=6920, DT structure block size=82304
'verdin-imx8mp_panel-touch-10inch-lvds_overlay_custom.dtbo' can successfully modify the device tree 'imx8mp-verdin-wifi-mallow.dtb'.
Overlay verdin-imx8mp_panel-touch-10inch-lvds_overlay_custom.dtbo successfully applied.

=> Building module located at 'modules_kernel/'
make: Entering directory '/workdir/modules_kernel'
make -C /storage/linux M=/workdir/modules_kernel modules
make[1]: Entering directory '/storage/linux'
  CC [M]  /workdir/modules_kernel/ilitek_def.o
  CC [M]  /workdir/modules_kernel/ilitek_main.o
  CC [M]  /workdir/modules_kernel/ilitek_platform_init.o
  CC [M]  /workdir/modules_kernel/ilitek_update.o
  CC [M]  /workdir/modules_kernel/ilitek_tool.o
  CC [M]  /workdir/modules_kernel/ilitek_protocol.o
  CC [M]  /workdir/modules_kernel/ilitek_crypto.o
  CC [M]  /workdir/modules_kernel/ilitek_report.o
  LD [M]  /workdir/modules_kernel/ili2511.o
  MODPOST /workdir/modules_kernel/Module.symvers
  CC [M]  /workdir/modules_kernel/ili2511.mod.o
  LD [M]  /workdir/modules_kernel/ili2511.ko
make[1]: Leaving directory '/storage/linux'
make: Leaving directory '/workdir/modules_kernel'

Kernel module(s) successfully built and ready to deploy.
modules_kernel/ili2511.ko is set to be autoloaded on boot.
All kernel module(s) have been built and prepared.

=>> Handling output section
Applying changes from STORAGE/kernel.
Applying changes from STORAGE/dt.
Commit 65e6764e4cb9e0f44838c8c2470eedca42e5125dd674b52aabeed480fb33bcb3 has been generated for changes and is ready to be deployed.
Deploying commit ref: tcbuilder-20260205124815
Pulling OSTree with ref tcbuilder-20260205124815 from local archive repository...
  Commit checksum: 65e6764e4cb9e0f44838c8c2470eedca42e5125dd674b52aabeed480fb33bcb3
  TorizonCore Version: 7.5.0+build.30-tcbuilder.20260205124817
  Default kernel arguments: quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3

1286 metadata, 9892 content objects imported; 652.7 MB content written                                                                                                                        
Pulling done.
Deploying OSTree with checksum 65e6764e4cb9e0f44838c8c2470eedca42e5125dd674b52aabeed480fb33bcb3
Bootloader found in unpacked image: U-Boot
Deploying done.
Copy files not under OSTree control from original deployment.
Packing rootfs...
Packing rootfs done.
Bundling images to directory bundle_20260205124830_917896.tmp
NOTE: TCB no longer expands environment variables present in the compose file.

Starting DIND container
Using Docker host "tcp://127.0.0.1:22376"
Connecting to Docker Daemon at "tcp://127.0.0.1:22376"
Fetching container image torizon/weston-imx8:4 in service weston
  Pulling from torizon/weston-imx8
  b1efea88fbf7: Pull complete 
  37a72255e8d8: Pull complete 
  eca284f4a6bc: Pull complete 
  4f4fb700ef54: Pull complete 
  0cb5fe87d6df: Pull complete 
  825fdcbc5b54: Pull complete 
  5fee54b056af: Pull complete 
  056d43f5db5e: Pull complete 
  8361f9cb7446: Pull complete 
  945975bd1fd0: Pull complete 
  6f6477cc8d4d: Pull complete 
  23cd40ea2014: Pull complete 
  b60e874ce171: Pull complete 
  56dfa90cb3f6: Pull complete 
  75c85b0b14a3: Pull complete 
  cc912a062bdf: Pull complete 
  6e7e0238f5a0: Pull complete 
  51a9eef0cbc9: Pull complete 
  183b5d17ef46: Pull complete 
  9f11294149d7: Pull complete 
  5eb33abe1ad8: Pull complete 
  Digest: sha256:ac5cdf16fcb86e450859a0ec8e180800673b1c0c818fb83b1681046a46fa8747
  Status: Downloaded newer image for torizon/weston-imx8:4
Saving Docker Compose file
Exporting storage
Storing container bundle into "bundle_20260205124830_917896.tmp"
Stopping DIND container
Updating Torizon OS image in place.
Combining Torizon OS image with Docker Container bundle.

=>> Build command successfully executed!

Greetings @fmolon,

When you change the device tree with TorizonCore Builder, it does not change the variable in U-Boot. It changes the variable in the Boot script. You can see this by viewing /boot/loader/uEnv.txt. This has priority over the variable in the U-Boot environment.

Best Regards,
Jeremias