public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhang Bingwu <xtex@envs.net>
To: linux-kbuild@vger.kernel.org
Cc: Zhang Bingwu <xtexchooser@duck.com>
Subject: [PATCH 1/1] kbuild: find kernel/configs for fragments in fragment merging
Date: Sat, 13 Jan 2024 08:11:35 +0800	[thread overview]
Message-ID: <20240113001135.7781-2-xtex@envs.net> (raw)
In-Reply-To: <20240113001135.7781-1-xtex@envs.net>

From: Zhang Bingwu <xtexchooser@duck.com>

Function merge_into_defconfig and merge_into_defconfig_override merge
a defconfig with several fragments, which should also be searched for
in kernel/configs/*.config.

This also switched ARCH to $(SRCARCH).
For some ARCH, SRCARCH is different from ARCH and arch/$(ARCH) does not
exist.

Signed-off-by: Zhang Bingwu <xtexchooser@duck.com>
---
 scripts/Makefile.defconf | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/Makefile.defconf b/scripts/Makefile.defconf
index ab271b205..6e61c1784 100644
--- a/scripts/Makefile.defconf
+++ b/scripts/Makefile.defconf
@@ -10,7 +10,7 @@
 define merge_into_defconfig
 	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
 		-m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/$(1) \
-		$(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config)
+		$(foreach config,$(2),$(wildcard $(srctree)/kernel/configs/$(config).config $(srctree)/arch/$(SRCARCH)/configs/$(config).config))
 	+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
 endef
 
@@ -24,6 +24,6 @@ endef
 define merge_into_defconfig_override
 	$(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
 		-Q -m -O $(objtree) $(srctree)/arch/$(ARCH)/configs/$(1) \
-		$(foreach config,$(2),$(srctree)/arch/$(ARCH)/configs/$(config).config)
+		$(foreach config,$(2),$(wildcard $(srctree)/kernel/configs/$(config).config $(srctree)/arch/$(SRCARCH)/configs/$(config).config))
 	+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
 endef
-- 
2.43.0


  reply	other threads:[~2024-01-13  0:12 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-13  0:11 [PATCH 0/1] kbuild: find kernel/configs for fragments in fragment merging Zhang Bingwu
2024-01-13  0:11 ` Zhang Bingwu [this message]
2024-01-14  8:13 ` [PATCH v2 0/2] kbuild: find kernel/configs for merged fragments Zhang Bingwu
2024-01-14  8:13   ` [PATCH v2 1/2] kbuild: defconf: use SRCARCH to find merged configs Zhang Bingwu
2024-01-16 11:28     ` Masahiro Yamada
2024-01-27 16:13       ` Masahiro Yamada
2024-01-14  8:14   ` [PATCH v2 2/2] kbuild: find kernel/configs/ for merged fragments Zhang Bingwu

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=20240113001135.7781-2-xtex@envs.net \
    --to=xtex@envs.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=xtexchooser@duck.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox