[rdc] add the prereq-check on lzma
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.31 / 998-openwrt_lzma_options.patch
1 --- a/scripts/Makefile.lib
2 +++ b/scripts/Makefile.lib
3 @@ -228,5 +228,5 @@ cmd_bzip2 = (cat $(filter-out FORCE,$^)
4
5 quiet_cmd_lzma = LZMA $@
6 cmd_lzma = (cat $(filter-out FORCE,$^) | \
7 - lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
8 + lzma e -lc1 -lp2 -pb2 -eos -si -so && $(call size_append, $(filter-out FORCE,$^))) > $@ || \
9 (rm -f $@ ; false)
10 --- a/scripts/gen_initramfs_list.sh
11 +++ b/scripts/gen_initramfs_list.sh
12 @@ -225,7 +225,7 @@ cpio_list=
13 output="/dev/stdout"
14 output_file=""
15 is_cpio_compressed=
16 -compr="gzip -9 -f"
17 +compr="gzip -9 -f -"
18
19 arg="$1"
20 case "$arg" in
21 @@ -239,9 +239,9 @@ case "$arg" in
22 output_file="$1"
23 cpio_list="$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)"
24 output=${cpio_list}
25 - echo "$output_file" | grep -q "\.gz$" && compr="gzip -9 -f"
26 - echo "$output_file" | grep -q "\.bz2$" && compr="bzip2 -9 -f"
27 - echo "$output_file" | grep -q "\.lzma$" && compr="lzma -9 -f"
28 + echo "$output_file" | grep -q "\.gz$" && compr="gzip -9 -f -"
29 + echo "$output_file" | grep -q "\.bz2$" && compr="bzip2 -9 -f -"
30 + echo "$output_file" | grep -q "\.lzma$" && compr="lzma e -lc1 -lp2 -pb2 -eos -si -so"
31 echo "$output_file" | grep -q "\.cpio$" && compr="cat"
32 shift
33 ;;
34 @@ -292,7 +292,7 @@ if [ ! -z ${output_file} ]; then
35 if [ "${is_cpio_compressed}" = "compressed" ]; then
36 cat ${cpio_tfile} > ${output_file}
37 else
38 - (cat ${cpio_tfile} | ${compr} - > ${output_file}) \
39 + (cat ${cpio_tfile} | ${compr} > ${output_file}) \
40 || (rm -f ${output_file} ; false)
41 fi
42 [ -z ${cpio_file} ] && rm ${cpio_tfile}
This page took 0.050534 seconds and 5 git commands to generate.