SVN: geninitrd/trunk/geninitrd
arekm
arekm at pld-linux.org
Fri Sep 4 14:59:35 CEST 2009
Author: arekm
Date: Fri Sep 4 14:59:35 2009
New Revision: 10528
Modified:
geninitrd/trunk/geninitrd
Log:
lzma back as lzma. xz as new format (kernel patches pending http://ctrl.tukaani.org/xz/)
Modified: geninitrd/trunk/geninitrd
==============================================================================
--- geninitrd/trunk/geninitrd (original)
+++ geninitrd/trunk/geninitrd Fri Sep 4 14:59:35 2009
@@ -47,7 +47,7 @@
uname_r=$(uname -r)
echo "usage: $PROGRAM [--version] [-v] [-f] [--ifneeded] [--preload <module>]"
echo " [--with=<module>] [--image-version] [--fstab=<fstab>] [--nocompress]"
- echo " [--compress=yes|xz|bzip2|gzip]"
+ echo " [--compress=yes|xz|lzma|bzip2|gzip]"
echo " [--initrdfs=rom|initramfs|ext2|cram] [--modules-conf=<modules.conf>]"
echo " [--with-bootsplash] [--without-bootsplash]"
echo " [--with-fbsplash] [--without-fbsplash]"
@@ -790,7 +790,7 @@
find_compressor() {
local mode="$1"
# the best compressor list
- local compressors='xz bzip2 gzip'
+ local compressors='xz lzma bzip2 gzip'
# a specified one, take it
if ! is_yes "$mode"; then
@@ -803,6 +803,10 @@
for c in $compressors; do
case $c in
xz)
+ sym=unxz
+ prog=/usr/bin/xz
+ ;;
+ lzma)
sym=unlzma
prog=/usr/bin/xz
;;
@@ -1328,6 +1332,9 @@
# extension, which is .gz most of the time.
case "$compressor" in
xz)
+ xz --format=xz -9 < "$IMAGE" > "$tmp"
+ ;;
+ lzma)
xz --format=lzma -9 < "$IMAGE" > "$tmp"
;;
bzip2)
More information about the pld-cvs-commit
mailing list