How can I load the device tree from /boot/dtb/?

The system is on an NVMe drive, and after replacing a new core board, when I run the command “sudo ./flash jetson-xavier-nx-devkit-emmc external,” and update the device tree in /boot/dtb/, I notice that the device tree is not being loaded from /boot/dtb/. How can I restore loading the device tree from /boot/dtb/?

Is the NVMe drive already flashed with a running system?
Maybe your device still boot into the eMMC instead of the NVMe drive.
What do you have with df -h and /boot/extlinux/extlinux.conf?

Yes, the system has been previously written to the hard drive.

nvidia@nx:~$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/nvme0n1p1  939G   12G  889G   2% /
none            3.5G     0  3.5G   0% /dev
tmpfs           3.8G   40K  3.8G   1% /dev/shm
tmpfs           3.8G   30M  3.8G   1% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           3.8G     0  3.8G   0% /sys/fs/cgroup
tmpfs           777M  108K  777M   1% /run/user/1000
/dev/mmcblk0p1   14G   76M   13G   1% /media/nvidia/5f5b7c85-f14d-4813-b0ad-72e8f59a1c0e1
nvidia@nx:~$
nvidia@nx:~$ cat /boot/extlinux/extlinux.conf
TIMEOUT 30
DEFAULT primary

MENU TITLE L4T boot options

LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      FDT /boot/dtb/tegra194-p3668-all-p3509-0000.dtb
      INITRD /boot/initrd
      APPEND ${cbootargs} quiet root=PARTUUID=5ae390fc-5a9d-4800-8fe4-b9e2b49fd6ee rw rootwait rootfstype=ext4 console=ttyTCU0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0

# When testing a custom kernel, it is recommended that you create a backup of
# the original kernel and add a new entry to this file so that the device can
# fallback to the original kernel. To do this:
#
# 1, Make a backup of the original kernel
#      sudo cp /boot/Image /boot/Image.backup
#
# 2, Copy your custom kernel into /boot/Image
#
# 3, Uncomment below menu setting lines for the original kernel
#
# 4, Reboot

# LABEL backup
#    MENU LABEL backup kernel
#    LINUX /boot/Image.backup
#    INITRD /boot/initrd
#    APPEND ${cbootargs}

Is 5ae390fc-5a9d-4800-8fe4-b9e2b49fd6ee pointing to the NVMe drive?
Then how did you confirm changes in device tree did not take effect?

Or you changed the UEFI boot mode so it does not load kernel/dtb from the rootfs?
https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/SD/Bootloader/UEFI.html#customizing-the-default-boot-mode-in-the-uefi-menu

How should I verify this?

confirm this by using the command: dmesg | grep DTB .

How do I modify the UEFI boot mode?

sudo blkid gives you the answer.

Have you decompiled and checked both kernel dtb in /boot/dtb/ on both eMMC and NVMe?
I feel like only one of them is updated.

For the boot mode, UEFI by default reads the kernel/dtb from rootfs instead of dedicated partitions, so if you don’t remember changing such settings, it should not be an issue.

Also, I think the command sudo ./flash jetson-xavier-nx-devkit-emmc external updates /boot/extlinux/extlinux.conf so rootfs is mounted over NVMe, but kernel and dtb are still loaded from eMMC.

Check the boot order in UEFI and make sure it boots from NVMe.

5ae390fc-5a9d-4800-8fe4-b9e2b49fd6ee is pointing to the NVMe drive?

After switching back to the previous core board and updating the device tree several times, I can now update it again using /boot/dtb after switching back to the new core board.

How should I check the boot order in UEFI?

It’s stated in our document:
https://docs.nvidia.com/jetson/archives/r35.4.1/DeveloperGuide/text/SD/Bootloader/UEFI.html#selecting-the-boot-device-in-the-uefi

You have to know that booting from a certain device does not necessarily mean the rootfs is also mounted over the same device; for example, you can boot from eMMC, meaning kernel and dtb is loaded from eMMC, but mount rootfs over NVMe as specified in /boot/extlinux/extlinux.conf.

On the landing page of UEFI menu options, when you are prompted to Press ESCAPE for boot options, navigate to Boot Manager and select an option from this list.

I couldn’t find a place to input ESC, possibly because I’m using a lower version of the system. However, in the default sequence of the system I’m using, NVMe is before eMMC.

[0002.279] I> Using default boot order
[0002.282] I> boot-dev-order :-
[0002.285] I> 1.sd
[0002.287] I> 2.usb
[0002.289] I> 3.nvme
[0002.291] I> 4.emmc
[0002.293] I> 5.net
[0002.295] I> Hit any key to stop autoboot: 

I’m aware of this; I should set the NVMe drive as both the boot and system drive.

Well, I forgot to ask what L4T version you are using, and looks like you are using 32.x, which uses U-boot instead of UEFI.

Anyway, is it still considered an issue now?

Now it’s working fine. Thank you!

1 Like

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