dtb_parser

Crates.iodtb_parser
lib.rsdtb_parser
version0.2.3
sourcesrc
created_at2022-08-21 13:34:07.352462
updated_at2023-08-20 14:20:10.358212
descriptionno std but alloc depended device tree blob parsing lib
homepage
repositoryhttps://github.com/d3ara1n/dtb_parser
max_upload_size
id649770
size44,274
D3ara1n (d3ara1n)

documentation

README

dtb_parser

Usage

pub const BLOB: &[u8] = include_bytes!("device.dtb");

fn main() {
    let tree = DeviceTree::from_bytes(BLOB).unwrap();
    println!("{}", tree);

    assert!(!matches!(tree.find_node("/soc/pci@30000000"), None));
}

TODO

  • Tree&Node parsing
  • Property with inherited value (#address-cells etc)
  • Display trait for the whole tree (output has subtle differences with dts mainly in values presentation which affected by #<specifier>-cells)
  • PHandle binding
  • Nexus node and specifier mapping
  • The situation when #address-cells value set to 3
Commit count: 16

cargo fmt