]> git.pld-linux.org Git - packages/geninitrd.git/blobdiff - geninitrd-lzma.patch
- There was an empty man file in sources, so make was not regenerating this
[packages/geninitrd.git] / geninitrd-lzma.patch
index 80be7b2558dcc1650bd674aadfd17d19ecd9c9ae..6b015cb733a69801d5afce45cdb61be3f1cb8f91 100644 (file)
@@ -2,12 +2,50 @@ Index: geninitrd
 ===================================================================
 --- geninitrd  (wersja 10524)
 +++ geninitrd  (kopia robocza)
-@@ -1328,7 +1328,7 @@
+@@ -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|lzma|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='lzma bzip2 gzip'
++      local compressors='xz lzma bzip2 gzip'
+       # a specified one, take it
+       if ! is_yes "$mode"; then
+@@ -802,9 +802,13 @@
+       local c prog map=/boot/System.map-$kernel
+       for c in $compressors; do
+               case $c in
++              xz)
++                      sym=unxz
++                      prog=/usr/bin/xz
++                      ;;
+               lzma)
+                       sym=unlzma
+-                      prog=/usr/bin/lzma
++                      prog=/usr/bin/xz
+                       ;;
+               bzip2)
+                       sym=bzip2
+@@ -1327,8 +1331,12 @@
+       # TODO: the image name (specified from kernel.spec) already contains
        # extension, which is .gz most of the time.
        case "$compressor" in
++      xz)
++              # don't use -9 here since kernel won't understand it
++              xz --format=xz --check=crc32 --lzma2=preset=6e,dict=1MiB < "$IMAGE" > "$tmp"
++              ;;
        lzma)
 -              lzma -9 < "$IMAGE" > "$tmp"
-+              lzma < "$IMAGE" > "$tmp"
++              xz --format=lzma -9 < "$IMAGE" > "$tmp"
                ;;
        bzip2)
                bzip2 -9 < "$IMAGE" > "$tmp"
This page took 0.040266 seconds and 4 git commands to generate.