Device tree is a tree of setup instructions for various devices which have options better left out of the kernel (the kernel remains abstract, the specific settings stay in the device tree)…this is set prior to the kernel using those devices, e.g., loaded by the boot loader (the drivers depend on this being set up before loading the driver). Examples are whether a GPIO is to be I/O or some other purpose, or perhaps settings in a register which has options for a device. The file this is loaded from is a compiled binary format…this is the “DTB” file format for a device tree. The source code format is human readable and is the “DTS” file. The two can be compiled/de-compiled to change format.
In the kernel you can run “make dtbs” to put together a series of DTS files to produce a single DTB file. The DTB usually does not change, so most people never build a DTB. The location where U-Boot looks for a DTB file is in the FDT key/value pair entry of “/boot/extlinux/extlinux.conf”. Here is an example from R24.2.1:
If you wanted to examine a DTB, then edit it, and rebuild a DTB from the extracted DTS, here’s the recipe (this is often the place to verify kernel source changes made it in; in some cases this is also simpler to edit compared to building a kernel):
# Produce a DTS source file as "extracted.dts":
dtc -I dtb -O dts -o /tmp/extracted.dts /boot/the_firmware_in_extlinux.dtb
# Examine and perhaps edit "extracted.dts".
# Put edited DTS back into a new DTB as "modified.dtb":
dtc -I dts -O dtb -o /tmp/modified.dtb /tmp/extracted.dts
The only downside in simply reverse compiling a DTB to DTS format is that comments in the kernel source will be left out, and also some names may not match what is used in the kernel source.
Note that you can install package “dtc” and that this is not dependent upon architecture…most dtc from most systems work just find with a prepackaged dtc (such as from “apt-get search dtc” and "sudo apt-get install ". The kernel always has the source for this with it, and there is a “make dtc” target which produces a version of dtc guaranteed compatible with that kernel.