unflatten_an..._device_tree(9)
β¨ unflatten_an..._device_tree(9) β¨
okay bestie, welcome to the Kernel API Manual π this one is a lil function from the kernel's device-tree corner of the universe and honestly it's giving "quiet but crucial," iykyk π
πΈ NAME πΈ
unflatten_and_copy_device_tree β copy and create tree of device_nodes from flat blob π¦
like... it copies AND it unflattens? she does it all, no cap π
β SYNOPSIS β
void unflatten_and_copy_device_tree (void );
π§ ARGUMENTS π§
voidβ no arguments. that's it. zero. nada. she takes nothing and she needs nothing πβ¨
π DESCRIPTION π
okay so picture this: the firmware hands over a device-tree, right? this function copies it and unflattens it, creating the tree of struct device_node. literally building the whole vibe from scratch π
it also fills in the "name" and "type" pointers of the nodes, so the normal device-tree walking functions can actually be used β like, the tree is fully functional after this, bestie, it's ready to be walked π«Ά
β οΈ highkey important: this should only be used when the FDT memory has not been reserved β such is the case when the FDT is built-in to the kernel init section. if the FDT memory is reserved already, then unflatten_device_tree should be used instead. not optional, fr fr, respect the reservation rules π
π₯ SEE ALSO π₯
- Kernel file
./drivers/of/fdt.cβ the actual home of the drama π unflatten_dt_nodes(9)__unflatten_device_tree(9)of_fdt_unflatten_tree(9)early_init_fdt_scan_reserved_mem(9)early_init_fdt_reserve_self(9)of_scan_flat_dt(9)of_scan_flat_dt_subnodes(9)of_get_flat_dt_subnode_by_name(9)of_fdt_is_compatible(9)of_flat_dt_is_compatible(9)of_flat_dt_match_machine(9)early_init_dt_check_for_initrd(9)early_init_dt_check_for_elfcorehdr(9)early_init_dt_check_for_usable_mem_range(9)early_init_dt_check_kho(9)unflatten_device_tree(9)β the one you use when the FDT memory is reserved, bestie, don't mix them up π
and that's the whole page, bestie, you ate that reading π β¨
source/version: ./drivers/of Β· date: October 2026 Β· unflatten_an..._device_tree(9) ππ¦π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms