On 2026-08-26 14:15 +0200, Ahmad Fatoum wrote: > CONFIG_EXTERNAL_DTS_FRAGMENTS can't be used with the EFI payload, because > it has no internal DT at build-time and until recently not even a DT at > runtime. > > This series adds the necessary bits to have this work the same on > non-EFI-payload platforms. > > @Fabian, can you give this a test? > > Ahmad Fatoum (4): > efi: payload: ignore ESP state.dtb if device tree is populated > kbuild: dtc: introduce empty fallback device tree > efi: payload: export device tree in barebox-dtb EFI variable > Documentation: efi: describe device tree handling > > Documentation/boards/efi.rst | 75 ++++++++++++++++++++++++++++++++++-- > Documentation/user/state.rst | 5 +++ > arch/arm/dts/Makefile | 2 + > arch/riscv/dts/Makefile | 2 + > arch/x86/Kbuild | 2 + > arch/x86/dts/Makefile | 5 +++ > common/fallback.dts | 10 +++++ > efi/payload/boarddata.c | 11 ------ > efi/payload/fdt.c | 53 +++++++++++++++++++++++++ > efi/payload/handover.c | 2 + > efi/payload/image.c | 2 + > efi/payload/init.c | 16 ++++++++ > include/efi/payload.h | 6 +++ > scripts/Makefile.dtbs | 10 +++++ > 14 files changed, 186 insertions(+), 15 deletions(-) > create mode 100644 arch/x86/dts/Makefile > create mode 100644 common/fallback.dts > > -- > 2.47.3 > > > > does this work for using state fragment on arm platforms? I tried quickly to compile with a dtsi for RPi4 and get an error because the emmc label is not known for RPi3.
For EFI it works on both qemu (x86/arm). make -j 8 CONFIG_EXTERNAL_DTS_FRAGMENTS=../barebox-arm64-poc/state-rpi.dtsi UPD include/generated/utsversion.h ENV arch/arm/boards/raspberry-pi/defaultenv-rpi.bbenv DTC arch/arm/dts/fallback.dtb ENV defaultenv/barebox_default_env CC [P] common/imd-barebox.pbl.o DTC arch/arm/dts/bcm2837-rpi-3.dtb DTC arch/arm/dts/bcm2837-rpi-cm3.dtb ./../barebox-arm64-poc/state-rpi.dtsi:11.8-78.4: ERROR (phandle_references): /state: Reference to non-existent node or label "emmc2" ERROR: Input tree has errors, aborting (use -f to force output) make[4]: *** [scripts/Makefile.dtbs:100: arch/arm/dts/fallback.dtb] Error 2 make[4]: *** Waiting for unfinished jobs.... ENV defaultenv/defaultenv-2-base.bbenv ./../barebox-arm64-poc/state-rpi.dtsi:11.8-78.4: ERROR (phandle_references): /state: Reference to non-existent node or label "emmc2" ERROR: Input tree has errors, aborting (use -f to force output) make[4]: *** [scripts/Makefile.dtbs:95: arch/arm/dts/bcm2837-rpi-cm3.dtb] Error 2 CC common/version.o ./../barebox-arm64-poc/state-rpi.dtsi:11.8-78.4: ERROR (phandle_references): /state: Reference to non-existent node or label "emmc2" ERROR: Input tree has errors, aborting (use -f to force output) make[4]: *** [scripts/Makefile.dtbs:95: arch/arm/dts/bcm2837-rpi-3.dtb] Error 2 make[3]: *** [scripts/Makefile.build:468: arch/arm/dts] Error 2 make[2]: *** [scripts/Makefile.build:468: arch/arm] Error 2 make[2]: *** Waiting for unfinished jobs.... AR common/built-in.pbl.a AR common/built-in.a make[1]: *** [/home/anicha1/sources/barebox-intern/Makefile:1801: .] Error 2 make: *** [Makefile:200: __sub-make] Error 2 best regards. Anis
