
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); }