All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kumar Gala <galak@kernel.crashing.org>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] [PATCH 1/3] ppc: Report back the location we put the device tree if we dont boot
Date: Wed,  6 Aug 2008 01:32:10 -0500	[thread overview]
Message-ID: <1218004332-20311-1-git-send-email-galak@kernel.crashing.org> (raw)

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 <galak@kernel.crashing.org>
---
 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

             reply	other threads:[~2008-08-06  6:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06  6:32 Kumar Gala [this message]
2008-08-06  6:32 ` [U-Boot-Users] [PATCH 2/3] Add ePAPR boot command Kumar Gala
2008-08-06  6:32   ` [U-Boot-Users] [PATCH 3/3] add ability to disable ft_board_setup as part of bootm Kumar Gala
2008-08-11 21:56     ` Wolfgang Denk
2008-08-06  8:21   ` [U-Boot-Users] [PATCH 2/3] Add ePAPR boot command Wolfgang Denk
2008-08-06 13:03     ` Kumar Gala
2008-08-06 14:40       ` Wolfgang Denk
2008-08-06  7:08 ` [U-Boot-Users] [PATCH 1/3] ppc: Report back the location we put the device tree if we dont boot Wolfgang Denk
2008-08-06  8:21   ` Bartlomiej Sieka
2008-08-06  8:33     ` Wolfgang Denk
2008-08-06 13:16       ` Kumar Gala
2008-08-06 14:46         ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1218004332-20311-1-git-send-email-galak@kernel.crashing.org \
    --to=galak@kernel.crashing.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.