image-fdt: save name of FIT configuration in '/chosen' node
PATCH v2 1/1 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.
---
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(+)
boot/image-fdt.c +6 -0
@@ -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 )
Signature · 1 line
2.35.1
Quoted 6 lines · Daniel Golle
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 <[email protected]>
Signature · 1 line
Tom
Quoted 7 lines · Daniel Golle
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 <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 1 line
Tom