[PATCH] fdt: Allow OF_HAS_PRIOR_STAGE to be disabled in defconfig
Simon Glass
sjg at chromium.org
Thu Apr 3 19:53:49 CEST 2025
At present it is impossible to change the qemu_arm64 defconfig to
obtain a devicetree from the U-Boot build.
This is necessary for FIT validation, for example, where the signature
node must be compiled into U-Boot.
A proposed change to QEMU has been blocked for several years. As a
workaround, the only option is to use QEMU's dumpdtb option, merge in
the signature node manually and then disable OF_HAS_PRIOR_STAGE
Unfortunately the only way to disable OF_HAS_PRIOR_STAGE at present is
to hack the Kconfig. So update it to allow use from defconfig. This
avoids needing to patch U-Boot to get this working.
Signed-off-by: Simon Glass <sjg at chromium.org>
Link: https://patchwork.kernel.org/project/qemu-devel/patch/20210926183410.256484-1-sjg@chromium.org/#24481799
---
dts/Kconfig | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/dts/Kconfig b/dts/Kconfig
index 2e88d210bb8..2fe4468d1a9 100644
--- a/dts/Kconfig
+++ b/dts/Kconfig
@@ -190,7 +190,7 @@ config OF_BOARD
earlier stage should enable OF_HAS_PRIOR_STAGE.
config OF_HAS_PRIOR_STAGE
- bool
+ bool "Device tree comes from prior-stage firmware"
help
Indicates that a prior stage of the firmware (before U-Boot proper)
makes use of device tree and this board normally boots with that prior
@@ -205,8 +205,13 @@ config OF_HAS_PRIOR_STAGE
development purposes, but it is not recommended, and likely will not
even work, for production systems.
- Note: This option must be set in Kconfig and cannot be enabled or
- disabled in the board's defconfig file.
+ Note: This option can be updated in the board's defconfig file if
+ needed. E.g. for QEMU to support FIT validation the devicetree must
+ include a public key.
+
+ See also this for context:
+
+ https://patchwork.kernel.org/project/qemu-devel/patch/20210926183410.256484-1-sjg@chromium.org/#24481799
config OF_OMIT_DTB
bool "Omit the device tree output when building"
--
2.43.0
More information about the U-Boot
mailing list