All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhangjin Wu <falcon@tinylab.org>
To: w@1wt.eu
Cc: falcon@tinylab.org, arnd@arndb.de, linux-kernel@vger.kernel.org,
	linux-kselftest@vger.kernel.org, thomas@t-8ch.de,
	"Thomas Weißschuh" <linux@weissschuh.net>
Subject: [PATCH v3 3/7] selftests/nolibc: add extra configs customize support
Date: Thu, 27 Jul 2023 23:02:02 +0800	[thread overview]
Message-ID: <8e9e5ac6283c6ec2ecf10a70ce55b219028497c1.1690468707.git.falcon@tinylab.org> (raw)
In-Reply-To: <cover.1690468707.git.falcon@tinylab.org>

The default DEFCONFIG_<ARCH> may not always work for all architectures,
some architectures require to add extra kernel config options, this
allows to add extra options in the defconfig target.

Based on the .config generated from DEFCONFIG_<ARCH>, It allows to
customize extra kernel config options via both the common common.config
and the architecture specific <ARCH>.config, at last trigger
'allnoconfig' to let them take effect with missing config options as
disabled.

The scripts/kconfig/merge_config.sh tool is used to merge the extra
config files.

Suggested-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/lkml/67eb70d4-c9ff-4afc-bac7-7f36cc2c81bc@t-8ch.de/
Reviewed-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Zhangjin Wu <falcon@tinylab.org>
---
 tools/testing/selftests/nolibc/Makefile | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selftests/nolibc/Makefile
index f42adef87e12..9576f1a0a98d 100644
--- a/tools/testing/selftests/nolibc/Makefile
+++ b/tools/testing/selftests/nolibc/Makefile
@@ -39,6 +39,9 @@ DEFCONFIG_s390       = defconfig
 DEFCONFIG_loongarch  = defconfig
 DEFCONFIG            = $(DEFCONFIG_$(ARCH))
 
+# extra kernel config files under configs/, include common + architecture specific
+EXTCONFIG            = common.config $(ARCH).config
+
 # optional tests to run (default = all)
 TEST =
 
@@ -161,6 +164,8 @@ initramfs: nolibc-test
 
 defconfig:
 	$(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) mrproper $(DEFCONFIG) prepare
+	$(Q)$(srctree)/scripts/kconfig/merge_config.sh -O "$(srctree)" -m "$(srctree)/.config" $(foreach c,$(EXTCONFIG),$(wildcard $(CURDIR)/configs/$c))
+	$(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) KCONFIG_ALLCONFIG="$(srctree)/.config" allnoconfig
 
 kernel: initramfs
 	$(Q)$(MAKE) -C $(srctree) ARCH=$(ARCH) CC=$(CC) CROSS_COMPILE=$(CROSS_COMPILE) $(IMAGE_NAME) CONFIG_INITRAMFS_SOURCE=$(CURDIR)/initramfs
-- 
2.25.1


  parent reply	other threads:[~2023-07-27 15:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-27 14:58 [PATCH v3 0/7] tools/nolibc: add 32/64-bit powerpc support Zhangjin Wu
2023-07-27 14:59 ` [PATCH v3 1/7] tools/nolibc: add support for powerpc Zhangjin Wu
2023-07-27 15:00 ` [PATCH v3 2/7] tools/nolibc: add support for powerpc64 Zhangjin Wu
2023-07-27 15:02 ` Zhangjin Wu [this message]
2023-07-29 12:36   ` [PATCH v3 3/7] selftests/nolibc: add extra configs customize support Thomas Weißschuh
2023-07-29 14:39     ` Zhangjin Wu
2023-07-29 16:29       ` Willy Tarreau
2023-07-29 16:54         ` Zhangjin Wu
2023-07-29 17:10           ` Willy Tarreau
2023-07-30  4:54             ` Zhangjin Wu
2023-07-30  6:01               ` Zhangjin Wu
2023-07-30  6:18                 ` Willy Tarreau
2023-07-30 11:21                   ` Zhangjin Wu
2023-07-30 18:02                     ` Zhangjin Wu
2023-07-27 15:03 ` [PATCH v3 4/7] selftests/nolibc: add XARCH and ARCH mapping support Zhangjin Wu
2023-07-30  6:38   ` Zhangjin Wu
2023-07-30  7:03     ` Willy Tarreau
2023-07-30 11:36       ` Zhangjin Wu
2023-07-27 15:04 ` [PATCH v3 5/7] selftests/nolibc: add test support for ppc Zhangjin Wu
2023-07-27 15:05 ` [PATCH v3 6/7] selftests/nolibc: add test support for ppc64le Zhangjin Wu
2023-07-27 15:06 ` [PATCH v3 7/7] selftests/nolibc: add test support for ppc64 Zhangjin Wu

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=8e9e5ac6283c6ec2ecf10a70ce55b219028497c1.1690468707.git.falcon@tinylab.org \
    --to=falcon@tinylab.org \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux@weissschuh.net \
    --cc=thomas@t-8ch.de \
    --cc=w@1wt.eu \
    /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.