public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC PATCH] arm: bootm: Boot kernel with U-Boot's FDT blob
@ 2017-01-10 12:58 Michal Simek
  2017-01-10 13:02 ` Alexander Graf
  2017-01-11  5:19 ` Lokesh Vutla
  0 siblings, 2 replies; 23+ messages in thread
From: Michal Simek @ 2017-01-10 12:58 UTC (permalink / raw)
  To: u-boot

U-Boot configured via DTB can use the same DTB for booting the kernel.
When OF_CONTROL is used fdtcontroladdr is setup and can be use for boot.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

Didn't check if there is any side effect or not but it looks weird when
you have DT driver u-boot that you have to load dtb again.

---
 arch/arm/lib/bootm.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index 43cc83ec95b6..9740045b0094 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -245,6 +245,20 @@ static void boot_prep_linux(bootm_headers_t *images)
 		}
 		setup_board_tags(&params);
 		setup_end_tag(gd->bd);
+	} else if (IS_ENABLED(CONFIG_OF_CONTROL)) {
+#ifdef CONFIG_OF_LIBFDT
+		images->ft_addr = (char *)getenv_hex("fdtcontroladdr", 0);
+		if (!images->ft_addr) {
+			printf("FDT address failed! hanging...");
+			hang();
+		}
+
+		debug("using: U-Boot's FDT\n");
+		if (image_setup_linux(images)) {
+			printf("FDT creation failed! hanging...");
+			hang();
+		}
+#endif
 	} else {
 		printf("FDT and ATAGS support not compiled in - hanging\n");
 		hang();
-- 
1.9.1

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

end of thread, other threads:[~2017-01-13 16:43 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-10 12:58 [U-Boot] [RFC PATCH] arm: bootm: Boot kernel with U-Boot's FDT blob Michal Simek
2017-01-10 13:02 ` Alexander Graf
2017-01-10 13:05   ` Michal Simek
2017-01-10 13:08     ` Alexander Graf
2017-01-10 13:22       ` Michal Simek
2017-01-10 16:31   ` york sun
2017-01-10 16:35     ` Alexander Graf
2017-01-10 16:42       ` york sun
2017-01-10 17:10         ` Alexander Graf
2017-01-10 16:47       ` Ryan Harkin
2017-01-10 16:58         ` Alexander Graf
2017-01-10 17:17           ` Ryan Harkin
2017-01-10 18:34             ` Mark Rutland
2017-01-10 18:50               ` Jon Medhurst
2017-01-12 12:25                 ` Mark Rutland
2017-01-12 13:47                   ` Ryan Harkin
2017-01-13 14:19                     ` Mark Rutland
2017-01-13 16:43                       ` Ryan Harkin
2017-01-10 17:52           ` Stephen Warren
2017-01-10 18:17             ` Michal Simek
2017-01-11  5:19 ` Lokesh Vutla
2017-01-11  7:20   ` Michal Simek
2017-01-11  9:39     ` Lokesh Vutla

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