public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] bootm/fdt: Only process the fdt if an fdt address was provided
@ 2007-08-30 23:59 Grant Likely
  2007-09-05 20:53 ` Kim Phillips
  0 siblings, 1 reply; 4+ messages in thread
From: Grant Likely @ 2007-08-30 23:59 UTC (permalink / raw)
  To: u-boot

From: Grant Likely <grant.likely@secretlab.ca>

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'.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
---

 common/cmd_bootm.c |   36 +++++++++++++++++++-----------------
 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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH] bootm/fdt: Only process the fdt if an fdt address was provided
  2007-08-30 23:59 [U-Boot-Users] [PATCH] bootm/fdt: Only process the fdt if an fdt address was provided Grant Likely
@ 2007-09-05 20:53 ` Kim Phillips
  2007-09-06  3:33   ` Grant Likely
  0 siblings, 1 reply; 4+ messages in thread
From: Kim Phillips @ 2007-09-05 20:53 UTC (permalink / raw)
  To: u-boot

On Thu, 30 Aug 2007 17:59:05 -0600
Grant Likely <grant.likely@secretlab.ca> wrote:

> From: Grant Likely <grant.likely@secretlab.ca>
> 
> 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'.
> 
> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> 
Thanks Grant,

Acked-by: Kim Phillips <kim.phillips@freescale.com>

Kim

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH] bootm/fdt: Only process the fdt if an fdt address was provided
  2007-09-05 20:53 ` Kim Phillips
@ 2007-09-06  3:33   ` Grant Likely
  2007-09-06 12:11     ` Jerry Van Baren
  0 siblings, 1 reply; 4+ messages in thread
From: Grant Likely @ 2007-09-06  3:33 UTC (permalink / raw)
  To: u-boot

On 9/5/07, Kim Phillips <kim.phillips@freescale.com> wrote:
> On Thu, 30 Aug 2007 17:59:05 -0600
> Grant Likely <grant.likely@secretlab.ca> wrote:
>
> > From: Grant Likely <grant.likely@secretlab.ca>
> >
> > 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'.
> >
> > Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
> >
> Thanks Grant,
>
> Acked-by: Kim Phillips <kim.phillips@freescale.com>

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.


-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot-Users] [PATCH] bootm/fdt: Only process the fdt if an fdt address was provided
  2007-09-06  3:33   ` Grant Likely
@ 2007-09-06 12:11     ` Jerry Van Baren
  0 siblings, 0 replies; 4+ messages in thread
From: Jerry Van Baren @ 2007-09-06 12:11 UTC (permalink / raw)
  To: u-boot

Grant Likely wrote:
> On 9/5/07, Kim Phillips <kim.phillips@freescale.com> wrote:
>> On Thu, 30 Aug 2007 17:59:05 -0600
>> Grant Likely <grant.likely@secretlab.ca> wrote:
>>
>>> From: Grant Likely <grant.likely@secretlab.ca>
>>>
>>> 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'.
>>>
>>> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
>>>
>> Thanks Grant,
>>
>> Acked-by: Kim Phillips <kim.phillips@freescale.com>
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-06 12:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-30 23:59 [U-Boot-Users] [PATCH] bootm/fdt: Only process the fdt if an fdt address was provided Grant Likely
2007-09-05 20:53 ` Kim Phillips
2007-09-06  3:33   ` Grant Likely
2007-09-06 12:11     ` Jerry Van Baren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox