]> git.pld-linux.org Git - packages/geninitrd.git/blob - geninitrd-lzma.patch
- There was an empty man file in sources, so make was not regenerating this
[packages/geninitrd.git] / geninitrd-lzma.patch
1 Index: geninitrd
2 ===================================================================
3 --- geninitrd   (wersja 10524)
4 +++ geninitrd   (kopia robocza)
5 @@ -47,7 +47,7 @@
6         uname_r=$(uname -r)
7         echo "usage: $PROGRAM [--version] [-v] [-f] [--ifneeded] [--preload <module>]"
8         echo "       [--with=<module>] [--image-version] [--fstab=<fstab>] [--nocompress]"
9 -       echo "       [--compress=yes|lzma|bzip2|gzip]"
10 +       echo "       [--compress=yes|xz|lzma|bzip2|gzip]"
11         echo "       [--initrdfs=rom|initramfs|ext2|cram] [--modules-conf=<modules.conf>]"
12         echo "       [--with-bootsplash] [--without-bootsplash]"
13         echo "       [--with-fbsplash] [--without-fbsplash]"
14 @@ -790,7 +790,7 @@
15  find_compressor() {
16         local mode="$1"
17         # the best compressor list
18 -       local compressors='lzma bzip2 gzip'
19 +       local compressors='xz lzma bzip2 gzip'
20  
21         # a specified one, take it
22         if ! is_yes "$mode"; then
23 @@ -802,9 +802,13 @@
24         local c prog map=/boot/System.map-$kernel
25         for c in $compressors; do
26                 case $c in
27 +               xz)
28 +                       sym=unxz
29 +                       prog=/usr/bin/xz
30 +                       ;;
31                 lzma)
32                         sym=unlzma
33 -                       prog=/usr/bin/lzma
34 +                       prog=/usr/bin/xz
35                         ;;
36                 bzip2)
37                         sym=bzip2
38 @@ -1327,8 +1331,12 @@
39         # TODO: the image name (specified from kernel.spec) already contains
40         # extension, which is .gz most of the time.
41         case "$compressor" in
42 +       xz)
43 +               # don't use -9 here since kernel won't understand it
44 +               xz --format=xz --check=crc32 --lzma2=preset=6e,dict=1MiB < "$IMAGE" > "$tmp"
45 +               ;;
46         lzma)
47 -               lzma -9 < "$IMAGE" > "$tmp"
48 +               xz --format=lzma -9 < "$IMAGE" > "$tmp"
49                 ;;
50         bzip2)
51                 bzip2 -9 < "$IMAGE" > "$tmp"
This page took 0.513378 seconds and 3 git commands to generate.