Not loading custom DTB file (custom_fdt_file)

I have a Jetson TX2 configured as a balena device, and I am having trouble configuring it to use a DTB other than the default.

Steps I took:

  1. On the device, I copied my DTB to /boot/tegra186-tx2-cti-ASG001-revG+_I2C3.dtb

  2. In Device Configuration, under “Define the file name of the DTB to be used”, I specify “/boot/tegra186-tx2-cti-ASG001-revG+_I2C3.dtb”

  3. I wait for the device to reload, and check /mnt/boot/extra_uEnv.txt and verify it has my custom_ftd_file:

    root@:~# cat /mnt/boot/extra_uEnv.txt
    custom_fdt_file=/boot/tegra186-tx2-cti-ASG001-revG+_I2C3.dtb

  4. I check the supervisor logs, and I see the message: "[warn] Could not read extra_uEnv entry: " (there is no detailed message, just blank after the colon)

  5. I check values under /proc/device-tree and my dtb has NOT been used (the values I updated are still the defaults)

I’ve tried this with the dtb under /mnt/boot/ as well, and I’ve tried just using the filename (“tegra186-tx2-cti-ASG001-revG+_I2C3.dtb”) for the environment variable. Nothing seems to work.

Any ideas on what I’m doing wrong here?

I also couldn’t find any official documentation on this feature, just some github issues, so if I missed it please let me know and I’m happy to read over it.

Thanks!

Hi, the steps to add a custom dtb are:

  1. Copy the default dtb in the device’s hostOS /mnt/sysroot/active/current/boot/ directory to your host PC
  2. decompile it with dtc
  3. Perform the changes you need and save it with a different name. For a test, I recommend you change the model string.
  4. Recompile it and copy it back to the same location on the device.
  5. You can then specify that name of your modified dtb in “Device configuration” > “Define the DTB name to be used”. You only need to specify the dtb name, for instance “my-custom.dtb”, and not the full path.
  6. The device will reboot and use your new DTB.

You can the check in /proc/device-tree/model that your custom string is displayed.

Once you are able to locate and modify the default device tree, please try with your custom dtb. Place it in the same folder and reference it in the same way.

Let us know if that helps.

1 Like