diff options
author | Daniel Golle | 2022-04-12 21:00:43 +0100 |
---|---|---|
committer | Tom Rini | 2022-04-19 14:51:11 -0400 |
commit | 5f2d5915f8ea4785bc2b8a26955e176a7898c15b (patch) | |
tree | 045e74fd37cc3bd6547100189d4119ad6e7ea1f4 /boot/image-fdt.c | |
parent | 9acf3726b654d06c50c07c3f45da9eb1cbbadf34 (diff) |
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
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>
Diffstat (limited to 'boot/image-fdt.c')
-rw-r--r-- | boot/image-fdt.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/boot/image-fdt.c b/boot/image-fdt.c index 692a9ad3e42..fdb69926a26 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) |