Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

kbuild: add target to build a cpio containing modules

Add a new package target to build a cpio archive containing the kernel
modules. This is particularly useful to supplement an existing initramfs
with the kernel modules so that the root filesystem can be started with
all needed kernel modules without modifying it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Co-developed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Reviewed-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nicolas Schier <nsc@kernel.org>
Link: https://patch.msgid.link/20251125-cpio-modules-pkg-v2-2-aa8277d89682@pengutronix.de
Signed-off-by: Nicolas Schier <nsc@kernel.org>

authored by

Sascha Hauer and committed by
Nicolas Schier
2a9c8c0b c83c9564

+20
+20
scripts/Makefile.package
··· 189 189 tar%-pkg: linux-$(KERNELRELEASE)-$(ARCH).tar.% FORCE 190 190 @: 191 191 192 + # modules-cpio-pkg - generate an initramfs with the modules 193 + # --------------------------------------------------------------------------- 194 + 195 + .tmp_modules_cpio: FORCE 196 + $(Q)$(MAKE) -f $(srctree)/Makefile 197 + $(Q)rm -rf $@ 198 + $(Q)$(MAKE) -f $(srctree)/Makefile INSTALL_MOD_PATH=$@ modules_install 199 + 200 + quiet_cmd_cpio = CPIO $@ 201 + cmd_cpio = $(CONFIG_SHELL) $(srctree)/usr/gen_initramfs.sh -o $@ $< 202 + 203 + modules-$(KERNELRELEASE)-$(ARCH).cpio: .tmp_modules_cpio 204 + $(Q)$(MAKE) $(build)=usr usr/gen_init_cpio 205 + $(call cmd,cpio) 206 + 207 + PHONY += modules-cpio-pkg 208 + modules-cpio-pkg: modules-$(KERNELRELEASE)-$(ARCH).cpio 209 + @: 210 + 192 211 # perf-tar*-src-pkg - generate a source tarball with perf source 193 212 # --------------------------------------------------------------------------- 194 213 ··· 264 245 @echo ' tarbz2-pkg - Build the kernel as a bzip2 compressed tarball' 265 246 @echo ' tarxz-pkg - Build the kernel as a xz compressed tarball' 266 247 @echo ' tarzst-pkg - Build the kernel as a zstd compressed tarball' 248 + @echo ' modules-cpio-pkg - Build the kernel modules as cpio archive' 267 249 @echo ' perf-tar-src-pkg - Build the perf source tarball with no compression' 268 250 @echo ' perf-targz-src-pkg - Build the perf source tarball with gzip compression' 269 251 @echo ' perf-tarbz2-src-pkg - Build the perf source tarball with bz2 compression'