U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fdt: Allow OF_HAS_PRIOR_STAGE to be disabled in defconfig
@ 2025-04-03 17:53 Simon Glass
  2025-04-03 19:02 ` Tom Rini
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Glass @ 2025-04-03 17:53 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Tom Rini, Simon Glass, Caleb Connolly, Jan Kiszka,
	Jerry Van Baren, Marek Mojík, Marek Vasut, Neil Armstrong,
	Sumit Garg, This contributor prefers not to receive mails

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@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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-04-03 21:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-03 17:53 [PATCH] fdt: Allow OF_HAS_PRIOR_STAGE to be disabled in defconfig Simon Glass
2025-04-03 19:02 ` Tom Rini
2025-04-03 20:40   ` Simon Glass
2025-04-03 21:48     ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox