Device tree files do not seem to be copied over during flash

Following these instructions: Kernel Customization — Jetson Linux Developer Guide documentation

Afterwards, I’m flashing with:

sudo ./nvsdkmanager_flash.sh --storage nvme0n1p1

The problem is after flashing and booting I look at /boot on the agx orin and I see:

blaberj@blaberj-orinagx:/boot$ ls -lhrt
total 118M
-rw-r--r-- 1 root root  910 Aug  1  2023 tegra234-p3768-overlay.dtbo
-rw-r--r-- 1 root root 1.3K Aug  1  2023 tegra234-p3767-overlay.dtbo
-rw-r--r-- 1 root root 3.0K Aug  1  2023 tegra234-p3767-camera-p3768-imx477-imx219.dtbo
-rw-r--r-- 1 root root 3.1K Aug  1  2023 tegra234-p3767-camera-p3768-imx477-dual.dtbo
-rw-r--r-- 1 root root 3.4K Aug  1  2023 tegra234-p3767-camera-p3768-imx477-dual-4lane.dtbo
-rw-r--r-- 1 root root 2.8K Aug  1  2023 tegra234-p3767-camera-p3768-imx219-dual.dtbo
-rw-r--r-- 1 root root 3.0K Aug  1  2023 tegra234-p3767-camera-imx477-imx219.dtbo
-rw-r--r-- 1 root root 3.1K Aug  1  2023 tegra234-p3767-camera-imx477-dual.dtbo
-rw-r--r-- 1 root root 2.8K Aug  1  2023 tegra234-p3767-camera-imx219-dual.dtbo
...
-rw-r--r-- 1 root root 8.2K Aug  1  2023 tegra194-p2822-camera-eCAM130A_CUXVR-overlay.dtbo
-rw-r--r-- 1 root root  19K Aug  1  2023 tegra194-p2822-camera-e3333-overlay.dtbo
-rw-r--r-- 1 root root 4.1K Aug  1  2023 tegra194-p2822-camera-e3331-overlay.dtbo
-rw-r--r-- 1 root root 4.3K Aug  1  2023 tegra194-p2822-camera-e3326-overlay.dtbo
-rw-r--r-- 1 root root 3.2K Aug  1  2023 tegra194-p2822-camera-e2832-overlay.dtbo
-rw-r--r-- 1 root root  14K Aug  1  2023 tegra194-p2822-camera-dual-imx274-overlay.dtbo
-rw-r--r-- 1 root root 4.0K Aug  1  2023 initrd.t19x.sig
-rw-r--r-- 1 root root 9.4M Aug  1  2023 initrd.t19x
-rw-r--r-- 1 root root 4.0K Aug  1  2023 Image.t19x.sig

-rw-r--r-- 1 root root  33M Aug  1  2023 Image.t19x
-rw-r--r-- 1 root root 430K Oct  9 16:58 kernel_tegra234-p3701-0005-p3737-0000.dtb
-rw-r--r-- 1 root root 9.4M Oct  9 16:58 initrd
-rw-r--r-- 1 root root  33M Oct  9 16:58 Image
drwxr-xr-x 2 root root 4.0K Oct  9 16:58 dtb
drwxr-xr-x 2 root root 4.0K Oct  9 16:58 extlinux
-rw-r--r-- 1 root root  27M Oct  9 17:10 initrd.img-5.10.120-tegra
lrwxrwxrwx 1 root root   25 Oct  9 17:10 initrd.img -> initrd.img-5.10.120-tegra

and:

blaberj@blaberj-orinagx:/boot/dtb$ ls -lhrt
total 432K
-rw-r--r-- 1 root root 430K Oct  9 16:58 kernel_tegra234-p3701-0005-p3737-0000.dtb

On the host machine:

