[PATCH v2 1/2] kbuild: defconf: use SRCARCH to find merged configs

Zhang Bingwu posted 2 patches 1 year, 11 months ago
[PATCH v2 1/2] kbuild: defconf: use SRCARCH to find merged configs
Posted by Zhang Bingwu 1 year, 11 months ago
From: Zhang Bingwu <xtexchooser@duck.com>

For some ARCH values, SRCARCH, which should be used for finding arch/
subdirectory, is different from ARCH.

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

diff --git a/scripts/Makefile.defconf b/scripts/Makefile.defconf
index ab271b205..226ea3df3 100644
--- a/scripts/Makefile.defconf
+++ b/scripts/Makefile.defconf
@@ -9,8 +9,8 @@
 # Input config fragments without '.config' suffix
 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)
+		-m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$(1) \
+		$(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
 	+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
 endef
 
@@ -23,7 +23,7 @@ endef
 # Input config fragments without '.config' suffix
 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)
+		-Q -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$(1) \
+		$(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
 	+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
 endef
-- 
2.43.0
Re: [PATCH v2 1/2] kbuild: defconf: use SRCARCH to find merged configs
Posted by Masahiro Yamada 1 year, 11 months ago
On Sun, Jan 14, 2024 at 5:14 PM Zhang Bingwu <xtex@envs.net> wrote:
>
> From: Zhang Bingwu <xtexchooser@duck.com>
>
> For some ARCH values, SRCARCH, which should be used for finding arch/
> subdirectory, is different from ARCH.
>
> Signed-off-by: Zhang Bingwu <xtexchooser@duck.com>



As you can see in "git log scripts/Makefile.defconf",
I was not involved in anything about this file.

I do not see much interest in this patch set, but
Arnd Bergmann might be excited about it.

(You did not accompany with a real use case though)









> ---
>  scripts/Makefile.defconf | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/Makefile.defconf b/scripts/Makefile.defconf
> index ab271b205..226ea3df3 100644
> --- a/scripts/Makefile.defconf
> +++ b/scripts/Makefile.defconf
> @@ -9,8 +9,8 @@
>  # Input config fragments without '.config' suffix
>  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)
> +               -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$(1) \
> +               $(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
>         +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
>  endef
>
> @@ -23,7 +23,7 @@ endef
>  # Input config fragments without '.config' suffix
>  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)
> +               -Q -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$(1) \
> +               $(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
>         +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
>  endef
> --
> 2.43.0
>
>


--
Best Regards
Masahiro Yamada
Re: [PATCH v2 1/2] kbuild: defconf: use SRCARCH to find merged configs
Posted by Masahiro Yamada 1 year, 11 months ago
On Tue, Jan 16, 2024 at 8:28 PM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> On Sun, Jan 14, 2024 at 5:14 PM Zhang Bingwu <xtex@envs.net> wrote:
> >
> > From: Zhang Bingwu <xtexchooser@duck.com>
> >
> > For some ARCH values, SRCARCH, which should be used for finding arch/
> > subdirectory, is different from ARCH.
> >
> > Signed-off-by: Zhang Bingwu <xtexchooser@duck.com>
>
>
>
> As you can see in "git log scripts/Makefile.defconf",
> I was not involved in anything about this file.
>
> I do not see much interest in this patch set, but
> Arnd Bergmann might be excited about it.
>
> (You did not accompany with a real use case though)




Having said that, 1/2 is a bug fix.

I applied this to linux-kbuild/fixes. Thanks.




-- 
Best Regards
Masahiro Yamada