[U-Boot] [PATCH v2 10/12] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup"

Stefan Roese sr at denx.de
Mon Aug 27 12:51:05 CEST 2012


By calling fdt_chosen(), the chosen node will be updated /
created by the "fdt boardsetup" command. This is useful for
setting of the kernel commandline via the "bootargs"
env variable.

With this change, the "fdt boardsetup" can be used to prepare
the DT blob for SPL booting. The patched DT blob can be saved
to flash and can be used by the SPL U-Boot version directly
for Linux booting.

Signed-off-by: Stefan Roese <sr at denx.de>
---

 common/cmd_fdt.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c
index 9a5c53e..083a2c2 100644
--- a/common/cmd_fdt.c
+++ b/common/cmd_fdt.c
@@ -414,8 +414,10 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
 	}
 #ifdef CONFIG_OF_BOARD_SETUP
 	/* Call the board-specific fixup routine */
-	else if (strncmp(argv[1], "boa", 3) == 0)
+	else if (strncmp(argv[1], "boa", 3) == 0) {
 		ft_board_setup(working_fdt, gd->bd);
+		fdt_chosen(working_fdt, 1);
+	}
 #endif
 	/* Create a chosen node */
 	else if (argv[1][0] == 'c') {
-- 
1.7.12



More information about the U-Boot mailing list