Skip to contentSkip to conversation

arm: fix bootm with device tree

PATCH Superseded Stephen Warren 3 participants 8 messages Apr 19, 2012 – Apr 20, 2012 Arm (32-bit)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 arm: fix bootm with device tree

From: Stephen Warren <[email protected]>

Commit 0a672d4 "arm: Add Prep subcommand support to bootm" re-organized do_bootm_linux() for ARM. During the re-organization, the code to pass the device tree to the kernel was removed. Add it back. This restores the ability to boot a kernel using device tree.

---
 arch/arm/lib/bootm.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
arch/arm/lib/bootm.c +10 -1
index 1c1bee6..95e596a 100644
@@ -317,6 +317,7 @@ static void boot_jump_linux(bootm_headers_t *images)
 	unsigned long machid = gd->bd->bi_arch_number;
 	char *s;
 	void (*kernel_entry)(int zero, int arch, uint params);
+	unsigned long r2;
 
 	kernel_entry = (void (*)(int, int, uint))images->ep;
 
@@ -330,7 +331,15 @@ static void boot_jump_linux(bootm_headers_t *images)
 		"...\n", (ulong) kernel_entry);
 	bootstage_mark(BOOTSTAGE_ID_RUN_OS);
 	announce_and_cleanup();
-	kernel_entry(0, machid, gd->bd->bi_boot_params);
+
+#ifdef CONFIG_OF_LIBFDT
+	if (images->ft_len)
+		r2 = images->ft_addr;
+	else
+#endif
+		r2 = gd->bd->bi_boot_params;
+
+	kernel_entry(0, machid, r2);
 }
 
 /* Main Entry point for arm bootm implementation
Signature · 1 line
1.7.0.4
#1 lore raw

PATCH 2/2 arm: restore fdt_fixup_ethernet call to do_bootm_linux

From: Stephen Warren <[email protected]>

Commit 0a672d4 "arm: Add Prep subcommand support to bootm" re-organized do_bootm_linux for ARM. During the re-organization, the call to fdt_fixup_ethernet() was removed. I assume this was useful, so add it back.

---
 arch/arm/lib/bootm.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
arch/arm/lib/bootm.c +1 -0
index 95e596a..133b555 100644
@@ -256,6 +256,7 @@ static int create_fdt(bootm_headers_t *images)
 
 	fdt_chosen(*of_flat_tree, 1);
 	fixup_memory_node(*of_flat_tree);
+	fdt_fixup_ethernet(*of_flat_tree);
 	fdt_initrd(*of_flat_tree, *initrd_start, *initrd_end, 1);
 
 	return 0;
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/2 arm: restore fdt_fixup_ethernet call to do_bootm_linux

Quoted 8 lines · Stephen Warren

From: Stephen Warren<[email protected]>

Commit 0a672d4 "arm: Add Prep subcommand support to bootm" re-organized do_bootm_linux for ARM. During the re-organization, the call to fdt_fixup_ethernet() was removed. I assume this was useful, so add it back.

Signature · 1 line
Tom
#3 lore raw

PATCH 1/2 arm: fix bootm with device tree

In reply to Stephen Warren
Quoted 8 lines · Stephen Warren

From: Stephen Warren<[email protected]>

Commit 0a672d4 "arm: Add Prep subcommand support to bootm" re-organized do_bootm_linux() for ARM. During the re-organization, the code to pass the device tree to the kernel was removed. Add it back. This restores the ability to boot a kernel using device tree.

Signature · 1 line
Tom
#4 lore raw

PATCH 1/2 arm: fix bootm with device tree

Quoted 11 lines · Tom Rini
Quoted 8 lines · Stephen Warren

From: Stephen Warren<[email protected]>

Commit 0a672d4 "arm: Add Prep subcommand support to bootm" re-organized do_bootm_linux() for ARM. During the re-organization, the code to pass the device tree to the kernel was removed. Add it back. This restores the ability to boot a kernel using device tree.

Who's going to take this patch through their tree? Is it Albert or Wolfgang directly, or should I ask Tom Warren to do it through the Tegra tree?

#5 lore raw

PATCH 1/2 arm: fix bootm with device tree

Quoted 9 lines · Stephen Warren
Quoted 8 lines · Tom Rini
Quoted 7 lines · Stephen Warren

From: Stephen Warren<[email protected]>

Commit 0a672d4 "arm: Add Prep subcommand support to bootm" re-organized do_bootm_linux() for ARM. During the re-organization, the code to pass the device tree to the kernel was removed. Add it back. This restores the ability to boot a kernel using device tree.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

Who's going to take this patch through their tree? Is it Albert or Wolfgang directly, or should I ask Tom Warren to do it through the Tegra tree?

I would suggest Wolfgang directly.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120420/48778f82/attachment.pgp>
#6 lore raw

PATCH 1/2 arm: fix bootm with device tree

Quoted 24 lines

-----Original Message-----
From: Tom Rini [mailto:tom.rini at gmail.com] On Behalf Of Tom Rini
Sent: Friday, April 20, 2012 1:53 PM
To: Stephen Warren; Wolfgang Denk
Cc: Simon Schwarz; u-boot at lists.denx.de; Tom Warren
Subject: Re: [U-Boot] [PATCH 1/2] arm: fix bootm with device tree

* PGP Signed by an unknown key

Quoted 12 lines · Stephen Warren
Quoted 11 lines · Tom Rini
Quoted 9 lines · Stephen Warren

From: Stephen Warren<[email protected]>

Commit 0a672d4 "arm: Add Prep subcommand support to bootm" re-organized
do_bootm_linux() for ARM. During the re-organization, the code to pass the device tree to the kernel was removed. Add it back. This restores the ability to boot a kernel using device tree.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

Who's going to take this patch through their tree? Is it Albert or Wolfgang directly, or should I ask Tom Warren to do it through the Tegra tree?

I would suggest Wolfgang directly.

I have it in my u-boot-tegra/next branch on denx right now, just so I can test kernel boot. It's arch/arm/lib/bootm.c, though, so shouldn't it go thru Albert's tree?

Tom

Quoted 6 lines

--
Tom

* Unknown Key
* 0x94391D56

Signature · 1 line
nvpublic
#7 lore raw

PATCH 1/2 arm: fix bootm with device tree

Quoted 26 lines · Tom Warren
Quoted 26 lines

-----Original Message-----
From: Tom Rini [mailto:tom.rini at gmail.com] On Behalf Of Tom Rini
Sent: Friday, April 20, 2012 1:53 PM
To: Stephen Warren; Wolfgang Denk
Cc: Simon Schwarz; u-boot at lists.denx.de; Tom Warren
Subject: Re: [U-Boot] [PATCH 1/2] arm: fix bootm with device tree

* PGP Signed by an unknown key

Quoted 14 lines · Stephen Warren
Quoted 12 lines · Tom Rini
Quoted 9 lines · Stephen Warren

From: Stephen Warren<[email protected]>

Commit 0a672d4 "arm: Add Prep subcommand support to bootm" re-organized
do_bootm_linux() for ARM. During the re-organization, the code to pass the device tree to the kernel was removed. Add it back. This restores the ability to boot a kernel using device tree.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Who's going to take this patch through their tree? Is it Albert or Wolfgang directly, or should I ask Tom Warren to do it through the Tegra tree?

I would suggest Wolfgang directly.

I have it in my u-boot-tegra/next branch on denx right now, just so I can test kernel boot. It's arch/arm/lib/bootm.c, though, so shouldn't it go thru Albert's tree?

It's a relatively obvious fix (since it restores code that was removed by accident). And since Wolfgang wants to release tomorrow, I think it's reasonable to just have this go in, unless Albert snags this and sends off a PR right away. :)

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120420/12dffee0/attachment.pgp>