Skip to contentSkip to conversation

Report back the location we put the device tree if we dont boot

PATCH In review Kumar Gala 2 participants 3 messages Aug 1, 2008 – Aug 9, 2008

lore
Share & tools
lore

Kumar Gala

author
#0 lore raw

PATCH 1/1 Report back the location we put the device tree if we dont boot

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

---
 lib_ppc/bootm.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
lib_ppc/bootm.c +10 -1
index 81803dd..a872d31 100644
@@ -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 */
Signature · 1 line
1.5.5.1
#1 lore raw

PATCH 1/1 Report back the location we put the device tree if we dont boot

Dear Kumar Gala,

Quoted 9 lines · In message <[email protected]> you wrote:

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

---
 lib_ppc/bootm.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

Since I will revert the 'autostart' patch, this patch becomes obsolete.

NAK.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
A wise person makes his  own  decisions,  a  weak  one  obeys  public
opinion.                                           -- Chinese proverb
Acked-by Marian Balakowicz on v1 1/1
#2 lore raw

[U-Boot] Revert "[new uImage] Add autostart flag to bootm_headers structure"

In reply to Kumar Gala

Dear Kumar,

as discussed before, I have reverted your patch

commit f5614e7926863bf0225ec860d9b319741a9c4004

Author: Kumar Gala <[email protected]>
Date:   Wed Feb 27 21:51:48 2008 -0600

[new uImage] Add autostart flag to bootm_headers structure

The autostart env variable was dropped as part of the initial new uImage cleanup. Add it back here so the arch specific code can decide if it wants to really boot or not.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The human mind treats a new idea the way the body  treats  a  strange
protein - it rejects it.                                 - P. Medawar