From 66e5a247041af5406dfbc90acda436c3db0fa463 Mon Sep 17 00:00:00 2001 From: Sebastian Pipping Date: Sun, 8 Apr 2012 20:24:14 +0200 Subject: [PATCH] Add "fastest" to supported initrd compressions --- ChangeLog | 4 ++++ gen_initramfs.sh | 4 ++-- genkernel.conf | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2533e58..2db901a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ # Distributed under the GPL v2 # $Id$ + 08 Apr 2012; Sebastian Pipping gen_initramfs.sh, + genkernel.conf: + Add "fastest" to supported initrd compressions + 08 Apr 2012; Sebastian Pipping gen_initramfs.sh: Support comression "lzop" (not just "lzo") as wrongly advertised by comments in genkernel.conf before diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 082d525..4838234 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -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 ;; diff --git a/genkernel.conf b/genkernel.conf index 0d14271..c5e7aee 100644 --- a/genkernel.conf +++ b/genkernel.conf @@ -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" -- 2.26.2