[U-Boot] [PATCH] sunxi: allow CONFIG_DEFAULT_FDT_FILE override

Martin Kelly mkelly at xevo.com
Wed May 2 00:46:41 UTC 2018


Currently, sunxi-common.h ignores CONFIG_DEFAULT_FDT_FILE and assumes
the kernel fdtfile and the u-boot devicetree names are the same.
Although this is typically the case, sometimes you might want to
customize one of these differently, so it's useful to allow them to be
different.

Add logic in sunxi-common.h to respect CONFIG_DEFAULT_FDT_FILE, if set,
and default to the values it currently uses.

Signed-off-by: Martin Kelly <mkelly at xevo.com>
---
 include/configs/sunxi-common.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
index 9d9e9ce173..cfd0b1d8c6 100644
--- a/include/configs/sunxi-common.h
+++ b/include/configs/sunxi-common.h
@@ -501,12 +501,18 @@ extern int soft_i2c_gpio_scl;
 	CONSOLE_STDIN_SETTINGS \
 	CONSOLE_STDOUT_SETTINGS
 
+#ifdef CONFIG_DEFAULT_FDT_FILE
+#define FDTFILE CONFIG_DEFAULT_FDT_FILE ".dtb"
+#else /* ifndef CONFIG_DEFAULT_FDT_FILE */
+
 #ifdef CONFIG_ARM64
 #define FDTFILE "allwinner/" CONFIG_DEFAULT_DEVICE_TREE ".dtb"
 #else
 #define FDTFILE CONFIG_DEFAULT_DEVICE_TREE ".dtb"
 #endif
 
+#endif /* ifdef CONFIG_DEFAULT_FDT_FILE */
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	CONSOLE_ENV_SETTINGS \
 	MEM_LAYOUT_ENV_SETTINGS \
-- 
2.11.0



More information about the U-Boot mailing list