All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nathan Chancellor <nathan@kernel.org>
To: Nicolas Schier <nsc@kernel.org>
Cc: "Nicolas Schier" <nicolas.schier@linux.dev>,
	"Ahmad Fatoum" <a.fatoum@pengutronix.de>,
	"Sascha Hauer" <s.hauer@pengutronix.de>,
	"Simon Glass" <sjg@chromium.org>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kbuild: Add top-level target for building gen_init_cpio
Date: Mon, 1 Dec 2025 16:36:54 -0700	[thread overview]
Message-ID: <20251201233654.GA2018462@ax162> (raw)
In-Reply-To: <20251128-kbuild-add-top-level-target-for-building-gen_init_cpio-v1-1-84c63a8fc8d4@kernel.org>

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@kernel.org>

Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.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@pengutronix.de
> prerequisite-patch-id: 9132e567c46357daaf2bd728ff18bfda1c51a9cb
> prerequisite-patch-id: 0dfe03db654169d314d3baaba8536a9bfc9bcc70
> 
> Best regards,
> -- 
> Nicolas
> 

  reply	other threads:[~2025-12-01 23:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-28 20:01 [PATCH] kbuild: Add top-level target for building gen_init_cpio Nicolas Schier
2025-12-01 23:36 ` Nathan Chancellor [this message]
2025-12-19 21:58 ` Nathan Chancellor

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=20251201233654.GA2018462@ax162 \
    --to=nathan@kernel.org \
    --cc=a.fatoum@pengutronix.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nicolas.schier@linux.dev \
    --cc=nsc@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=sjg@chromium.org \
    --cc=thomas.weissschuh@linutronix.de \
    /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.