From: Peter Robinson <pbrobinson@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 2/2] arm: tegra: add options for BOOTENV_EFI_SET_FDTFILE_FALLBACK for tegra186
Date: Thu, 2 Apr 2020 00:28:55 +0100 [thread overview]
Message-ID: <20200401232855.494797-2-pbrobinson@gmail.com> (raw)
In-Reply-To: <20200401232855.494797-1-pbrobinson@gmail.com>
Upstream linux DT naming doesn't align with the U-Boot DT, which may
not always be the case so this allows using BOOTENV_EFI_SET_FDTFILE_FALLBACK
where it might be appropriate for some boards.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
This is a bit of a hack for the Jetson TX2 because the U-Boot config
using a different naming for the DT naming to upstream Linux, I'm not
sure what naming L4T uses, and whether the 000/500 variants are widely
enough available or whether they use differnet DTs in L4T.
Welcome to suggestions of a better way to fix this one but it works
for booting the TX2 on Fedora using UEFI..
include/config_distro_bootcmd.h | 2 ++
include/configs/tegra186-common.h | 7 ++++++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/include/config_distro_bootcmd.h b/include/config_distro_bootcmd.h
index fc0935fa21..fd1c5f5afa 100644
--- a/include/config_distro_bootcmd.h
+++ b/include/config_distro_bootcmd.h
@@ -118,8 +118,10 @@
"setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; " \
"fi; "
#else
+#ifndef BOOTENV_EFI_SET_FDTFILE_FALLBACK
#define BOOTENV_EFI_SET_FDTFILE_FALLBACK
#endif
+#endif
#define BOOTENV_SHARED_EFI \
diff --git a/include/configs/tegra186-common.h b/include/configs/tegra186-common.h
index 5c3ad35c76..d5f21e0907 100644
--- a/include/configs/tegra186-common.h
+++ b/include/configs/tegra186-common.h
@@ -20,6 +20,12 @@
/* Generic Interrupt Controller */
#define CONFIG_GICV2
+#undef FDTFILE
+#define BOOTENV_EFI_SET_FDTFILE_FALLBACK \
+ "if test -z \"${fdtfile}\" -a -n \"${soc}\"; then " \
+ "setenv efi_fdtfile ${vendor}/${soc}-${board}${boardver}.dtb; " \
+ "fi; "
+
/*
* Memory layout for where various images get loaded by boot scripts:
*
@@ -49,7 +55,6 @@
"scriptaddr=0x90000000\0" \
"pxefile_addr_r=0x90100000\0" \
"kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
- "fdtfile=" FDTFILE "\0" \
"fdt_addr_r=0x82000000\0" \
"ramdisk_addr_r=0x82100000\0"
--
2.26.0
next prev parent reply other threads:[~2020-04-01 23:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 23:28 [PATCH 1/2] arm: tegra: define fdtfile option for distro boot Peter Robinson
2020-04-01 23:28 ` Peter Robinson [this message]
2020-04-02 18:01 ` [PATCH 2/2] arm: tegra: add options for BOOTENV_EFI_SET_FDTFILE_FALLBACK for tegra186 Stephen Warren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200401232855.494797-2-pbrobinson@gmail.com \
--to=pbrobinson@gmail.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox