How to upgrade the dtb file when change the dts file

Hi,
I want to ask the following two question:

1.The u-boot and kernel use the same dtb file?
2. What is the steps? when I update the dts file.

Thanks,

Martin

The answer depends on the release, and on which dts you changed. Can you elaborate on what is currently flashed to the TX1? I am assuming R28.1 which is easy to deal with, but if you used a later release then it complicates things (see “head -n 1 /etc/nv_tegra_release” for release version).

I’m using R28.2 on TX1.
I’m not sure which dts file,But it is possible that we will need to change the dts file on uboot and kernel.
Are there details step on what to do when we change those dts file?
Which dts file is for uboot using?
which dts file is for kernel using?

R28.2 complicates things, and device tree is no longer just a file to copy. Some of the earlier boot stages (prior to U-Boot) require device tree information starting with this release. These earlier stages do not have the ability to read ext4, and so the dtb migrates to a partition. There is also some signing added (secure boot is being developed), and so even dd can’t just put the binary in the right partition.

Before you do anything, if you have valuable content on the TX1, then I suggest you clone the rootfs partition. Some steps presumably won’t overwrite the rootfs, but if you have clone replacing “Linux_for_Tegra/bootloader/system.img”, then even if a flash of rootfs occurs, then the flash will simply be the rootfs that was already there. Once you know your steps won’t get in the way of rootfs (or if you do not care about risk of loss), then you can simply flash the device tree and not bother with clone steps. If you want to clone, just ask. Note that a clone produces both a smaller “backup.img” file, and also a “backup.img.raw” file which is larger (nearly 16GB). Both work, but I throw away the smaller file because all it is good for is flashing. For information see:
https://devtalk.nvidia.com/default/topic/1005936/jetson-tx1/tx1-flash-problem/post/5135740/#5135740

The official docs do give information on device tree modification, see the “Documentation” download here (may require login, and then hitting the link a second time):
https://developer.nvidia.com/embedded/linux-tegra-r282

The short version of flashing a device tree is this after copying the right dtb file into the correct place:

sudo ./flash.sh -r -k DTB jetson-tx1 mmcblk0p1

The specific file to replace just depends on a few things, e.g., the carrier board (there may be different revisions). For a dev kit the typical file to replace (back this up if you can) is:

Linux_for_Tegra/kernel/dtb/<b>tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb</b>

If you want to log the flash and verify later that the correct file was flashed (and if not you will know which one was correct, and if you saved a backup then you can just move the old one back in place if it is wrong):

sudo ./flash.sh -r -k DTB jetson-tx1 mmcblk0p1 <b>2>&1 | tee dtb_flash_log.txt</b>

Note: Never flash from one L4T release to another, the non-rootfs files are incompatible, so stick with R28.2 driver package (JetPack would have downloaded this and created the “Linux_for_Tegra/” directory if you’ve ever used JetPack).