2022-04-20 14:10:07 +00:00
|
|
|
From 5f2d5915f8ea4785bc2b8a26955e176a7898c15b Mon Sep 17 00:00:00 2001
|
2022-03-21 23:30:10 +00:00
|
|
|
From: Daniel Golle <daniel@makrotopia.org>
|
2022-04-20 14:10:07 +00:00
|
|
|
Date: Tue, 12 Apr 2022 21:00:43 +0100
|
2022-03-21 23:30:10 +00:00
|
|
|
Subject: [PATCH] image-fdt: save name of FIT configuration in '/chosen' node
|
|
|
|
|
|
|
|
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
|
2022-04-20 14:10:07 +00:00
|
|
|
property called 'u-boot,bootconf' in the '/chosen' node in device tree.
|
2022-03-21 23:30:10 +00:00
|
|
|
|
|
|
|
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
2022-04-20 14:10:07 +00:00
|
|
|
Reviewed-by: Tom Rini <trini@konsulko.com>
|
2022-03-21 23:30:10 +00:00
|
|
|
---
|
|
|
|
boot/image-fdt.c | 6 ++++++
|
|
|
|
1 file changed, 6 insertions(+)
|
|
|
|
|
|
|
|
--- a/boot/image-fdt.c
|
|
|
|
+++ b/boot/image-fdt.c
|
2023-01-13 03:13:24 +00:00
|
|
|
@@ -636,6 +636,12 @@ int image_setup_libfdt(struct bootm_head
|
2022-07-11 10:02:49 +00:00
|
|
|
images->fit_uname_cfg,
|
|
|
|
strlen(images->fit_uname_cfg) + 1, 1);
|
2022-03-21 23:30:10 +00:00
|
|
|
|
2022-04-20 14:10:07 +00:00
|
|
|
+ /* Store name of configuration node as u-boot,bootconf in /chosen node */
|
2022-03-21 23:30:10 +00:00
|
|
|
+ if (images->fit_uname_cfg)
|
2022-04-20 14:10:07 +00:00
|
|
|
+ fdt_find_and_setprop(blob, "/chosen", "u-boot,bootconf",
|
2022-03-21 23:30:10 +00:00
|
|
|
+ images->fit_uname_cfg,
|
|
|
|
+ strlen(images->fit_uname_cfg) + 1, 1);
|
|
|
|
+
|
|
|
|
/* Update ethernet nodes */
|
|
|
|
fdt_fixup_ethernet(blob);
|
|
|
|
#if CONFIG_IS_ENABLED(CMD_PSTORE)
|