[PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live in board directory
Troy Kisky
troy.kisky at boundarydevices.com
Sat Dec 18 00:01:29 CET 2021
Let the board specific include file live in the board directory.
Signed-off-by: Troy Kisky <troy.kisky at boundarydevices.com>
---
scripts/Makefile.autoconf | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf
index 8a3efdb2db0..6a725a3e2ff 100644
--- a/scripts/Makefile.autoconf
+++ b/scripts/Makefile.autoconf
@@ -103,9 +103,14 @@ define filechk_config_h
echo \#define CONFIG_$$i \
| sed '/=/ {s/=/ /;q; } ; { s/$$/ 1/; }'; \
done; \
- echo \#define CONFIG_BOARDDIR board/$(if $(VENDOR),$(VENDOR)/)$(BOARD);\
+ config_boarddir=board/$(if $(VENDOR),$(VENDOR)/)$(BOARD); \
+ echo \#define CONFIG_BOARDDIR $$config_boarddir; \
echo \#include \<config_uncmd_spl.h\>; \
- echo \#include \<configs/$(CONFIG_SYS_CONFIG_NAME).h\>; \
+ if [ -f $(srctree)/$$config_boarddir/$(CONFIG_SYS_CONFIG_NAME).h ] ; then \
+ echo \#include \"../$$config_boarddir/$(CONFIG_SYS_CONFIG_NAME).h\"; \
+ else \
+ echo \#include \<configs/$(CONFIG_SYS_CONFIG_NAME).h\>; \
+ fi; \
echo \#include \<asm/config.h\>; \
echo \#include \<linux/kconfig.h\>; \
echo \#include \<config_fallbacks.h\>;)
--
2.32.0
More information about the U-Boot
mailing list