]> git.ipfire.org Git - thirdparty/u-boot.git/commit
fdtdec: apply DT overlays from bloblist
authorRaymond Mao <raymond.mao@linaro.org>
Fri, 18 Jul 2025 14:16:18 +0000 (07:16 -0700)
committerTom Rini <trini@konsulko.com>
Mon, 27 Apr 2026 15:42:36 +0000 (09:42 -0600)
commitb70cbbfbf94fdb50367a0884a9c44770b4c3bddc
tree8eaa0fd61aa23a66877911c2c14c50937de4f859
parent25baace94298bbe50a91f7b1b7470bf0eb5688fa
fdtdec: apply DT overlays from bloblist

During FDT setup, apply all existing DT overlays from the bloblist
to the base FDT if bloblist is being used for handoff from previous
boot stage.
According to the Firmware Handoff spec update to support DT overlay [1],
an overlay must have the same top-level compatible string as its target
base DT has.
Before applying the overlays, check whether sufficient space is
reserved in the base DT blob, if not, resize the blob to the allowed
padded size, which is limited by CONFIG_SYS_FDT_PAD and the bloblist
spare space size.
After all overlays are applied, resize the merged DT to its actual size.

[1] Add Transfer Entry for Devicetree Overlay
https://github.com/FirmwareHandoff/firmware_handoff/pull/74

Signed-off-by: Raymond Mao <raymond.mao@linaro.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Michal Simek <michal.simek@amd.com>
lib/fdtdec.c