BSDL Device Tree Compiler
|
Public Types | |
enum | phandle_format { LINUX, EPAPR, BOTH } |
typedef std::vector< std::pair < string, string > > | node_path |
Public Member Functions | |
node * | referenced_node (property_value &v) |
void | write_binary (int fd) |
void | write_asm (int fd) |
void | write_dts (int fd) |
device_tree () | |
void | parse_dtb (const char *fn, FILE *depfile) |
void | parse_dts (const char *fn, FILE *depfile) |
~device_tree () | |
bool | is_valid () |
void | set_phandle_format (phandle_format f) |
node * | get_root () const |
void | set_boot_cpu (uint32_t cpu) |
void | sort () |
void | add_include_path (const char *path) |
void | set_empty_reserve_map_entries (uint32_t e) |
void | set_blob_minimum_size (uint32_t s) |
void | set_blob_padding (uint32_t p) |
Class encapsulating the entire parsed FDT. This is the top-level class, which parses the entire DTS representation and write out the finished version.
typedef std::vector<std::pair<string,string> > dtc::fdt::device_tree::node_path |
Type used for node paths. A node path is sequence of names and unit addresses.
|
inline |
Default constructor. Creates a valid, but empty FDT.
|
inline |
Destroy the tree and any input buffers that it holds.
|
inline |
Adds a path to search for include files. The argument must be a nul-terminated string representing the path. The device tree keeps a pointer to this string, but does not own it: the caller is responsible for freeing it if required.
|
inline |
Returns a pointer to the root node of this tree. No ownership transfer.
|
inline |
Returns whether this tree is valid.
|
inline |
Constructs a device tree from the specified file name, referring to a file that contains a device tree blob.
|
inline |
Constructs a device tree from the specified file name, referring to a file that contains device tree source.
|
inline |
Returns the node referenced by the property. If this is a tree that is in source form, then we have a string that we can use to index the cross_references array and so we can just look that up.
|
inline |
Sets the minimum size, in bytes, of the blob.
|
inline |
Sets the amount of padding to add to the blob.
|
inline |
Sets the physical boot CPU.
|
inline |
Sets the number of empty reserve map entries to add.
|
inline |
Sets the format for writing phandle properties.
|
inline |
Sorts the tree. Useful for debugging device trees.
|
inline |
Writes this FDT as an assembly representation of the DTB to the specified output. The result can then be assembled and linked into a program.
|
inline |
Writes this FDT as a DTB to the specified output.
|
inline |
Writes the tree in DTS (source) format.