DTS / DTB dump from a live system and recompile -> boot drive change

Hello,
I need to fix the DTB on my jetson tx2 + auvidea J130 carrier board.
The vendor doesn’t provide the correct dtsi to enable toshiba 358840 HDMI-to-CSI bridges.

I’m using a patched kernel provided by auvidea.

I’ve dumped the running DTB

dtc -I fs -O dts -o ./extracted.dts /proc/device-tree

and I’ve recompiled all

dtc -I dts -O dtb -o ./new.dtb ./extracted.dts

then I’ve added the entry in extlinux.conf using FDT …

after that the system boots from the SD not from the internal EMMC

as I can see bootargs in the dts is right and I’ve not changed anything

Do you have any hints?

If you use R28.1 the method of putting your dtb file in place has changed. The FDT key/value pair within extlinux.conf is no longer correct…you may get some mixed results or unexpected results. Is this R28.1? What follows assumes R28.1.

In R28.1 both the TX1 and TX2 are running the same sample rootfs. Their boot flow differs, and the dtb file is now in a hidden partition. See:
https://elinux.org/Jetson/TX2_DTB

There are some slight naming differences for TX1 versus TX2 in that URL, but it emphasizes what the syntax is for each.

The gist is that if you use “flash.sh” with the “-r” option and "-k " it only flashes that one partition…having your dtb file in the right place and then naming the dtb partition gives you a dtb update.

There is also a note from someone who used dd to populate that hidden partition without a host PC:
https://devtalk.nvidia.com/default/topic/1021660/jetson-tx1/is-there-any-other-method-in-l4t-r28-1-to-update-dtb-file-for-tx1-besides-flashing-the-dtb-partitio-/post/5200056/#5200056

yes, I’m using R28.1 and thank you for your hints

Is it possible to have multiple dtb ?

I need to start with the original dtb and add/test the missing parts.

The vendor is not supporting me so I have to solve the problem by myself.

I’ve the same problem …I’ve flashed dtb using the suggested method and now it boots from SD

:(

A dtb is a tree structure. If you have something which fits in the tree which the hardware/drivers support you can easily hand edit the dts file to insert your own tree or modify an existing tree for your tree.

In the kernel this is divided among some dts main files and some dtsi include files. The end result though is always a single dts file which ends up being compiled into a dtb format. There should be no issue if you can integrate your changes into an existing dts file, but you won’t be flashing separate dtb files for separate loads (though U-Boot and the kernel may have different ideas about what dtb is used each has a single device tree at any given moment in time…it kind of sounds like you want to know if you can use multiple dtb files instead of integrating into a single file, but I believe you can’t do that).

ok thank you, I will start with the stable dtb decompiled and then I will try to add the missing parts (mainly tc358840 related).

Is there any good documentation on how to work on dts?

I already have a dtc with the tc358840 parts from a similar project and I want to merge only the relevant parts.

You might be interested in this:
https://elinux.org/Device_Tree_Reference

thank you