[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7a707cc0-f360-4379-9278-b05e4bed6c5b@pengutronix.de>
Date: Tue, 25 Nov 2025 13:21:30 +0100
From: Ahmad Fatoum <a.fatoum@...gutronix.de>
To: Nathan Chancellor <nathan@...nel.org>
Cc: Nicolas Schier <nicolas.schier@...ux.dev>, Simon Glass
<sjg@...omium.org>, Thomas Weißschuh
<thomas.weissschuh@...utronix.de>, kernel@...gutronix.de,
linux-kernel@...r.kernel.org, linux-kbuild@...r.kernel.org,
Sascha Hauer <s.hauer@...gutronix.de>
Subject: Re: [PATCH] kbuild: add target to build a cpio containing modules
Hi Nathan,
On 11/20/25 7:39 AM, Nathan Chancellor wrote:
> On Sat, Nov 15, 2025 at 03:21:51PM +0100, Ahmad Fatoum wrote:
>> From: Sascha Hauer <s.hauer@...gutronix.de>
>> +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?
After incorporating Thomas' feedback, this is simplified to:
$(Q)$(MAKE) $(build)=usr usr/gen_init_cpio
which looks much better.
>> + $(call cmd,cpio)
>> +
>> +PHONY += cpio-modules-pkg
>> +cpio-modules-pkg: modules-$(KERNELRELEASE)-$(ARCH).cpio
>
> I think it would make a little more sense (and match the style of the
> perf package targets as well) to name this target modules-cpio-pkg.
It currently matches the style of the tar packages, which start with
tar-, but I can follow the perf- order. Makes more sense if it's
extended to support compressed cpios in future too.
Cheers,
Ahmad
>
>> + @:
>> +
>> # perf-tar*-src-pkg - generate a source tarball with perf source
>> # ---------------------------------------------------------------------------
>>
>> @@ -245,6 +261,7 @@ help:
>> @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball'
>> @echo ' tarxz-pkg - Build the kernel as a xz compressed tarball'
>> @echo ' tarzst-pkg - Build the kernel as a zstd compressed tarball'
>> + @echo ' cpio-modules-pkg - Build the kernel modules as cpio archive'
>> @echo ' perf-tar-src-pkg - Build the perf source tarball with no compression'
>> @echo ' perf-targz-src-pkg - Build the perf source tarball with gzip compression'
>> @echo ' perf-tarbz2-src-pkg - Build the perf source tarball with bz2 compression'
>>
>> ---
>> base-commit: e9a6fb0bcdd7609be6969112f3fbfcce3b1d4a7c
>> change-id: 20251115-cpio-modules-pkg-70d85a69892b
>>
>> Best regards,
>> --
>> Ahmad Fatoum <a.fatoum@...gutronix.de>
>>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists