All of lore.kernel.org
 help / color / mirror / Atom feed
From: Troy Kisky <troy.kisky@boundarydevices.com>
To: sjg@chromium.org, trini@konsulko.com
Cc: fabio.estevam@nxp.com, u-boot@lists.denx.de,
	Troy Kisky <troy.kisky@boundarydevices.com>
Subject: [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live in board directory
Date: Fri, 17 Dec 2021 15:01:29 -0800	[thread overview]
Message-ID: <20211217230131.2715940-4-troy.kisky@boundarydevices.com> (raw)
In-Reply-To: <20211217230131.2715940-1-troy.kisky@boundarydevices.com>

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

Signed-off-by: Troy Kisky <troy.kisky@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


  parent reply	other threads:[~2021-12-17 23:02 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-17 23:01 [PATCH v1 0/5] Move board specific files to board directory Troy Kisky
2021-12-17 23:01 ` [PATCH v1 1/5] kconfig: allow defconfigs to live in " Troy Kisky
2021-12-28  8:33   ` Simon Glass
2022-01-06 21:00     ` Troy Kisky
2021-12-17 23:01 ` [PATCH v1 2/5] dts: allow dts files " Troy Kisky
2021-12-28  8:33   ` Simon Glass
2022-01-06 21:01     ` Troy Kisky
2021-12-17 23:01 ` Troy Kisky [this message]
2021-12-28  8:33   ` [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live " Simon Glass
2022-01-06 21:09     ` Troy Kisky
2022-01-30 23:14       ` Simon Glass
2021-12-17 23:01 ` [PATCH v1 4/5] genboardcfg: allow defconfigs " Troy Kisky
2021-12-28  8:33   ` Simon Glass
2021-12-17 23:01 ` [PATCH v1 5/5] nitrogen6x: move board specific files to nitrogen6x directory Troy Kisky
2021-12-28  8:33   ` Simon Glass
2021-12-28  8:33 ` [PATCH v1 0/5] Move board specific files to board directory Simon Glass
2021-12-28 13:11   ` Tom Rini
2022-01-06 21:14     ` Troy Kisky
2022-01-07 15:12       ` Tom Rini
2022-01-07 18:33         ` Troy Kisky
2022-01-30 23:14           ` Simon Glass
2022-02-08 14:30           ` Tom Rini
2022-03-15 19:08             ` Troy Kisky
2022-03-15 20:01               ` Tom Rini
2022-03-15 20:23                 ` Troy Kisky
2022-03-16 14:48                   ` Tom Rini

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=20211217230131.2715940-4-troy.kisky@boundarydevices.com \
    --to=troy.kisky@boundarydevices.com \
    --cc=fabio.estevam@nxp.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.