[PATCH 1/4] bootstd: add a firmware-owned devicetree source

Tom Rini trini at konsulko.com
Wed Jul 8 19:18:06 CEST 2026


On Mon, Jul 06, 2026 at 05:06:42PM +0200, Carlo Caione wrote:

> Platforms following EBBR / Arm SystemReady IR keep the devicetree on
> a firmware-owned partition, updated independently of the operating
> system, rather than shipping it in the OS image or on the EFI System
> Partition. U-Boot has no generic way to source the devicetree from such
> a partition, so vendors carry out-of-tree machinery for it.
> 
> Add a bootstd helper, firmware_fdt_load(), that assembles the OS
> devicetree from a FIT manifest carried on that partition: the FIT images
> hold the base DTB and its overlays, and each FIT configuration names one
> bootable combination through its 'fdt' property.
> 
> The partition is described in the control devicetree: the bootstd node
> carries a 'firmware-fdt-source' phandle to a source node, a child of
> the media device owning the partition, which identifies it by GPT type
> UUID and/or name. The 'boot_dtb' environment variable may pin an A/B
> partition number.
> 
> The error semantics are fail closed: -ENOENT strictly means "no source
> configured" (the only case where callers may fall back to their normal
> devicetree); once a source is configured, any assembly failure is
> fatal, and downstream -ENOENT codes (missing manifest, missing FIT
> configuration) are remapped so a missing or bad firmware devicetree is
> never silently replaced by an unverified one. Manifest images carrying
> a 'load' property are rejected so a misbuilt manifest cannot overwrite
> arbitrary memory.
> 
> Signed-off-by: Carlo Caione <ccaione at baylibre.com>
> ---
>  MAINTAINERS                               |   3 +
>  boot/Kconfig                              |  23 ++
>  boot/Makefile                             |   1 +
>  boot/firmware_fdt.c                       | 382 ++++++++++++++++++++++++++++++
>  doc/develop/bootstd/firmware_fdt.rst      |  94 ++++++++
>  doc/develop/bootstd/index.rst             |   1 +
>  doc/device-tree-bindings/firmware-fdt.txt | 149 ++++++++++++

I think I wasn't clear enough on the RFC, sorry. We need to get this
binding approved over in https://github.com/devicetree-org/dt-schema/
and I strongly suspect that barebox would be able to make use of this
too, so a u-boot prefix would be inappropriate.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20260708/a7a2a09c/attachment.sig>


More information about the U-Boot mailing list