Converting From Binary (.dtb) To Human-Readable (.dts) Device Tree Files
Yocto normally produces
.dtb (Device Tree Blob) files when you are building an image. These are in a binary format. While this format is great for loading onto your target system, it’s not very good for developing/debugging. Luckily, you can convert a Device Tree Blob (
.dtb) file back into a human-readable Device Tree Source (.dts) file.
The program that can do this is called
dtc (Device Tree Compiler). This program is downloaded when you perform a Yocto build and should be in the
/usr/bin/ folder within the host
sysroot directory (e.g.
The following command converts the device tree blob file
devicetree.dtb into a human-readable device tree source file (
$ build/tmp/sysroots/x86_64-linux/usr/bin/dtc -I dtb -O dts -o devicetree.dts devicetree.dtb
.dts file is much more useful to a developer than the
.dtb file, and can be inspected to make sure the Yocto build is configured correctly!