Its useful to know where the device tree is if we have set 'autostart'
to 'no.  We come back to the prompt after a boot command and we can
than post process the device tree but we need to know where it was put
report this back via the env variable 'bootm_fdtaddr'.

Signed-off-by: Kumar Gala <[EMAIL PROTECTED]>
---
 lib_ppc/bootm.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/lib_ppc/bootm.c b/lib_ppc/bootm.c
index 81803dd..a872d31 100644
--- a/lib_ppc/bootm.c
+++ b/lib_ppc/bootm.c
@@ -277,8 +277,17 @@ do_bootm_linux(cmd_tbl_t *cmdtp, int flag, int argc, char 
*argv[],
 #if defined(CFG_INIT_RAM_LOCK) && !defined(CONFIG_E500)
        unlock_ram_in_cache();
 #endif
-       if (!images->autostart)
+       if (!images->autostart) {
+#if defined(CONFIG_OF_LIBFDT)
+               if (of_flat_tree) {
+                       char buf[32];
+
+                       sprintf (buf, "%llx", (u64)(u32)of_flat_tree);
+                       setenv("bootm_fdtaddr", buf);
+               }
+#endif
                return ;
+       }

 #if defined(CONFIG_OF_LIBFDT)
        if (of_flat_tree) {     /* device tree; boot new style */
-- 
1.5.5.1


-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to