Modifying Jetson TX2 Device Tree without having to flash TX2

Currently I am in the process of creating loadable camera kernel modules and must modify the device tree to do so. I am using L4T 32.1 Jetpack, which is running 4.9.140 tegra. I was wondering if there was a way to modify the device tree without having to flash the device tree with the TX2 in recovery mode? I am able to compile and boot new images on the TX2 itself by placing the newly built images in the /boot direcotry. If there was a similar method for modifying the device tree, that would be ideal. Thanks

hello gauchos2,

there’s an alternative way besides flashing the board to update device tree.
due to Jetson TX2 Boot Flow, you’ll need to generate signed, encrypted files through the flash scripts.
please refer to Flashing and Booting the Target Device session for the details,
for example,

$ sudo ./flash.sh --no-flash -r -k kernel-dtb jetson-tx2 mmcblk0p1

these signed files would saved locally as below,

$OUT/Linux_for_Tegra/bootloader/signed/

you should run below commands on your target to check the partition labels
for example,

$ ls -al /dev/disk/by-partlabel
...
i.e. kernel-dtb -> ../../mmcblk0p26

then you should use the dd commands to overwrite dtb partition, and perform warm-reboot to take effect.
for example,

$ sudo dd if=tegra_sigheader.dtb.encrypt of=/dev/mmcblk0p26 bs=1M
$ sudo reboot

BTW,
here’s similar topic, Topic 1044296 for your reference.
thanks

Thanks for the quick response. I was wondering how does the dd command know that the signed dtb files are located in $OUT/Linux_for_Tegra/bootloader/signed/ folder?

hello gauchos2,

you’ll need to copy the signed files to your target, then using dd commands to update the partition.

$ scp tegra.dtb nvidia@1.2.3.4:/tmp/

Thanks that did the trick