All of lore.kernel.org
 help / color / mirror / Atom feed
From: Randrianaina Georges Aaron <georges-aaron.randrianaina@irisa.fr>
To: Masahiro Yamada <masahiroy@kernel.org>
Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	Mathieu Acher <mathieu.acher@irisa.fr>
Subject: [PATCH v2] kconfig: add KCONFIG_ALLCONFIG support for tinyconfig
Date: Tue, 08 Mar 2022 09:34:16 +0100	[thread overview]
Message-ID: <87v8wo25we.fsf@irisa.fr> (raw)

Since f8f0d06438e5, tinyconfig overrides KCONFIG_ALLCONFIG to include
kernel/configs/tiny-base.config. However, this ignores user's preset if
defined.

This modification checks if the user has set KCONFIG_ALLCONFIG and if so,
concatenates it with kernel/configs/tiny-base.config to be used as preset
config symbols.

Changes in v2:
- Remove `<(echo)` in the cat command as it is not portable
- Add $(srctree) in presets' path to make it compatible with O=<dir>

Signed-off-by: Randrianaina Georges Aaron <georges-aaron.randrianaina@irisa.fr>
---
 scripts/kconfig/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index b8ef0fb4bbef..58a677db9a73 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -102,7 +102,13 @@ configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/c
 
 PHONY += tinyconfig
 tinyconfig:
+ifeq ($(KCONFIG_ALLCONFIG),)
 	$(Q)KCONFIG_ALLCONFIG=kernel/configs/tiny-base.config $(MAKE) -f $(srctree)/Makefile allnoconfig
+else
+	$(Q)cat $(srctree)/$(KCONFIG_ALLCONFIG) $(srctree)/kernel/configs/tiny-base.config > $(srctree)/.tmp.config
+	$(Q)KCONFIG_ALLCONFIG=$(srctree)/.tmp.config $(MAKE) -f $(srctree)/Makefile allnoconfig
+	$(Q)rm -f $(srctree)/.tmp.config
+endif
 	$(Q)$(MAKE) -f $(srctree)/Makefile tiny.config
 
 # CHECK: -o cache_dir=<path> working?
-- 
2.34.1

             reply	other threads:[~2022-03-08  8:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-08  8:34 Randrianaina Georges Aaron [this message]
2022-03-09  9:43 ` [PATCH v2] kconfig: add KCONFIG_ALLCONFIG support for tinyconfig Masahiro Yamada

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=87v8wo25we.fsf@irisa.fr \
    --to=georges-aaron.randrianaina@irisa.fr \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=mathieu.acher@irisa.fr \
    /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.