Jetson TX2 replacing DTB

I have replaced the default TX2 DTB using the following procedure.

  1. Note the build time of the current DTB using
    $ cat /proc/device-tree/nvidia,dtbbuildtime
    May 17 201800:17:47
  2. Decompile the current DTB using
    $ dtc -I fs -O dts -o tree_from_proc.dts /proc/device-tree
  3. Edit the source dts file, eg change the dtbbuildtime to now
  4. Recompile the DTB using
    DTC_FLAGS="-S 524288"
    OUTPUT_DTB=tegra186-quill-p3310-1000-c03-00-base.dtb
    dtc -I dts -O dtb {DTC_FLAGS} -o {OUTPUT_DTB} tree_from_proc.dts
  5. Copy the new DTB to /boot, change the user and group attributes to ‘ubuntu’
  6. Add the following line to /boot/extlinux/extlinux.conf
    FDT /boot/tegra186-quill-p3310-1000-c03-00-base.dtb
  7. Reboot and test for the new DTB using
    $ cat /proc/device-tree/nvidia,dtbbuildtime
    Feb 12 201900:12:15

This worked fine however to test it further I wiped the DTB partitions, which I assumed were no longer used or required. I used the commands
dd if=/dev/zero of=/dev/mmcblk0p26 dd if=/dev/zero of=/dev/mmcblk0p27

After wiping these partitions, I could no long boot the device and I had to reflash these using
$ sudo ./flash.sh -r -k kernel-dtb jetson-tx2 mmcblk0p1

Why is there still a dependancy on these partitions?

Newer L4T releases don’t use the FDT entry. What happens is that earlier boot stages now need access to the device tree and do not have the ability to mount or read an ext4 file system. This implies the need to migrate device tree into a partition as binary data.

U-Boot itself can still read a device tree, but it will be hit or miss random results when using FDT from the boot directory. The reason is that earlier boot stages now pass device tree along to the next stage. Prior to passing the tree along some minor edits are made. In some cases an external DTB file might work, but chances are some edited component is going to disagree with the file version and cause problems (or the reverse situation where the edit needed to be visible to early boot stages but the edit is missing). The way to deal with this is to leave out the FDT entry in extlinux.conf and use only the partition. I do keep the running DTB in “/boot” for reference, but do not use the FDT entry.