(base) blaberj@xnav-blaberj ~/jetpack_5_1_2/Linux_for_Tegra_Driver/rootfs/boot $ ls -lhrt
total 92M
-rw-r--r-- 1 root root  910 Aug  1  2023 tegra234-p3768-overlay.dtbo
-rw-r--r-- 1 root root 1.3K Aug  1  2023 tegra234-p3767-overlay.dtbo
-rw-r--r-- 1 root root 3.0K Aug  1  2023 tegra234-p3767-camera-p3768-imx477-imx219.dtbo
-rw-r--r-- 1 root root 3.1K Aug  1  2023 tegra234-p3767-camera-p3768-imx477-dual.dtbo
-rw-r--r-- 1 root root 3.4K Aug  1  2023 tegra234-p3767-camera-p3768-imx477-dual-4lane.dtbo
-rw-r--r-- 1 root root 2.8K Aug  1  2023 tegra234-p3767-camera-p3768-imx219-dual.dtbo
-rw-r--r-- 1 root root 3.0K Aug  1  2023 tegra234-p3767-camera-imx477-imx219.dtbo
-rw-r--r-- 1 root root 3.1K Aug  1  2023 tegra234-p3767-camera-imx477-dual.dtbo
-rw-r--r-- 1 root root 2.8K Aug  1  2023 tegra234-p3767-camera-imx219-dual.dtbo
...
-rw-r--r-- 1 root root 8.2K Aug  1  2023 tegra194-p2822-camera-eCAM130A_CUXVR-overlay.dtbo
-rw-r--r-- 1 root root  19K Aug  1  2023 tegra194-p2822-camera-e3333-overlay.dtbo
-rw-r--r-- 1 root root 4.1K Aug  1  2023 tegra194-p2822-camera-e3331-overlay.dtbo
-rw-r--r-- 1 root root 4.3K Aug  1  2023 tegra194-p2822-camera-e3326-overlay.dtbo
-rw-r--r-- 1 root root 3.2K Aug  1  2023 tegra194-p2822-camera-e2832-overlay.dtbo
-rw-r--r-- 1 root root  14K Aug  1  2023 tegra194-p2822-camera-dual-imx274-overlay.dtbo
-rw-r--r-- 1 root root 4.0K Aug  1  2023 initrd.t19x.sig
-rw-r--r-- 1 root root 9.4M Aug  1  2023 initrd.t19x
-rw-r--r-- 1 root root 4.0K Aug  1  2023 Image.t19x.sig
-rw-r--r-- 1 root root  33M Aug  1  2023 Image.t19x
-rw-r--r-- 1 root root  33M Oct  9 16:58 Image
-rw-r--r-- 1 root root 9.4M Oct  9 16:58 initrd
-rw-r--r-- 1 root root 430K Oct  9 16:58 kernel_tegra234-p3701-0005-p3737-0000.dtb
drwxr-xr-x 2 root root 4.0K Oct  9 16:58 extlinux

and:

