Let the board specific include file live in the board directory.

Signed-off-by: Troy Kisky <[email protected]>
---
 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

Reply via email to