fdt_overlay_apply(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ fdt_overlay_apply(9) ✨

okay bestie, this one is straight outta the Kernel API Manual and it's literally about slapping a device tree overlay onto a base device tree. main character energy for embedded girlies πŸ’…


🌸 NAME 🌸

fdt_overlay_apply β€” Applies a DT overlay on a base DT


πŸŽ€ SYNOPSIS πŸŽ€

int fdt_overlay_apply (void *fdt , void *fdto );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • fdt β€” pointer to the base device tree blob
  • fdto β€” pointer to the device tree overlay blob

πŸ’– DESCRIPTION πŸ’–

So fdt_overlay_apply will apply the given device tree overlay on the given base device tree. That's the vibe. It takes your overlay blob and does its little merge moment onto the base blob.

⚠️ okay but listen: expect the base device tree to be modified, even if the function returns an error. like… do not assume a failed return means the base DT is untouched. that part is important, no cap 😭

πŸ”₯ RETURN πŸ”₯

The return type is int, and here's the whole mood ring:

  • 0 β€” on success, we love that for us πŸ’–
  • -FDT_ERR_NOSPACE β€” there's not enough space in the base device tree
  • -FDT_ERR_NOTFOUND β€” the overlay points to some nonexistent nodes or properties in the base DT
  • -FDT_ERR_BADPHANDLE, -FDT_ERR_BADOVERLAY, -FDT_ERR_NOPHANDLES, -FDT_ERR_INTERNAL, -FDT_ERR_BADLAYOUT, -FDT_ERR_BADMAGIC, -FDT_ERR_BADOFFSET, -FDT_ERR_BADPATH, -FDT_ERR_BADVERSION, -FDT_ERR_BADSTRUCTURE, -FDT_ERR_BADSTATE, -FDT_ERR_TRUNCATED β€” standard meanings

🌈 SEE ALSO 🌈

Kernel file: ./scripts/dtc/libfdt/libfdt.h β€” go read it, iykyk 🫢


cute little sign-off bestie: source/version is ./scripts/dtc/libfdt, dated October 2026. mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from