(base) blaberj@xnav-blaberj ~/jetpack_5_1_2/Linux_for_Tegra_Driver/kernel/dtb $ ls -lhrt
total 20M
-rw-rw-r-- 1 blaberj blaberj  853 Aug  1  2023 L4TConfiguration.dtbo
-rw-rw-r-- 1 blaberj blaberj  404 Aug  1  2023 BootOrderUfs.dtbo
-rw-rw-r-- 1 blaberj blaberj  412 Aug  1  2023 BootOrderSata.dtbo
-rw-rw-r-- 1 blaberj blaberj  408 Aug  1  2023 BootOrderPxe.dtbo
-rw-rw-r-- 1 blaberj blaberj  412 Aug  1  2023 BootOrderNvme.dtbo
-rw-rw-r-- 1 blaberj blaberj  412 Aug  1  2023 BootOrderEmmc.dtbo
-rw-rw-r-- 1 blaberj blaberj  398 Aug  1  2023 AcpiBoot.dtbo
-rw-rw-r-- 1 blaberj blaberj 6.5K Aug  1  2023 NOTICE.uefi
-rw-rw-r-- 1 blaberj blaberj  438 Aug  1  2023 DgpuDtEfifbSupport.dtbo
-rw-rw-r-- 1 blaberj blaberj  404 Aug  1  2023 BootOrderUsb.dtbo
-rw-rw-r-- 1 blaberj blaberj 246K Aug  1  2023 tegra234-p3701-0002-p3711-0000.dtb
-rw-rw-r-- 1 blaberj blaberj 1.3K Oct  9 16:50 tegra194-p2888-0001-p2822-0000-csi.dtbo
-rw-rw-r-- 1 blaberj blaberj 1.1K Oct  9 16:50 tegra194-p2888-0001-p2822-0000-adafruit-uda1334a.dtbo
-rw-rw-r-- 1 blaberj blaberj 1.1K Oct  9 16:50 tegra194-p2888-0001-p2822-0000-adafruit-sph0645lm4h.dtbo
-rw-rw-r-- 1 blaberj blaberj 299K Oct  9 16:50 tegra194-p2888-0001-e3366-1199.dtb
-rw-rw-r-- 1 blaberj blaberj 7.0K Oct  9 16:50 tegra194-p2822-camera-imx390-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj 8.5K Oct  9 16:50 tegra194-p2822-camera-imx185-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj 8.2K Oct  9 16:50 tegra194-p2822-camera-eCAM130A_CUXVR-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj  19K Oct  9 16:50 tegra194-p2822-camera-e3333-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj 4.1K Oct  9 16:50 tegra194-p2822-camera-e3331-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj 4.3K Oct  9 16:50 tegra194-p2822-camera-e3326-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj 3.2K Oct  9 16:50 tegra194-p2822-camera-e2832-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj  14K Oct  9 16:50 tegra194-p2822-camera-dual-imx274-overlay.dtbo
...
-rw-rw-r-- 1 blaberj blaberj  899 Oct  9 16:50 tegra234-p3740-overlay-pcie.dtbo
-rw-rw-r-- 1 blaberj blaberj 3.3K Oct  9 16:50 tegra234-p3740-camera-p3785-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj  26K Oct  9 16:50 tegra234-p3740-camera-hawk-owl-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj 3.4K Oct  9 16:50 tegra234-p3737-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj 7.0K Oct  9 16:50 tegra234-p3737-camera-imx390-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj 8.1K Oct  9 16:50 tegra234-p3737-camera-imx185-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj  27K Oct  9 16:50 tegra234-p3737-camera-hawk-owl-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj  19K Oct  9 16:50 tegra234-p3737-camera-e3333-overlay.dtbo
-rw-rw-r-- 1 blaberj blaberj 4.2K Oct  9 16:50 tegra234-p3737-camera-e3331-overlay.dtbo
-rw-r--r-- 1 root    root    430K Oct  9 17:00 tegra234-p3701-0005-p3737-0000.dtb.rec

My expectations were the files in Linux_for_Tegra_Driver/kernel/dtb would be copied over to /boot on the agx orin after flashing but it seems to me the dtb files in Linux_for_Tegra_Driver/kernel/dtb are not being copied over (they are just the default files in the example rootfs). Is there a step I’m missing here? Literally trying to follow instructions to the tee to prevent any mistakes.

Ok looking at the logs I see:

copying overlay_dtb(/home/blaberj/jetpack_5_1_2/Linux_for_Tegra_Driver/kernel/dtb/L4TConfiguration.dtbo)... done.
copying overlay_dtb(/home/blaberj/jetpack_5_1_2/Linux_for_Tegra_Driver/kernel/dtb/tegra234-p3701-overlay.dtbo)... done.
copying overlay_dtb(/home/blaberj/jetpack_5_1_2/Linux_for_Tegra_Driver/kernel/dtb/tegra234-p3737-camera-dual-imx274-overlay.dtbo)... done.
copying overlay_dtb(/home/blaberj/jetpack_5_1_2/Linux_for_Tegra_Driver/kernel/dtb/tegra234-p3737-camera-e3331-overlay.dtbo)... done.
copying overlay_dtb(/home/blaberj/jetpack_5_1_2/Linux_for_Tegra_Driver/kernel/dtb/tegra234-p3737-camera-e3333-overlay.dtbo)... done.
copying overlay_dtb(/home/blaberj/jetpack_5_1_2/Linux_for_Tegra_Driver/kernel/dtb/tegra234-p3737-camera-imx185-overlay.dtbo)... done.
copying overlay_dtb(/home/blaberj/jetpack_5_1_2/Linux_for_Tegra_Driver/kernel/dtb/tegra234-p3737-camera-imx390-overlay.dtbo)... done.
copying overlay_dtb(/home/blaberj/jetpack_5_1_2/Linux_for_Tegra_Driver/kernel/dtb/tegra234-p3737-audio-codec-rt5658-40pin.dtbo)... done.
copying overlay_dtb(/home/blaberj/jetpack_5_1_2/Linux_for_Tegra_Driver/kernel/dtb/tegra234-p3737-overlay.dtbo)... done.
copying overlay_dtb(/home/blaberj/jetpack_5_1_2/Linux_for_Tegra_Driver/kernel/dtb/BootOrderNvme.dtbo)... done.

