Colibri iMX8QXP unable to boot with custom device tree

Hi I have a Colibri-iMX8QXP device with the colibri evaluation board. I wan’t to customize the device tree, but event the default (at least what I’m thinking it is) is not working. The kernel is not booting.

I’m using torizoncore-builder to create my image for the easyinstaller:

tcbuild.yaml

input:
    easy-installer:
local: torizon-core-docker-colibri-imx8x-Tezi_6.7.0+build.18.tar

customization:
 filesystem:
     - changes0/
 device-tree:
   include-dirs:
     - linux/include
   custom: linux/arch/arm64/boot/dts/freescale/imx8qxp-colibri-eval-v3.dts
 
output:
 easy-installer:
   local: torizon-core-docker-colibri-imx8x-Tezi_6.7.0+build.18-custom
   name: "Test Image iMX8"

torizoncore-builder

user@localhost:~/tcbdir8> torizoncore-builder build --force
Building image as per configuration file 'tcbuild.yaml'...

=>> Handling input section
Unpacking Toradex Easy Installer image.
Copying Toradex Easy Installer image.
Unpacking TorizonCore Toradex Easy Installer image.
Importing OSTree revision         9319b42b26d4d192a9c2ce27f32de4e88de10f379e6005be7471e6733ded1e9e from local     repository...
1044 metadata, 9297 content objects imported; 583.7 MB content written                                                                             
0 metadata, 0 content objects imported; 0 bytes content written                                                                                    
Unpacked OSTree from Toradex Easy Installer image:
  Commit checksum:     9319b42b26d4d192a9c2ce27f32de4e88de10f379e6005be7471e6733ded1e9e
  TorizonCore Version: 6.7.0+build.18

=>> Handling customization section

=> Handling device-tree subsection

=> Selecting custom device-tree 'linux/arch/arm64/boot/dts/freescale/imx8qxp-colibri-eval-v3.dts'
'imx8qxp-colibri-eval-v3.dts' compiles successfully.
warning: removing currently applied device tree overlays
Device tree imx8qxp-colibri-eval-v3.dtb successfully applied.

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

1044 metadata, 9298 content objects imported; 583.6 MB content written                                                                             
Pulling done.
Deploying OSTree with checksum     1174624d80731e7bdfdd4e8ac6aafa18a7d6d21c1f93a60394324e8d0d926969
Bootloader found in unpacked image: U-Boot
Deploying done.
Copy files not under OSTree control from original deployment.
Packing rootfs...
Packing rootfs done.
Updating TorizonCore image in place.

=>> Build command successfully executed!

Output on the serial console:

U-Boot 2022.04-6.7.0+git.7588eb559ca2 (Jan 01 1970 - 00:00:00 +0000)

CPU:   NXP i.MX8QXP RevC A35 at 1200 MHz at 49C
DRAM:  2 GiB
Core:  240 devices, 20 uclasses, devicetree: separate
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
Loading Environment from MMC... OK
In:    serial
Out:   serial
Err:   serial
Model: Toradex 0050 Colibri iMX8QXP 2GB IT V1.0D
Serial#: 14791013

 BuildInfo:
  - SCFW 6638c032, SECO-FW c9de51c0, IMX-MKIMAGE 3bfcfccb, ATF 3c1583b
  - U-Boot 2022.04-6.7.0+git.7588eb559ca2

flash target is MMC:0
Net:   eth0: ethernet@5b040000
Fastboot: Normal
Normal Boot
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc0(part 0) is current device
Scanning mmc 0:1...
Found U-Boot script /boot.scr
973 bytes read in 2 ms (474.6 KiB/s)
## Executing script at 9d480000
6695 bytes read in 4 ms (1.6 MiB/s)
35841 bytes read in 6 ms (5.7 MiB/s)
14 bytes read in 4 ms (2.9 KiB/s)
13439264 bytes read in 309 ms (41.5 MiB/s)
6106112 bytes read in 143 ms (40.7 MiB/s)
   Uncompressing Kernel Image
## Flattened Device Tree blob at 9d400000
   Booting using the fdt blob at 0x9d400000
   Loading Device Tree to 00000000fd644000, end 00000000fd66ffff ... OK
Disable clock-controller@59580000 rsrc 512 not owned

Starting kernel ...

A tried using the linux-5.15.y branch for the device tree as well as the master branch.

Pleas help me.
Regards, Martin!

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Martin,

Based on the detailed information you’ve provided, it seems like you’ve followed the correct steps to customize and deploy a new device tree for your Colibri iMX8QXP module using the TorizonCore Builder. The serial console output indicates that U-Boot is loading correctly, and the kernel starts to boot but does not complete the process.

Here are a few steps and checks to help diagnose and potentially resolve the issue:

  1. Verify Device Tree Compatibility: Ensure that the device tree imx8qxp-colibri-eval-v3.dts is fully compatible with the TorizonCore version you are using. Incompatibilities or missing configurations can prevent the kernel from booting.

  2. Kernel Messages: Since the kernel starts but does not complete booting, it’s crucial to check the kernel log messages for any errors or warnings that could indicate what’s going wrong. If you have a serial connection, you should be able to see these messages after the “Starting kernel …” line. Look for any errors related to drivers or hardware initialization.

  3. Review Changes in the Device Tree: Double-check the modifications made to the device tree. Even minor errors or omissions can prevent the system from booting. Pay special attention to the syntax and structure of the device tree source file.

  4. Fallback to a Known Good State: Try booting the system with the original, unmodified device tree to ensure that the issue is indeed related to the changes you’ve made. This can help isolate the problem.

  5. Kernel Configuration: Ensure that the kernel configuration (usually found in the kernel’s .config file) is compatible with your device tree changes. Certain kernel features might need to be enabled or disabled to match the hardware descriptions in your device tree.

  6. Debugging the Kernel Boot Process: If the kernel is still not booting, you might need to enable additional debugging options in the kernel configuration to get more detailed log messages. Look for options related to early printk or debug output.

  7. Validate the Device Tree Blob (DTB): After compiling your device tree source (DTS) into a device tree blob (DTB), validate it using tools like fdtdump to ensure there are no structural issues.

  8. Check for Overlays: If you’re using device tree overlays, ensure they are correctly applied and compatible with your base device tree.

If after these checks the issue persists, it might be beneficial to closely compare your custom device tree with the default

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

How to Autorun Application at the Start up in Linux | Toradex Developer Center.

Hello @moberza,

The general procedure to build the device tree is correct.
I would just recommend that you do not run torizoncore-builder build with the --force flag.

Regarding the problem you are encountering, I believe they may be related to the kernel version being used for the device tree files.
Have you cloned the correct branch from the linux-toradex repository?

git clone -b toradex_5.15-2.2.x-imx git://git.toradex.com/linux-toradex.git linux
git clone -b toradex_5.15-2.2.x-imx git://git.toradex.com/device-tree-overlays.git device-trees

Best Regards,
Bruno

Hello @bruno.tx
indeed i fetched the source kernel.org. Fetching the exact version you mentioned worked!

Hello @moberza,

Thanks for the update.

Best Regards,
Bruno