]>
Commit | Line | Data |
---|---|---|
05f63260 AM |
1 | Index: geninitrd |
2 | =================================================================== | |
3 | --- geninitrd (wersja 10524) | |
4 | +++ geninitrd (kopia robocza) | |
f99b3add AM |
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]" | |
474d9c7c | 10 | + echo " [--compress=yes|xz|lzma|bzip2|gzip]" |
f99b3add AM |
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' | |
474d9c7c | 19 | + local compressors='xz lzma bzip2 gzip' |
f99b3add AM |
20 | |
21 | # a specified one, take it | |
22 | if ! is_yes "$mode"; then | |
474d9c7c | 23 | @@ -802,9 +802,13 @@ |
f99b3add AM |
24 | local c prog map=/boot/System.map-$kernel |
25 | for c in $compressors; do | |
26 | case $c in | |
f99b3add | 27 | + xz) |
474d9c7c AM |
28 | + sym=unxz |
29 | + prog=/usr/bin/xz | |
30 | + ;; | |
31 | lzma) | |
f99b3add AM |
32 | sym=unlzma |
33 | - prog=/usr/bin/lzma | |
34 | + prog=/usr/bin/xz | |
35 | ;; | |
36 | bzip2) | |
37 | sym=bzip2 | |
474d9c7c | 38 | @@ -1327,8 +1331,12 @@ |
f99b3add | 39 | # TODO: the image name (specified from kernel.spec) already contains |
05f63260 AM |
40 | # extension, which is .gz most of the time. |
41 | case "$compressor" in | |
f99b3add | 42 | + xz) |
474d9c7c AM |
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" | |
016ef81b | 48 | + xz --format=lzma -9 < "$IMAGE" > "$tmp" |
05f63260 AM |
49 | ;; |
50 | bzip2) | |
51 | bzip2 -9 < "$IMAGE" > "$tmp" |