Device tree

From Wikipedia, the free encyclopedia
Jump to: navigation, search

The device tree is a data structure for describing hardware, which originated from Open Firmware. The data structure can hold any kind of data as internally it is a tree of named nodes and properties. Nodes contain properties and child nodes, while properties are name–value pairs.

As an example, Das U-Boot and kexec include support for device trees.

Usage in Linux[edit]

Given the correct device tree, the same compiled kernel can support different hardware configurations within a wider architecture family. The Linux kernel can read device tree information in the ARM, x86, MicroBlaze, PowerPC, and SPARC architectures. For ARM, use of device trees has become mandatory for all new SoCs.[1] This can be seen as a remedy to the vast number of forks (of Linux and Das U-boot) that has historically been created to support (marginally) different ARM boards. Allegedly, the purpose is to move a significant part of the hardware description out of the kernel binary, and into the compiled device tree blob, which is handed to the kernel by the bootloader, replacing a range of board specific C source files and compile time options in the kernel.[2]

It has been customary of ARM-based Linux distributions to include a bootloader, that necessarily was customised for specific boards, for example Raspberry Pi or Hackberry A10. This has created problems for the creators of Linux distributions as some part of the operating system must be compiled specifically for every board variant, or updated to support new boards. However, some modern SoCs (for example, Freescale i.MX6) have a vendor provided bootloader with device tree on a separate chip from the operating system.[3]

A proprietary configuration file format used for similar purposes, the FEX file format,[4] is a de facto standard among Allwinner SoCs.

See also[edit]

References[edit]

External links[edit]