[PATCH V6 10/20] include: env: ti: Add a generic default_findfdt.env

Nishanth Menon nm at ti.com
Fri Aug 25 20:02:55 CEST 2023

ti_mmc bootmethod uses a findfdt routine that is expected to be
implemented by all platforms.

Define a default findfdt based on configured DEFAULT_DEVICE_TREE option
for u-boot. This saves duplication across multiple boards and handles
architecture folder location changes centrally.

TI ARMV7 platforms will need to override default_device_tree_subarch
in the env file to point to the appropriate platform. Note: default
"omap" is used to cater to "most common" default.

Tested-by: Mattijs Korpershoek <mkorpershoek at baylibre.com>
Signed-off-by: Nishanth Menon <nm at ti.com>
* Made it as default_findfdt as discussed in review.

V5: https://lore.kernel.org/r/20230824031101.3460411-9-nm@ti.com
 include/env/ti/default_findfdt.env | 12 ++++++++++++
 1 file changed, 12 insertions(+)
 create mode 100644 include/env/ti/default_findfdt.env

diff --git a/include/env/ti/default_findfdt.env b/include/env/ti/default_findfdt.env
new file mode 100644
index 000000000000..a2b51dd923bb
--- /dev/null
+++ b/include/env/ti/default_findfdt.env
@@ -0,0 +1,12 @@
+#ifdef CONFIG_ARM64
+	setenv name_fdt ${default_device_tree_arch}/${default_device_tree}.dtb;
+	setenv fdtfile ${name_fdt}
+	setenv name_fdt ${default_device_tree_arch}/${default_device_tree_subarch}/${default_device_tree}.dtb;
+	setenv fdtfile ${name_fdt}

More information about the U-Boot mailing list