Skip to content

Commit 5f2d591

Browse files
dangowrttrini
authored andcommitted
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 <[email protected]> Reviewed-by: Tom Rini <[email protected]>
1 parent 9acf372 commit 5f2d591

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

boot/image-fdt.c

+6
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,12 @@ int image_setup_libfdt(bootm_headers_t *images, void *blob,
601601
goto err;
602602
}
603603

604+
/* Store name of configuration node as u-boot,bootconf in /chosen node */
605+
if (images->fit_uname_cfg)
606+
fdt_find_and_setprop(blob, "/chosen", "u-boot,bootconf",
607+
images->fit_uname_cfg,
608+
strlen(images->fit_uname_cfg) + 1, 1);
609+
604610
/* Update ethernet nodes */
605611
fdt_fixup_ethernet(blob);
606612
#if CONFIG_IS_ENABLED(CMD_PSTORE)

0 commit comments

Comments
 (0)