public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] rpi: Fix device tree path on ARM64
@ 2017-01-03 10:39 Tuomas Tynkkynen
  2017-01-05 23:44 ` Stephen Warren
  0 siblings, 1 reply; 4+ messages in thread
From: Tuomas Tynkkynen @ 2017-01-03 10:39 UTC (permalink / raw)
  To: u-boot

The directory structure of device tree files produced by the kernel's
'make dtbs_install' is different on ARM64, the RPi3 device tree file is
in a 'broadcom' subdirectory there. Make the set_fdtfile function account
for this so that the distro boot scripts can locate the DTB file.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
---
 board/raspberrypi/rpi/rpi.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 22e87a2..dbf69f8 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -243,12 +243,14 @@ int dram_init(void)
 
 static void set_fdtfile(void)
 {
-	const char *fdtfile;
+	char fdtfile[64] = "";
 
 	if (getenv("fdtfile"))
 		return;
 
-	fdtfile = model->fdtfile;
+	if (IS_ENABLED(CONFIG_ARM64))
+		strcat(fdtfile, "broadcom/");
+	strcat(fdtfile, model->fdtfile);
 	setenv("fdtfile", fdtfile);
 }
 
-- 
2.10.2

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

end of thread, other threads:[~2017-01-10  2:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-03 10:39 [U-Boot] [PATCH] rpi: Fix device tree path on ARM64 Tuomas Tynkkynen
2017-01-05 23:44 ` Stephen Warren
2017-01-09 13:34   ` Tuomas Tynkkynen
2017-01-10  2:48     ` Stephen Warren

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