[arch-projects] [mkinitcpio][PATCH] modules: use uncompressed modules

Tom Gundersen teg at jklm.no
Mon Feb 13 17:34:25 EST 2012

This increases compression efficiency, which might be useful on an
image containing a lot of modules.

For the usecase I have in mind, this reduced the size by about a quarter.

Signed-off-by: Tom Gundersen <teg at jklm.no>
 mkinitcpio |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/mkinitcpio b/mkinitcpio
index 677f608..82e2d25 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -349,6 +349,8 @@ if (( ${#ADDED_MODULES[*]} )); then
     msg "Generating module dependencies"
     install -m644 -t "$BUILDROOT/lib/modules/$KERNELVERSION" \
+    # improve overall compression by storing each module uncompressed
+    gunzip -r "$BUILDROOT/lib/modules/$KERNELVERSION"
     depmod -b "$BUILDROOT" "${KERNELVERSION}"
     # remove all non-binary module.* files (except devname for on-demand module loading)

More information about the arch-projects mailing list