bootm/fdt: Only process the fdt if an fdt address was provided
PATCH 1/1 bootm/fdt: Only process the fdt if an fdt address was provided
From: Grant Likely <[email protected]>
Boards with CONFIG_OF_LIBFDT enabled are not able to boot old-style kernels using the board info structure (instead of passing a device tree) This change allows the old style booting to be used if the fdt argument was not passed to 'bootm'.
---
common/cmd_bootm.c | 36 +++++++++++++++++++----------------- 1 files changed, 19 insertions(+), 17 deletions(-)
common/cmd_bootm.c +19 -17
@@ -962,29 +962,31 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,* Add the chosen node if it doesn't exist, add the env and bd_t * if the user wants it (the logic is in the subroutines). */ -if (fdt_chosen (of_flat_tree, initrd_start, initrd_end,0 ) <0 ) { -puts ("ERROR: /chosen node create failed - " -"must RESET the board to recover.\n" ); -do_reset (cmdtp, flag, argc, argv); - } +if (of_flat_tree) { +if (fdt_chosen (of_flat_tree, initrd_start, initrd_end,0 ) <0 ) { +puts ("ERROR: /chosen node create failed - " +"must RESET the board to recover.\n" ); +do_reset (cmdtp, flag, argc, argv); + }#ifdef CONFIG_OF_HAS_UBOOT_ENV -if (fdt_env (of_flat_tree) <0 ) { -puts ("ERROR: /u-boot-env node create failed - " -"must RESET the board to recover.\n" ); -do_reset (cmdtp, flag, argc, argv); - } +if (fdt_env (of_flat_tree) <0 ) { +puts ("ERROR: /u-boot-env node create failed - " +"must RESET the board to recover.\n" ); +do_reset (cmdtp, flag, argc, argv); + }#endif #ifdef CONFIG_OF_HAS_BD_T -if (fdt_bd_t (of_flat_tree) <0 ) { -puts ("ERROR: /bd_t node create failed - " -"must RESET the board to recover.\n" ); -do_reset (cmdtp, flag, argc, argv); - } +if (fdt_bd_t (of_flat_tree) <0 ) { +puts ("ERROR: /bd_t node create failed - " +"must RESET the board to recover.\n" ); +do_reset (cmdtp, flag, argc, argv); + }#endif #ifdef CONFIG_OF_BOARD_SETUP -/* Call the board-specific fixup routine */ -ft_board_setup (of_flat_tree, gd->bd); +/* Call the board-specific fixup routine */ +ft_board_setup (of_flat_tree, gd->bd);#endif + }#endif /* CONFIG_OF_LIBFDT */ #if defined(CONFIG_OF_FLAT_TREE )#ifdef CFG_BOOTMAPSZ
PATCH 1/1 bootm/fdt: Only process the fdt if an fdt address was provided
Quoted 9 lines · On Thu, 30 Aug 2007 17:59:05 -0600 Grant Likely <[email protected]>…
From: Grant Likely <[email protected]>
Boards with
CONFIG_OF_LIBFDTenabled are not able to boot old-style kernels using the board info structure (instead of passing a device tree) This change allows the old style booting to be used if the fdt argument was not passed to 'bootm'.Signed-off-by Grant Likely <[email protected]>
Thanks Grant,
Kim
PATCH 1/1 bootm/fdt: Only process the fdt if an fdt address was provided
Quoted 10 lines · Kim Phillips
Quoted 7 lines · On Thu, 30 Aug 2007 17:59:05 -0600 Grant Likely <[email protected]>…
From: Grant Likely <[email protected]>
Boards with
CONFIG_OF_LIBFDTenabled are not able to boot old-style kernels using the board info structure (instead of passing a device tree) This change allows the old style booting to be used if the fdt argument was not passed to 'bootm'.
Quoted 5 lines
Quoted 2 lines
Signed-off-by Grant Likely <[email protected]>Thanks Grant,
Acked-by Kim Phillips <[email protected]>
Who's tree should this getting pushed through? I'm getting ready to push the 5xxx libfdt fixup; shall I include it in my tree (even though it's not strictly a 5xxx change).
Cheers,
g.
Signature · 4 lines
Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd. grant.likely at secretlab.ca (403) 399-0195
PATCH 1/1 bootm/fdt: Only process the fdt if an fdt address was provided
Quoted 15 lines · Grant Likely
Quoted 14 lines · Kim Phillips
Quoted 9 lines · On Thu, 30 Aug 2007 17:59:05 -0600 Grant Likely <[email protected]>…
From: Grant Likely <[email protected]>
Boards with
CONFIG_OF_LIBFDTenabled are not able to boot old-style kernels using the board info structure (instead of passing a device tree) This change allows the old style booting to be used if the fdt argument was not passed to 'bootm'.Signed-off-by Grant Likely <[email protected]>Thanks Grant,
Quoted 8 lines
Quoted 1 line
Acked-by Kim Phillips <[email protected]>Who's tree should this getting pushed through? I'm getting ready to push the 5xxx libfdt fixup; shall I include it in my tree (even though it's not strictly a 5xxx change).
Cheers,
g.
U-boot-testing or, since it fixes an apparent bug, direct to the main repo would be my advice (through Wolfgang in either case).
Best regards,
gvb