The Device Tree (DT) is a data structure for describing hardware components of a system in a tree format. Linux uses it to communicate hardware details to the kernel, enabling better hardware-software abstraction. Instead of hardcoding device configurations in the kernel, DT allows them to be described in a separate, flexible format, typically using .dts (Device Tree Source) files. These files are compiled into a binary form, .dtb, which the kernel reads during boot to understand hardware specifics, like memory, CPU, and peripherals, which may vary across systems.

  • Structure: Hierarchical, tree-like; each node represents a device or a bus.
  • Flexibility: Supports embedded systems where hardware configurations vary widely.
  • Key Files: .dts (source), .dtb (binary), and .dtsi (includes, for shared definition

Info

While the device-tree is a static file whose file path is typically passed to the kernel by the bootloader on the command line, a device-tree overlay facility has been added in recent years, where the kernel can dynamically load additional fragments in response to hotplug events after boot.