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 1/5] kconfig: allow defconfigs to live in board directory
Date: Fri, 17 Dec 2021 15:01:27 -0800	[thread overview]
Message-ID: <20211217230131.2715940-2-troy.kisky@boundarydevices.com> (raw)
In-Reply-To: <20211217230131.2715940-1-troy.kisky@boundarydevices.com>

This will reduce the size of the configs directory, and
make it more clear which board directory uses the defconfig
file.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
---
 scripts/kconfig/Makefile | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 12e525ee31f..307262e00de 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -92,8 +92,15 @@ else
 endif
 endif
 
+%_defconfig: SHELL:=/bin/bash
 %_defconfig: $(obj)/conf
-	$(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)
+	$(Q)readarray -d '' names < <(find $(srctree)/configs $(srctree)/board -type f -name $@ -print0); \
+	if (test $${#names[*]} -eq 1); then \
+		$< $(silent) --defconfig="$${names[0]}" $(Kconfig); \
+	else \
+		echo "$@" not found or ambiguous error; \
+		echo "$${names[@]}"; exit 1; \
+	fi
 
 # Added for U-Boot (backward compatibility)
 %_config: %_defconfig
-- 
2.32.0


  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 ` Troy Kisky [this message]
2021-12-28  8:33   ` [PATCH v1 1/5] kconfig: allow defconfigs to live in " 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 ` [PATCH v1 3/5] scripts: Makefile.autoconf: allow CONFIG_SYS_CONFIG_NAME file to live " Troy Kisky
2021-12-28  8:33   ` 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-2-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.