[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251201233654.GA2018462@ax162>
Date: Mon, 1 Dec 2025 16:36:54 -0700
From: Nathan Chancellor <nathan@...nel.org>
To: Nicolas Schier <nsc@...nel.org>
Cc: Nicolas Schier <nicolas.schier@...ux.dev>,
Ahmad Fatoum <a.fatoum@...gutronix.de>,
Sascha Hauer <s.hauer@...gutronix.de>,
Simon Glass <sjg@...omium.org>,
Thomas Weißschuh <thomas.weissschuh@...utronix.de>,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kbuild: Add top-level target for building gen_init_cpio
On Fri, Nov 28, 2025 at 09:01:55PM +0100, Nicolas Schier wrote:
> Add a top-level target for building gen_init_cpio to prevent re-entering
> kbuild for 'modules-cpio-pkg'.
>
> The recently introduced target 'modules-cpio-pkg' depends on
> gen_init_cpio but there is no simple way to add this dependency as a
> prerequisite that can be built in parallel to other recipes.
>
> Introducing the top-level target, enables fixing this and also prepares
> a possible move of gen_init_cpio from usr/ to scripts/.
>
> Signed-off-by: Nicolas Schier <nsc@...nel.org>
Reviewed-by: Nathan Chancellor <nathan@...nel.org>
Tested-by: Nathan Chancellor <nathan@...nel.org>
Do you want to take this for a late 6.19 features pull request or should
I pick it up during the 6.20 cycle?
> ---
> Makefile | 6 ++++++
> scripts/Makefile.package | 1 -
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 17cfa11ca716..d5750e5bd633 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1383,6 +1383,10 @@ ifdef CONFIG_HEADERS_INSTALL
> prepare: headers
> endif
>
> +PHONY += usr_gen_init_cpio
> +usr_gen_init_cpio: scripts_basic
> + $(Q)$(MAKE) $(build)=usr usr/gen_init_cpio
> +
> PHONY += scripts_unifdef
> scripts_unifdef: scripts_basic
> $(Q)$(MAKE) $(build)=scripts scripts/unifdef
> @@ -1635,6 +1639,8 @@ distclean: mrproper
> # Packaging of the kernel to various formats
> # ---------------------------------------------------------------------------
>
> +modules-cpio-pkg: usr_gen_init_cpio
> +
> %src-pkg: FORCE
> $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.package $@
> %pkg: include/config/kernel.release FORCE
> diff --git a/scripts/Makefile.package b/scripts/Makefile.package
> index 83bfcf7cb09f..0ec946f9b905 100644
> --- a/scripts/Makefile.package
> +++ b/scripts/Makefile.package
> @@ -201,7 +201,6 @@ quiet_cmd_cpio = CPIO $@
> cmd_cpio = $(CONFIG_SHELL) $(srctree)/usr/gen_initramfs.sh -o $@ $<
>
> modules-$(KERNELRELEASE)-$(ARCH).cpio: .tmp_modules_cpio
> - $(Q)$(MAKE) $(build)=usr usr/gen_init_cpio
> $(call cmd,cpio)
>
> PHONY += modules-cpio-pkg
>
> ---
> base-commit: cb6649f6217c0331b885cf787f1d175963e2a1d2
> change-id: 20251128-kbuild-add-top-level-target-for-building-gen_init_cpio-6401e0ee0710
> prerequisite-message-id: 20251125-cpio-modules-pkg-v2-0-aa8277d89682@...gutronix.de
> prerequisite-patch-id: 9132e567c46357daaf2bd728ff18bfda1c51a9cb
> prerequisite-patch-id: 0dfe03db654169d314d3baaba8536a9bfc9bcc70
>
> Best regards,
> --
> Nicolas
>
Powered by blists - more mailing lists