overlay_apply_node(9)
π overlay_apply_node(9) β the kernel API manual, bestie edition π
okay so we're diving into overlay_apply_node(9) today and honestly? this one's kind of the moment. it's the final merge step of the whole device tree overlay saga, and yes, the manual name is literally right there in the title, we're already iconic β¨
πΈ NAME πΈ
overlay_apply_node β Merges a node into the base device tree π«Ά
β¨ SYNOPSIS β¨
int overlay_apply_node (void *fdt , int target , void *fdto , int node
);
like, that's the whole vibe. four args, one int back. no cap.
π ARGUMENTS π
fdtβ Base Device Tree blob. this is the main character, the tree everything gets merged into πtargetβ Node offset in the base device tree to apply the fragment to. basically "where we're dropping the goods" πfdtoβ Device tree overlay blob. the incoming chaos, the glow-up package π¦nodeβ Node offset in the overlay holding the changes to merge. the specific lil section of the overlay that's about to make its debut π
π₯ DESCRIPTION π₯
so overlay_apply_node merges a node into the target base device tree node it's pointed at. that's it, that's the job π
lowkey the lore here is that this is part of the final step in the device tree overlay application process β like, the last scene of the movie. by the time you get here, all the phandles have already been adjusted and resolved, and literally all that's left is to merge the overlay into the base device tree. everything's been prepped, the references are all sorted, and now we justβ¦ smoosh them together. periodt π«Άβ¨
ngl it's giving "finishing touch" energy and i'm obsessed.
π RETURN π
0on success π- Negative error code on failure π (bestie it failed, check your stuff)
π SEE ALSO π
- Kernel file
./scripts/dtc/libfdt/fdt_overlay.cβ that's where the magic lives, go read it iykyk π overlay_get_target_phandle(9)overlay_phandle_add_offset(9)overlay_adjust_node_phandles(9)overlay_adjust_local_phandles(9)overlay_update_local_node_references(9)overlay_update_local_references(9)overlay_fixup_one_phandle(9)overlay_fixup_phandle(9)overlay_fixup_phandles(9)overlay_adjust_local_conflicting_phandle(9)overlay_update_node_conflicting_references(9)overlay_update_local_conflicting_references(9)overlay_prevent_phandle_overwrite_node(9)overlay_prevent_phandle_overwrite(9)overlay_merge(9)overlay_symbol_update(9)
like, the whole friend group fr fr ππ
β οΈ quick vibe check: this is the merge step, so it assumes everything upstream (phandle adjusting, resolving, all of it) already happened. don't skip ahead, bestie, the order matters π
and that's the page!! this lil gem lives in ./scripts/dtc/libfdt, version dated October 2026, filed under the Kernel API Manual as overlay_apply_node(9) β go forth and merge responsibly, mwah πππ§ββοΈ
π¦ 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