FYI, there is a build target in the kernel source to build a device tree. This isn’t actually a kernel being built unless you build the kernel target (
Image). The content of a device tree is more or less a list of arguments to pass to the kernel (mostly to drivers), and thus if your kernel source matches the system you are running, then the device tree produced will be for the correct drivers.
You could find a given device tree, decompile it to source code format, edit, and then recompile (preferably with a new name, then just use the new name in the “
extlinux.conf” without removing the original entry…best to test with the original entry still available). Examples:
# Decompile a binary:
dtc -I dtb -O dts -o extracted.dts SomeOriginalTree.dtb
dtc -I dts -O dtb -o ModifiedSomeOriginalTree.dtb extracted.dts
.dtsi” files are just pieces of content which might get passed to a device driver. When a kernel is configured (using Kconfig system), then it assembles all of the smaller fragments. The result is reversible via decompile.