* [PATCH] kbuild: suppress stdout from merge_config for silent builds
@ 2024-12-08 14:46 Masahiro Yamada
2024-12-08 17:31 ` Nathan Chancellor
2024-12-09 18:19 ` Leon Romanovsky
0 siblings, 2 replies; 4+ messages in thread
From: Masahiro Yamada @ 2024-12-08 14:46 UTC (permalink / raw)
To: linux-kbuild
Cc: linux-kernel, Masahiro Yamada, Leon Romanovsky, Nathan Chancellor,
Nicolas Schier
merge_config does not respect the Make's -s (--silent) option.
Let's sink the stdout from merge_config for silent builds.
This commit does not cater to the direct invocation of merge_config.sh
(e.g. arch/mips/Makefile).
Reported-by: Leon Romanovsky <leon@kernel.org>
Closes: https://lore.kernel.org/all/e534ce33b0e1060eb85ece8429810f087b034c88.1733234008.git.leonro@nvidia.com/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---
scripts/Makefile.defconf | 13 +++++++------
scripts/kconfig/Makefile | 4 +++-
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/scripts/Makefile.defconf b/scripts/Makefile.defconf
index 226ea3df3b4b..97bc5161d6bf 100644
--- a/scripts/Makefile.defconf
+++ b/scripts/Makefile.defconf
@@ -1,6 +1,11 @@
# SPDX-License-Identifier: GPL-2.0
# Configuration heplers
+cmd_merge_fragments = \
+ $(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
+ $4 -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$2 \
+ $(foreach config,$3,$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
+
# Creates 'merged defconfigs'
# ---------------------------------------------------------------------------
# Usage:
@@ -8,9 +13,7 @@
#
# Input config fragments without '.config' suffix
define merge_into_defconfig
- $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
- -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$(1) \
- $(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
+ $(call cmd,merge_fragments,$1,$2)
+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
endef
@@ -22,8 +25,6 @@ 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/$(SRCARCH)/configs/$(1) \
- $(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
+ $(call cmd,merge_fragments,$1,$2,-Q)
+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
endef
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index a0a0be38cbdc..fb50bd4f4103 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -105,9 +105,11 @@ configfiles = $(wildcard $(srctree)/kernel/configs/$(1) $(srctree)/arch/$(SRCARC
all-config-fragments = $(call configfiles,*.config)
config-fragments = $(call configfiles,$@)
+cmd_merge_fragments = $(srctree)/scripts/kconfig/merge_config.sh -m $(KCONFIG_CONFIG) $(config-fragments)
+
%.config: $(obj)/conf
$(if $(config-fragments),, $(error $@ fragment does not exists on this architecture))
- $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m $(KCONFIG_CONFIG) $(config-fragments)
+ $(call cmd,merge_fragments)
$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
PHONY += tinyconfig
--
2.43.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: suppress stdout from merge_config for silent builds
2024-12-08 14:46 [PATCH] kbuild: suppress stdout from merge_config for silent builds Masahiro Yamada
@ 2024-12-08 17:31 ` Nathan Chancellor
2024-12-10 10:19 ` Masahiro Yamada
2024-12-09 18:19 ` Leon Romanovsky
1 sibling, 1 reply; 4+ messages in thread
From: Nathan Chancellor @ 2024-12-08 17:31 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-kbuild, linux-kernel, Leon Romanovsky, Nicolas Schier
On Sun, Dec 08, 2024 at 11:46:14PM +0900, Masahiro Yamada wrote:
> merge_config does not respect the Make's -s (--silent) option.
>
> Let's sink the stdout from merge_config for silent builds.
>
> This commit does not cater to the direct invocation of merge_config.sh
> (e.g. arch/mips/Makefile).
>
> Reported-by: Leon Romanovsky <leon@kernel.org>
> Closes: https://lore.kernel.org/all/e534ce33b0e1060eb85ece8429810f087b034c88.1733234008.git.leonro@nvidia.com/
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> scripts/Makefile.defconf | 13 +++++++------
> scripts/kconfig/Makefile | 4 +++-
> 2 files changed, 10 insertions(+), 7 deletions(-)
>
> diff --git a/scripts/Makefile.defconf b/scripts/Makefile.defconf
> index 226ea3df3b4b..97bc5161d6bf 100644
> --- a/scripts/Makefile.defconf
> +++ b/scripts/Makefile.defconf
> @@ -1,6 +1,11 @@
> # SPDX-License-Identifier: GPL-2.0
> # Configuration heplers
>
> +cmd_merge_fragments = \
> + $(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
> + $4 -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$2 \
> + $(foreach config,$3,$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
> +
> # Creates 'merged defconfigs'
> # ---------------------------------------------------------------------------
> # Usage:
> @@ -8,9 +13,7 @@
> #
> # Input config fragments without '.config' suffix
> define merge_into_defconfig
> - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
> - -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$(1) \
> - $(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
> + $(call cmd,merge_fragments,$1,$2)
> +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
> endef
>
> @@ -22,8 +25,6 @@ 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/$(SRCARCH)/configs/$(1) \
> - $(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
> + $(call cmd,merge_fragments,$1,$2,-Q)
> +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
> endef
> diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
> index a0a0be38cbdc..fb50bd4f4103 100644
> --- a/scripts/kconfig/Makefile
> +++ b/scripts/kconfig/Makefile
> @@ -105,9 +105,11 @@ configfiles = $(wildcard $(srctree)/kernel/configs/$(1) $(srctree)/arch/$(SRCARC
> all-config-fragments = $(call configfiles,*.config)
> config-fragments = $(call configfiles,$@)
>
> +cmd_merge_fragments = $(srctree)/scripts/kconfig/merge_config.sh -m $(KCONFIG_CONFIG) $(config-fragments)
Did you mean to drop $(CONFIG_SHELL) here? I noticed you kept it in the
other command.
> +
> %.config: $(obj)/conf
> $(if $(config-fragments),, $(error $@ fragment does not exists on this architecture))
> - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m $(KCONFIG_CONFIG) $(config-fragments)
> + $(call cmd,merge_fragments)
> $(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
>
> PHONY += tinyconfig
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: suppress stdout from merge_config for silent builds
2024-12-08 14:46 [PATCH] kbuild: suppress stdout from merge_config for silent builds Masahiro Yamada
2024-12-08 17:31 ` Nathan Chancellor
@ 2024-12-09 18:19 ` Leon Romanovsky
1 sibling, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2024-12-09 18:19 UTC (permalink / raw)
To: Masahiro Yamada
Cc: linux-kbuild, linux-kernel, Nathan Chancellor, Nicolas Schier
On Sun, Dec 08, 2024 at 11:46:14PM +0900, Masahiro Yamada wrote:
> merge_config does not respect the Make's -s (--silent) option.
>
> Let's sink the stdout from merge_config for silent builds.
>
> This commit does not cater to the direct invocation of merge_config.sh
> (e.g. arch/mips/Makefile).
>
> Reported-by: Leon Romanovsky <leon@kernel.org>
> Closes: https://lore.kernel.org/all/e534ce33b0e1060eb85ece8429810f087b034c88.1733234008.git.leonro@nvidia.com/
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
> scripts/Makefile.defconf | 13 +++++++------
> scripts/kconfig/Makefile | 4 +++-
> 2 files changed, 10 insertions(+), 7 deletions(-)
>
Thanks,
Tested-by: Leon Romanovsky <leon@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] kbuild: suppress stdout from merge_config for silent builds
2024-12-08 17:31 ` Nathan Chancellor
@ 2024-12-10 10:19 ` Masahiro Yamada
0 siblings, 0 replies; 4+ messages in thread
From: Masahiro Yamada @ 2024-12-10 10:19 UTC (permalink / raw)
To: Nathan Chancellor
Cc: linux-kbuild, linux-kernel, Leon Romanovsky, Nicolas Schier
On Mon, Dec 9, 2024 at 2:31 AM Nathan Chancellor <nathan@kernel.org> wrote:
>
> On Sun, Dec 08, 2024 at 11:46:14PM +0900, Masahiro Yamada wrote:
> > merge_config does not respect the Make's -s (--silent) option.
> >
> > Let's sink the stdout from merge_config for silent builds.
> >
> > This commit does not cater to the direct invocation of merge_config.sh
> > (e.g. arch/mips/Makefile).
> >
> > Reported-by: Leon Romanovsky <leon@kernel.org>
> > Closes: https://lore.kernel.org/all/e534ce33b0e1060eb85ece8429810f087b034c88.1733234008.git.leonro@nvidia.com/
> > Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> > ---
> >
> > scripts/Makefile.defconf | 13 +++++++------
> > scripts/kconfig/Makefile | 4 +++-
> > 2 files changed, 10 insertions(+), 7 deletions(-)
> >
> > diff --git a/scripts/Makefile.defconf b/scripts/Makefile.defconf
> > index 226ea3df3b4b..97bc5161d6bf 100644
> > --- a/scripts/Makefile.defconf
> > +++ b/scripts/Makefile.defconf
> > @@ -1,6 +1,11 @@
> > # SPDX-License-Identifier: GPL-2.0
> > # Configuration heplers
> >
> > +cmd_merge_fragments = \
> > + $(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
> > + $4 -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$2 \
> > + $(foreach config,$3,$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
> > +
> > # Creates 'merged defconfigs'
> > # ---------------------------------------------------------------------------
> > # Usage:
> > @@ -8,9 +13,7 @@
> > #
> > # Input config fragments without '.config' suffix
> > define merge_into_defconfig
> > - $(Q)$(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh \
> > - -m -O $(objtree) $(srctree)/arch/$(SRCARCH)/configs/$(1) \
> > - $(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
> > + $(call cmd,merge_fragments,$1,$2)
> > +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
> > endef
> >
> > @@ -22,8 +25,6 @@ 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/$(SRCARCH)/configs/$(1) \
> > - $(foreach config,$(2),$(srctree)/arch/$(SRCARCH)/configs/$(config).config)
> > + $(call cmd,merge_fragments,$1,$2,-Q)
> > +$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
> > endef
> > diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
> > index a0a0be38cbdc..fb50bd4f4103 100644
> > --- a/scripts/kconfig/Makefile
> > +++ b/scripts/kconfig/Makefile
> > @@ -105,9 +105,11 @@ configfiles = $(wildcard $(srctree)/kernel/configs/$(1) $(srctree)/arch/$(SRCARC
> > all-config-fragments = $(call configfiles,*.config)
> > config-fragments = $(call configfiles,$@)
> >
> > +cmd_merge_fragments = $(srctree)/scripts/kconfig/merge_config.sh -m $(KCONFIG_CONFIG) $(config-fragments)
>
> Did you mean to drop $(CONFIG_SHELL) here? I noticed you kept it in the
> other command.
For consistency, I will remove CONFIG_SHELL from both.
Thanks.
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-10 10:19 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-08 14:46 [PATCH] kbuild: suppress stdout from merge_config for silent builds Masahiro Yamada
2024-12-08 17:31 ` Nathan Chancellor
2024-12-10 10:19 ` Masahiro Yamada
2024-12-09 18:19 ` Leon Romanovsky
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox