summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2009-06-06 22:31:35 +0200
committerThomas Bächler <thomas@archlinux.org>2009-06-06 22:31:35 +0200
commit35fea002c27f6c1124a28535e379d7edf34a127e (patch)
treed36563babc017b178274ad7942ddf775ed46fa93
parent822a88700e3aeb7432c1a4dc0ede4c20494f6fcb (diff)
downloadmkinitcpio-35fea002c27f6c1124a28535e379d7edf34a127e.tar.gz
mkinitcpio-35fea002c27f6c1124a28535e379d7edf34a127e.tar.xz
Add support for lzma and bzip2 compression for the image
-rwxr-xr-xmkinitcpio3
-rw-r--r--mkinitcpio.conf8
2 files changed, 10 insertions, 1 deletions
diff --git a/mkinitcpio b/mkinitcpio
index 0503006..0b0beeb 100755
--- a/mkinitcpio
+++ b/mkinitcpio
@@ -32,6 +32,7 @@ SKIPHOOKS=""
PRESETDIR="mkinitcpio.d"
QUIET="y"
SHOW_AUTOMODS="n"
+COMPRESSION="gzip"
# Add /{,usr}/sbin to path
# works around undetected problems like in #8448
@@ -275,7 +276,7 @@ fi
status=0
if [ -n "${GENIMG}" ]; then
echo -n ":: Generating image '${GENIMG}'..."
- if ! /sbin/gen_init_cpio ${FILELIST} | gzip -9 > "${GENIMG}"; then
+ if ! /sbin/gen_init_cpio ${FILELIST} | ${COMPRESSION} -9 > "${GENIMG}"; then
echo "FAILED"
status=1
else
diff --git a/mkinitcpio.conf b/mkinitcpio.conf
index 808734f..7b2c98c 100644
--- a/mkinitcpio.conf
+++ b/mkinitcpio.conf
@@ -56,3 +56,11 @@ FILES=""
# This setup loads an lvm2 volume group on a usb device.
# HOOKS="base udev usb lvm2 filesystems"
HOOKS="base udev autodetect pata scsi sata filesystems"
+
+# COMPRESSION
+# Use this to compress the initramfs image. With kernels earlier than
+# 2.6.30, only gzip is supported, which is also the default. Newer kernels
+# support gzip, bzip2 and lzma.
+#COMPRESSION="gzip"
+#COMPRESSION="bzip2"
+#COMPRESSION="lzma"