@@ -125,6 +125,17 @@ KBUILD_EXTRA_SYMBOLS
For modules use symbols from another modules.
See more details in modules.txt.
+KBUILD_MODULES_COMPRESS
+--------------------------------------------------
+By default, kbuild will compress modules with gzip -9 compression to
+reduce disk space. The KBUILD_MODULES_COMPRESS make parameter can be
+used to set an alternate compression level or disable compression
+entirely.
+Example for using the standard gzip compression level:
+ make KBUILD_MODULES_COMPRESS="-6"
+Disabling compression:
+ make KBUILD_MODULES_COMPRESS=""
+
ALLSOURCE_ARCHS
--------------------------------------------------
For tags/TAGS/cscope targets, you can specify more than one archs
@@ -16,9 +16,13 @@ PHONY += $(modules)
__modinst: $(modules)
@:
+KBUILD_MODULES_COMPRESS ?= -9
quiet_cmd_modules_install = INSTALL $@
cmd_modules_install = mkdir -p $(2); \
- $(mod_strip_cmd) $@ $(2)/$(notdir $@) || cp $@ $(2)
+ $(mod_strip_cmd) $@ $(2)/$(notdir $@) || cp $@ $(2); \
+ $(if ${KBUILD_MODULES_COMPRESS}, \
+ gzip -f ${KBUILD_MODULES_COMPRESS} \
+ $(2)/$(notdir $@), )
# Modules built outside the kernel source tree go into extra by default
INSTALL_MOD_DIR ?= extra