Add "fastest" to supported initrd compressions
authorSebastian Pipping <sebastian@pipping.org>
Sun, 8 Apr 2012 18:24:14 +0000 (20:24 +0200)
committerSebastian Pipping <sebastian@pipping.org>
Sun, 8 Apr 2012 18:27:17 +0000 (20:27 +0200)
ChangeLog
gen_initramfs.sh
genkernel.conf

index 2533e5878da3e5719c71ef4ce57fe1edad15655f..2db901af942eb71ee6b2c8d5918e559d0d0d836a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@
 # Distributed under the GPL v2
 # $Id$
 
+  08 Apr 2012; Sebastian Pipping <sping@gentoo.org> gen_initramfs.sh,
+  genkernel.conf:
+  Add "fastest" to supported initrd compressions
+
   08 Apr 2012; Sebastian Pipping <sping@gentoo.org> gen_initramfs.sh:
   Support comression "lzop" (not just "lzo") as wrongly advertised by comments
   in genkernel.conf before
index 082d5252e60674e1f41f00be1c706797f431420c..4838234f90236a478a2ab945d85b71c04fbf38a1 100755 (executable)
@@ -714,7 +714,7 @@ create_initramfs() {
                        case ${COMPRESS_INITRD_TYPE} in
                                xz|lzma|bzip2|gzip|lzop) compression=${COMPRESS_INITRD_TYPE} ;;
                                lzo) compression=lzop ;;
-                               best)
+                               best|fastest)
                                        for tuple in \
                                                        'CONFIG_RD_XZ    cmd_xz    xz' \
                                                        'CONFIG_RD_LZMA  cmd_lzma  lzma' \
@@ -726,7 +726,7 @@ create_initramfs() {
                                                cmd_variable_name=$2
                                                if grep -sq "^${kernel_option}=y" ${KERNEL_DIR}/.config && test -n "${!cmd_variable_name}" ; then
                                                        compression=$3
-                                                       break
+                                                       [[ ${COMPRESS_INITRD_TYPE} == best ]] && break
                                                fi
                                        done
                                        ;;
index 0d14271fbc9f2206be408363ce0caf35ee1e3b09..c5e7aee90671cab2b4c84ec9cbe76ca1420a039d 100644 (file)
@@ -314,8 +314,9 @@ GPG_BINCACHE="%%CACHE%%/gnupg-${GPG_VER}-%%ARCH%%.bz2"
 
 # Compress generated initramfs
 #COMPRESS_INITRD="yes"
-# Types of compression: best, xz, lzma, bzip2, gzip, lzop
+# Types of compression: best, xz, lzma, bzip2, gzip, lzop, fastest
 # "best" selects the best available compression method
+# "fastest" selects the fastest available compression method
 #COMPRESS_INITRD_TYPE="best"