linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Schier <nsc@kernel.org>
To: Nathan Chancellor <nathan@kernel.org>
Cc: "Ahmad Fatoum" <a.fatoum@pengutronix.de>,
	"Simon Glass" <sjg@chromium.org>,
	"Thomas Weißschuh" <thomas.weissschuh@linutronix.de>,
	kernel@pengutronix.de, linux-kernel@vger.kernel.org,
	linux-kbuild@vger.kernel.org,
	"Sascha Hauer" <s.hauer@pengutronix.de>
Subject: Re: [PATCH] kbuild: add target to build a cpio containing modules
Date: Wed, 26 Nov 2025 22:03:04 +0100	[thread overview]
Message-ID: <aSdrCFkUQup3qb-q@derry.ads.avm.de> (raw)
In-Reply-To: <20251120063936.GA3321365@ax162>

On Wed, Nov 19, 2025 at 11:39:36PM -0700, Nathan Chancellor wrote:
...
> > diff --git a/scripts/Makefile.package b/scripts/Makefile.package
> > index 74bcb9e7f7a4516473481468a0fcf700c3bead33..20eec9e2dec4dda3fa0ef64a15b80dccdcb55f90 100644
> > --- a/scripts/Makefile.package
> > +++ b/scripts/Makefile.package
> > @@ -189,6 +189,22 @@ tar-pkg: linux-$(KERNELRELEASE)-$(ARCH).tar
> >  tar%-pkg: linux-$(KERNELRELEASE)-$(ARCH).tar.% FORCE
> >  	@:
> >  
> > +modules-install: FORCE
> > +	$(Q)$(MAKE) -f $(srctree)/Makefile
> > +	$(Q)rm -rf $@
> > +	$(Q)$(MAKE) -f $(srctree)/Makefile INSTALL_MOD_PATH=$@ modules_install
> > +
> > +quiet_cmd_cpio = CPIO    $@
> > +      cmd_cpio = $(srctree)/usr/gen_initramfs.sh $< > $@
> > +
> > +modules-$(KERNELRELEASE)-$(ARCH).cpio: modules-install
> > +	$(Q)$(MAKE) -f $(srctree)/Makefile $(build)=usr cpio-data= usr/gen_init_cpio
> 
> This seems like a bit of a hack to generate gen_init_cpio this way but I
> am not sure it is worth moving usr/gen_init_cpio.c and
> usr/gen_initramfs.sh elsewhere (scripts?) to make it a most accessible
> hostprog right now... Nicolas, do you have any opinions on this?

Yes, it feels hacky to me, too.  After digging into this a bit, I am in
favor of moving at least gen_init* and friends to scripts/.  I can
prepare a patch in a few days.

Kind regards,
Nicolas

  parent reply	other threads:[~2025-11-28 19:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-15 14:21 [PATCH] kbuild: add target to build a cpio containing modules Ahmad Fatoum
2025-11-19 18:25 ` Simon Glass
2025-11-20  6:39 ` Nathan Chancellor
2025-11-25 12:21   ` Ahmad Fatoum
2025-11-26 21:03   ` Nicolas Schier [this message]
2025-11-20  7:32 ` Thomas Weißschuh
2025-11-25 12:07   ` Ahmad Fatoum
2025-11-25 12:52     ` Thomas Weißschuh

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=aSdrCFkUQup3qb-q@derry.ads.avm.de \
    --to=nsc@kernel.org \
    --cc=a.fatoum@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nathan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).