9.1. DTB files
Files that contain device trees have the .dtb
extension when compiled, and .dts
when in text form.
You can convert between those formats with:
"$(./getvar buildroot_host_dir)"/bin/dtc -I dtb -O dts -o a.dts a.dtb "$(./getvar buildroot_host_dir)"/bin/dtc -I dts -O dtb -o a.dtb a.dts
Buildroot builds the tool due to BR2_PACKAGE_HOST_DTC=y
.
On Ubuntu 18.04, the package is named:
sudo apt-get install device-tree-compiler
Device tree files are provided to the emulator just like the root filesystem and the Linux kernel image.
In real hardware, those components are also often provided separately. For example, on the Raspberry Pi 2, the SD card must contain two partitions:
-
the first contains all magic files, including the Linux kernel and the device tree
-
the second contains the root filesystem