Torizoncore-builder issues

trying out the torizoncore builder and ran into a lot of issues .

Following - TorizonCore Builder Tool - Customizing Torizon OS Images | Toradex Developer Center and Also First Steps with Device Trees | Toradex Developer Center

So far:

  1. did the source tcb-env-setup.sh (I did have to add a -k on the script for the 2 curl command, certificate issues)
  2. made a template
    3)downloaded the base image, in may case it was
    torizon-core-docker-evaluation-verdin-imx8mp-Tezi_6.7.0+build.18.container.tar
  3. unpacked the .tar
  4. cloned the device-trees and linux-toradex dir.
  5. Then I deviated and went to the other page to modify a device tree.
  6. modified a dts.
  7. added the line dtb-$(CONFIG_ARCH_MXC) += myCustom.dtb to the Makefile
  8. ran $make DTC_FLAGS=“-@” myCustom.dtb…this gave me an error "make: *** No rule to make target "
  9. Ran $torizoncore-builder dt apply myCustom.dts … this gave me “imx8mp-verdin.dtsi:6:10: fatal error: dt-bindings/pwm/pwm.h: No such file or directory”
  10. I cheated a bit and added the dtbinding folder from the Device Tree repo.
  11. This only gave me more errors of can’t find files but it was #include <dt-bindings…>

I saw this note “Keep in mind that you previously need to configure your build environment accordingly to you Linux kernel version”

  1. Brings me to Kernel Compilation. but it first wants me to do a Kernel Configuration
  2. I go to the tdxref-oe-prod-frankfurt/kirkstone-6.x.y/release. link I have no idea what release it is, it show 1 to 9. need help knowing what release to get.
  3. tried to get 6 → verdin-imx8mp and it give me an error that the allowable download size is 512MB and the file is much larger… need help here.

All I’m trying to do is modify some pin configuration :slight_smile:

What I have:
BSP - TorizonCore 6.7.0+build.18 \n \l
Kernel - Linux mallow 5.15.148-6.7.0+git.bfdbfb2c85fb #1-TorizonCore SMP PREEMPT Thu Jun 20 15:59:41 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

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

Did you like my answer?

:+1: :-1:


It seems like you’re encountering several issues while trying to customize the TorizonCore image and modify the device tree. Let’s address some of the points you’ve raised:

  1. Certificate Issues with curl: Adding -k to ignore certificate issues is a workaround, but it’s better to resolve the certificate issue itself if possible. Ensure your system’s CA certificates are up to date.

  2. Device Tree Compilation Error: The error “No rule to make target” suggests that the build system isn’t set up correctly. Ensure that you are in the correct directory where the Makefile is located and that all necessary dependencies are installed.

  3. Missing dt-bindings: The error about missing dt-bindings indicates that the include paths are not set correctly. When modifying device trees, ensure that the include paths are correctly set up to point to the kernel source or the device tree source where these headers are located.

  4. Kernel Configuration and Compilation: For kernel configuration, you need to ensure that you have the correct kernel source that matches your TorizonCore version. The release you need should match the kernel version you are using, which is 5.15.148-6.7.0. You might need to check the Toradex resources or contact support to get the correct kernel source and configuration files.

  5. Download Size Limitation: If you’re facing download size limitations, consider using a different network or contacting your network administrator to increase the allowable download size. Alternatively, you might need to download the files in parts if possible.

  6. Modifying Pin Configuration: If your primary goal is to modify pin configurations, ensure that you are editing the correct device tree source files and that you apply the changes using the torizoncore-builder dt apply command correctly. Make sure all dependencies and paths are correctly set up.

If these steps don’t resolve your issues, I recommend reaching out to Toradex support or consulting the Toradex Developer Center for more detailed guidance specific to your setup and version.

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

How to Customize Device Trees | Toradex Developer Center.

Hi @jeffbelz ,

Just to be sure, you’re trying to apply a custom device tree (not an overlay) on a Torizon OS 6 image for the Verdin iMX8M Plus, is that correct?

In that case, if you’re using TorizonCore Builder (TCB), you don’t really need to change the Makefile and/or configure the kernel build environment. These steps are only needed if you want to manually compile the device tree by invoking make.

While you can use standalone TCB commands (images unpack, dt apply, etc.), I think the simplest way to apply the custom device tree is to create a tcbuild.yaml file to describe the customization, then run torizoncore-builder build to apply everything in one go.

For example, assuming that inside the TCB work directory:

  • The correct Linux kernel source branch ( toradex_5.15-2.2.x-imx for the Verdin iMX8M Plus, Torizon OS 6) is in a directory named linux;
  • The input Torizon OS image is in a directory named input_images;
  • The custom device tree is in a directory called custom_dts;

tcbuild.yaml should be something similar to this:

input:
  easy-installer:
    local: input_images/torizon-core-docker-verdin-imx8mp-Tezi_6.7.0+build.18.tar

customization:
  device-tree:
    include-dirs:
      - linux/include
      - linux/arch/arm64/boot/dts/freescale
    custom: custom_dts/myCustom.dts

output:
  easy-installer:
    local: torizon-core-docker-verdin-imx8mp-Tezi_6.7.0+build.18_custom_dt

9.Ran $torizoncore-builder dt apply myCustom.dts … this gave me “imx8mp-verdin.dtsi:6:10: fatal error: dt-bindings/pwm/pwm.h: No such file or directory”
10. I cheated a bit and added the dtbinding folder from the Device Tree repo.
11. This only gave me more errors of can’t find files but it was #include <dt-bindings…>

Just like with C source files, if the #include directives inside the .dts file have a path enclosed in angular brackets (e.g. #include <dt-bindings/pwm...>), then the Device Tree Compiler (DTC) will search for the path starting from a standard include directory.

With TCB, these standard directories are specified with the include-dirs key in tcbuild.yaml. The two paths in the example above should cover most usual include paths related to the Verdin iMX8M Plus, including the dt-bindings one from the error you received.

If the #include path is enclosed in double quotes (e.g. #include "imx8mp-verdin.dtsi"), then DTC will search for the include file inside the source file directory, again just like with C.


After running torizoncore-builder build, a directory with the name specified in the output/easy-installer/local section should be created with the custom Torizon OS image contents inside. From there you can flash it to the SoM.

Hope this clarified some points. Try doing the above and see if it helps.

Best Regards,
Lucas Akira

Hi @jeffbelz,

Just checking-in did my colleague, Lucas’, reply help resolve your issues?

Best Regards,
Jeremias

Hi,

The error dt-bindings/pwm/pwm.h: No such file or directory suggests missing dependencies for your device tree build. Instead of copying the folder manually, you need to ensure you have the complete source and dependencies for your kernel version. The dt-bindings directory is usually found in the kernel source tree, which is essential for proper device tree compilation.

Thanks :slightly_smiling_face:
Max

I’m all set