ar71xx: build different firmware images for the DIR-825-Bx boards
[openwrt.git] / target / linux / generic-2.6 / patches-2.6.30 / 998-openwrt_lzma_options.patch
1 --- a/scripts/Makefile.lib
2 +++ b/scripts/Makefile.lib
3 @@ -204,4 +204,4 @@ cmd_bzip2 = (bzip2 -9 < $< && $(size_app
4 # ---------------------------------------------------------------------------
5
6 quiet_cmd_lzma = LZMA $@
7 -cmd_lzma = (lzma -9 -c $< && $(size_append) $<) >$@ || (rm -f $@ ; false)
8 +cmd_lzma = lzma e $< $@ -lc1 -lp2 -pb2 -eos
9 --- a/scripts/gen_initramfs_list.sh
10 +++ b/scripts/gen_initramfs_list.sh
11 @@ -225,7 +225,7 @@ cpio_list=
12 output="/dev/stdout"
13 output_file=""
14 is_cpio_compressed=
15 -compr="gzip -9 -f"
16 +compr="gzip -9 -f -"
17
18 arg="$1"
19 case "$arg" in
20 @@ -239,9 +239,9 @@ case "$arg" in
21 output_file="$1"
22 cpio_list="$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)"
23 output=${cpio_list}
24 - echo "$output_file" | grep -q "\.gz$" && compr="gzip -9 -f"
25 - echo "$output_file" | grep -q "\.bz2$" && compr="bzip2 -9 -f"
26 - echo "$output_file" | grep -q "\.lzma$" && compr="lzma -9 -f"
27 + echo "$output_file" | grep -q "\.gz$" && compr="gzip -9 -f -"
28 + echo "$output_file" | grep -q "\.bz2$" && compr="bzip2 -9 -f -"
29 + echo "$output_file" | grep -q "\.lzma$" && compr="lzma e -d20 -lc1 -lp2 -pb2 -si -so"
30 echo "$output_file" | grep -q "\.cpio$" && compr="cat"
31 shift
32 ;;
33 @@ -292,7 +292,7 @@ if [ ! -z ${output_file} ]; then
34 if [ "${is_cpio_compressed}" = "compressed" ]; then
35 cat ${cpio_tfile} > ${output_file}
36 else
37 - (cat ${cpio_tfile} | ${compr} - > ${output_file}) \
38 + (cat ${cpio_tfile} | ${compr} > ${output_file}) \
39 || (rm -f ${output_file} ; false)
40 fi
41 [ -z ${cpio_file} ] && rm ${cpio_tfile}
42 --- a/lib/decompress.c
43 +++ b/lib/decompress.c
44 @@ -32,6 +32,7 @@ static const struct compress_format {
45 { {037, 0236}, "gzip", gunzip },
46 { {0x42, 0x5a}, "bzip2", bunzip2 },
47 { {0x5d, 0x00}, "lzma", unlzma },
48 + { {0x6d, 0x00}, "lzma-openwrt", unlzma },
49 { {0, 0}, NULL, NULL }
50 };
51
This page took 0.046956 seconds and 5 git commands to generate.