mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 21:02:43 +01:00
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 <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested-by: Simon Glass <[email protected]> Co-developed-by: Ahmad Fatoum <[email protected]> Signed-off-by: Ahmad Fatoum <[email protected]> Reviewed-by: Thomas Weißschuh <[email protected]> Reviewed-by: Nathan Chancellor <[email protected]> Tested-by: Nathan Chancellor <[email protected]> Tested-by: Nicolas Schier <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Nicolas Schier <[email protected]>
This commit is contained in:
1 parent
c83c9564cd
commit
2a9c8c0b59
1 file changed
+20
@@ -189,6 +189,25 @@ tar-pkg: linux-$(KERNELRELEASE)-$(ARCH).tar
|
||||
tar%-pkg: linux-$(KERNELRELEASE)-$(ARCH).tar.% FORCE
|
||||
@:
|
||||
|
||||
# modules-cpio-pkg - generate an initramfs with the modules
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
.tmp_modules_cpio: 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 = $(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
|
||||
modules-cpio-pkg: modules-$(KERNELRELEASE)-$(ARCH).cpio
|
||||
@:
|
||||
|
||||
# perf-tar*-src-pkg - generate a source tarball with perf source
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
@@ -245,6 +264,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 ' modules-cpio-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'
|
||||
|
||||
Reference in new issue
Block a user