summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2012-02-16 17:40:32 +0100
committerDave Reisner <dreisner@archlinux.org>2012-02-17 16:18:07 +0100
commit914d5b391105a40945a6f88911cf95a701e1c68c (patch)
tree163971e692fea71c30eb7e518f1f5649c6be441e
parent7e86a4dcfea86d87a29862a02b68ae37d7d1fb1e (diff)
downloadmkinitcpio-914d5b391105a40945a6f88911cf95a701e1c68c.tar.gz
mkinitcpio-914d5b391105a40945a6f88911cf95a701e1c68c.tar.xz
mkinitcpio: unzip modules before image compression
This increases compression efficiency, which might be useful on an image containing a lot of modules. For the usecase I had in mind, this reduced the size by about a quarter. Signed-off-by: Tom Gundersen <teg@jklm.no> Signed-off-by: Dave Reisner <dreisner@archlinux.org>
-rwxr-xr-xmkinitcpio3
1 files changed, 3 insertions, 0 deletions
diff --git a/mkinitcpio b/mkinitcpio
index f79fbcb..637795f 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -341,6 +341,9 @@ trap '(( ++builderrors ))' ERR
if (( ${#ADDED_MODULES[*]} )); then
cp "${MODPATHS[@]}" "$BUILDROOT/lib/modules/$KERNELVERSION/kernel"
+ # unzip modules prior to recompression
+ gzip -dr "$BUILDROOT/lib/modules/$KERNELVERSION/kernel"
+
msg "Generating module dependencies"
install -m644 -t "$BUILDROOT/lib/modules/$KERNELVERSION" \
"$BASEDIR/lib/modules/$KERNELVERSION"/modules.{builtin,order}