summaryrefslogtreecommitdiff
path: root/common/cmd_bootm.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2007-09-07 00:13:11 +0200
committerWolfgang Denk <wd@denx.de>2007-09-07 00:13:11 +0200
commitbf72a4ca9e08c9dcd4e6c3201772b565571da0a7 (patch)
tree6c38e15d26ee62ab9f81fc0d9a090cd8bb21bf31 /common/cmd_bootm.c
parent041a2554ad619e80dce520c1a33210affcb6a3f2 (diff)
parente79021223bc339df655e360645a52c457a74b067 (diff)
downloadu-boot-imx-bf72a4ca9e08c9dcd4e6c3201772b565571da0a7.zip
u-boot-imx-bf72a4ca9e08c9dcd4e6c3201772b565571da0a7.tar.gz
u-boot-imx-bf72a4ca9e08c9dcd4e6c3201772b565571da0a7.tar.bz2
Merge with /home/wd/git/u-boot/custodian/u-boot-mpc5xxx
Diffstat (limited to 'common/cmd_bootm.c')
-rw-r--r--common/cmd_bootm.c36
1 files changed, 19 insertions, 17 deletions
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index bcb927f..919188f 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -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