Flat Device Tree


flat_device_tree started as a fork of device_tree-rs.

The original code is no longer being maintained, and required some modernizing since the last commit was a number of years ago.

Certain design decisions made it prohibitively difficult to port to a full no-alloc library, so the fork rebased on fdt.

The current code is still a friendly fork of fdt.

fdt is actively maintained, and code is contributed back on a regular basis.

Purpose

flat_device_tree is a flattened device tree parser compatible with no-std and no-alloc environments.

Device tree describes basic hardware information for a platform.

The tree contains a root node, with certain required property attributes to describe things like memory regions, model name, etc.

Child nodes are used to enumerate device cpus and soc peripherals.

The compatible property is used to list compatibility strings in most-specific to least-specific order.

Flattened device tree files are very useful for peripheral discovery, device parameters, and CPU information to OS/firmware consumers.

It fits a niche similar to ACPI in the x86 world.