Skip to content

dtoolkit

Rust CI crates.io Documentation

A library for parsing and manipulating Flattened Device Tree (FDT) blobs.

This library provides a comprehensive API for working with FDTs, including:

  • An in-place API for parsing, traversing, and modifying FDTs without memory allocation.
  • An intermediate representation API for creating and modifying FDTs using computationally efficient data structures.
  • Support for applying device tree overlays.
  • Outputting device trees in DTS source format.

The library is written purely in Rust and is #![no_std] compatible. If you don't need the Device Tree manipulation functionality, the library is also no-alloc-compatible.

Getting Started

Real-world examples of how to use the library, including parsing, editing in-place, and applying device tree overlays, can be found in the API documentation.

License

This software is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE for details.

Contributing

If you want to contribute to the project, see details of how we accept contributions.

Fuzzing

Fuzzing helps prevent unexpected panics and ensures correct behavior on unexpected inputs. The project uses cargo-fuzz, which is not part of the default Rust installation. It is recommended to run the relevant fuzzer for a while before pushing a change.

Install cargo-fuzz with:

cargo +nightly install cargo-fuzz

Run a fuzz target by name from the repository root:

cargo +nightly fuzz run <fuzzer name>

For example, to run the parse fuzzer:

cargo +nightly fuzz run parse

Disclaimer

This is not an officially supported Google product. This project is not eligible for the Google Open Source Software Vulnerability Rewards Program.

About

A Rust library for parsing and manipulating Flattened Device Tree (FDT) blobs.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

16 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages