All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] image-fdt: save name of FIT configuration in '/chosen' node
@ 2022-04-12 20:00 Daniel Golle
  2022-04-12 20:14 ` Tom Rini
  2022-04-20 13:12 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Daniel Golle @ 2022-04-12 20:00 UTC (permalink / raw)
  To: u-boot; +Cc: Heinrich Schuchardt, Tom Rini

It can be useful for the OS (Linux) to know which configuration has
been chosen by U-Boot when launching a FIT image.
Store the name of the FIT configuration node used in a new string
property called 'u-boot,bootconf' in the '/chosen' node in device tree.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
v2: change node name to 'u-boot,bootconf' instead of just 'bootconf'

Sibling PR to dt-schema: https://github.com/devicetree-org/dt-schema/pull/71

 boot/image-fdt.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/boot/image-fdt.c b/boot/image-fdt.c
index 692a9ad3e4..fdb69926a2 100644
--- a/boot/image-fdt.c
+++ b/boot/image-fdt.c
@@ -601,6 +601,12 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,
 		goto err;
 	}
 
+	/* Store name of configuration node as u-boot,bootconf in /chosen node */
+	if (images->fit_uname_cfg)
+		fdt_find_and_setprop(blob, "/chosen", "u-boot,bootconf",
+					images->fit_uname_cfg,
+					strlen(images->fit_uname_cfg) + 1, 1);
+
 	/* Update ethernet nodes */
 	fdt_fixup_ethernet(blob);
 #if CONFIG_IS_ENABLED(CMD_PSTORE)
-- 
2.35.1


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

* Re: [PATCH v2] image-fdt: save name of FIT configuration in '/chosen' node
  2022-04-12 20:00 [PATCH v2] image-fdt: save name of FIT configuration in '/chosen' node Daniel Golle
@ 2022-04-12 20:14 ` Tom Rini
  2022-04-20 13:12 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-04-12 20:14 UTC (permalink / raw)
  To: Daniel Golle; +Cc: u-boot, Heinrich Schuchardt

[-- Attachment #1: Type: text/plain, Size: 450 bytes --]

On Tue, Apr 12, 2022 at 09:00:43PM +0100, Daniel Golle wrote:

> It can be useful for the OS (Linux) to know which configuration has
> been chosen by U-Boot when launching a FIT image.
> Store the name of the FIT configuration node used in a new string
> property called 'u-boot,bootconf' in the '/chosen' node in device tree.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>

Reviewed-by: Tom Rini <trini@konsulko.com>

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

* Re: [PATCH v2] image-fdt: save name of FIT configuration in '/chosen' node
  2022-04-12 20:00 [PATCH v2] image-fdt: save name of FIT configuration in '/chosen' node Daniel Golle
  2022-04-12 20:14 ` Tom Rini
@ 2022-04-20 13:12 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2022-04-20 13:12 UTC (permalink / raw)
  To: Daniel Golle; +Cc: u-boot, Heinrich Schuchardt

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

On Tue, Apr 12, 2022 at 09:00:43PM +0100, Daniel Golle wrote:

> It can be useful for the OS (Linux) to know which configuration has
> been chosen by U-Boot when launching a FIT image.
> Store the name of the FIT configuration node used in a new string
> property called 'u-boot,bootconf' in the '/chosen' node in device tree.
> 
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> Reviewed-by: Tom Rini <trini@konsulko.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

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

end of thread, other threads:[~2022-04-20 13:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-12 20:00 [PATCH v2] image-fdt: save name of FIT configuration in '/chosen' node Daniel Golle
2022-04-12 20:14 ` Tom Rini
2022-04-20 13:12 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.