Is there a reason why these files aren’t present in /boot/ after flashing the jetson? The dtbo files in /boot/ are the ones from the example root fs. I would have expected the dtbo files specified in jetson-agx-orin-devkit.conf would be copied over.

Hi justin.akira.blaber,

Are you using the devkit or custom board for AGX Orin?

Have you tried to decompile the /boot/dtb/kernel_tegra234-p3701-0005-p3737-0000.dtb on your board and check if your modifications are included?

Or are you adding custom dtbo and want it to be included?

Kevin,

I’m trying to confirm if I understand correctly what’s going on and also if I built and flashed correctly. I am using the nvidia agx orin 64gb dev kit and following the custom kernel guide for 35.4.1 (for jetpack 5.1.2):

https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/SD/Kernel/KernelCustomization.html

I am using the sample root filesystem in the drivers section of:

There are three steps after building the kernel:

  1. Replace nvgpu.ko file in Linux_for_Tegra/rootfs/usr/lib/modules/$(uname -r)/kernel/drivers/gpu/nvgpu/. This is copied directly to rootfs so seems like it will be present after flash.

  2. Replace Linux_for_Tegra/kernel/dtb/ with files from kernel_out/arch/arm64/boot/dts/nvidia/. These are not in the example rootfs so I just presumed they would be copied over in some fashion during flashing.

  3. Replace Linux_for_Tegra/kernel/Image with the file from kernel_out/arch/arm64/boot/Image. This is also not in the example rootfs so I again I presumed this file would be copied over in some fashion during flashing.

I have de-compiled the file from .dtb to .dts and I do see some entries for imx274, imx185, etc… So are the files specified in the DTB_FILE and OVERLAY_DTB_FILE in the jetson-agx-orin-devkit.conf just merged together and copied over as one file to /boot/dtb/kernel_tegra234-p3701-0005-p3737-0000.dtb? This seems odd since the other dtb and dtbo files in the sample rootfs are just copied over.

It seems like it would be hard to confirm if the dtb files are actually copied over and applied. I was using ls -l to see the timestamp on the files to see if they are from the original example rootfs or the ones compiled during the kernel build step. The nv_gpu.ko file, Image file, and /boot/dtb/kernel_tegra234-p3701-0005-p3737-0000.dtb are definitely new files after flashing and checking with ls -l on the orin but I am not seeing the dtbo files copied over in step 3) if that makes sense.

Thanks,

-Justin

dtbo is the overlay dtb which will only take effect is specific condition matches.

If the condition matches, then that change will happen.

For example, if this is p3701-0005 board, then set xxx driver status = “okay” in device tree.

dtb is the base btb that will have the contain before overlay applied.

One easiest way to check whether a new device tree is applied correctly is: you just add a arbitrary string in your device tree. If that thing does not affect any other driver ,then it is fine to just add it anywhere. Check /proc/device-tree and see if corresponding location has this string or not. If it has, then device tree is applied correctly. And vice versa.

Hi,
Please check the quick start in developer guide and make sure you follow the steps one by one:
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/IN/QuickStart.html
If the device still cannot be flashed/booted, please refer to the page to get uart log from the device:
https://elinux.org/Jetson/General_debug
If you are using custom board, you can compare uart log of developer kit and custom board to get more information.

Thanks!

hmm, I’m thinkin I need to read more about linux device trees and possibly parse the flash.sh script to see what’s really going on, I’ll post back here if I can answer my original question.

I don’t think parsing flash.sh is really necessary… do the previous check I mentioned should be the easiest way.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.