SVN: geninitrd/trunk/geninitrd

arekm arekm at pld-linux.org
Thu Jan 13 21:01:31 CET 2011


Author: arekm
Date: Thu Jan 13 21:01:30 2011
New Revision: 12041

Modified:
   geninitrd/trunk/geninitrd
Log:
LZO initrd compression support (fastest).

Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd	(original)
+++ geninitrd/trunk/geninitrd	Thu Jan 13 21:01:30 2011
@@ -46,7 +46,7 @@
 usage() {
 	echo "Usage: $PROGRAM [--version] [-v] [-f] [--ifneeded] [--preload <module>]"
 	echo "       [--with=<module>] [--image-version] [--fstab=<fstab>] [--nocompress]"
-	echo "       [--compress=yes|xz|lzma|bzip2|gzip]"
+	echo "       [--compress=yes|xz|lzma|bzip2|gzip|lzo]"
 	echo "       [--initrdfs=rom|initramfs|ext2|cram] [--modules-conf=<modules.conf>]"
 	echo "       [--with-bootsplash] [--without-bootsplash]"
 	echo "       [--with-fbsplash] [--without-fbsplash]"
@@ -828,7 +828,7 @@
 find_compressor() {
 	local mode="$1"
 	# the best compressor list
-	local compressors='xz lzma bzip2 gzip'
+	local compressors='xz lzma bzip2 gzip lzo'
 
 	# a specified one, take it
 	if ! is_yes "$mode"; then
@@ -856,6 +856,10 @@
 			sym=gunzip
 			prog=/bin/gzip
 			;;
+		lzo)
+			sym=unlzo
+			prog=/usr/bin/lzop
+			;;
 		*)
 			die "Unknown compressor $c"
 			;;
@@ -890,6 +894,9 @@
 	gzip)
 		gzip -9 < "$IMAGE" > "$tmp" || return $?
 		;;
+	lzo)
+		lzop -9 < "$IMAGE" > "$tmp" || return $?
+		;;
 	esac
 
 	mv -f "$tmp" "$target"


More information about the pld-cvs-commit mailing list