source: trunk/target/linux/generic/patches-2.6.37/998-openwrt_lzma_options.patch @ 25483

Last change on this file since 25483 was 25483, checked in by florian, 5 years ago

[kernel] refresh 2.6.37 patches

File size: 1.9 KB
  • scripts/Makefile.lib

    a b cmd_bzip2 = (cat $(filter-out FORCE,$^) 
    231231 
    232232quiet_cmd_lzma = LZMA    $@ 
    233233cmd_lzma = (cat $(filter-out FORCE,$^) | \ 
    234         lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ 
     234        lzma e -d20 -lc1 -lp2 -pb2 -eos -si -so && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ 
    235235        (rm -f $@ ; false) 
    236236 
    237237quiet_cmd_lzo = LZO     $@ 
  • scripts/gen_initramfs_list.sh

    a b cpio_list= 
    226226output="/dev/stdout" 
    227227output_file="" 
    228228is_cpio_compressed= 
    229 compr="gzip -9 -f" 
     229compr="gzip -9 -f -" 
    230230 
    231231arg="$1" 
    232232case "$arg" in 
    case "$arg" in 
    240240                output_file="$1" 
    241241                cpio_list="$(mktemp ${TMPDIR:-/tmp}/cpiolist.XXXXXX)" 
    242242                output=${cpio_list} 
    243                 echo "$output_file" | grep -q "\.gz$" && compr="gzip -9 -f" 
    244                 echo "$output_file" | grep -q "\.bz2$" && compr="bzip2 -9 -f" 
    245                 echo "$output_file" | grep -q "\.lzma$" && compr="lzma -9 -f" 
     243                echo "$output_file" | grep -q "\.gz$" && compr="gzip -9 -f -" 
     244                echo "$output_file" | grep -q "\.bz2$" && compr="bzip2 -9 -f -" 
     245                echo "$output_file" | grep -q "\.lzma$" && compr="lzma e -d20 -lc1 -lp2 -pb2 -eos -si -so" 
    246246                echo "$output_file" | grep -q "\.lzo$" && compr="lzop -9 -f" 
    247247                echo "$output_file" | grep -q "\.cpio$" && compr="cat" 
    248248                shift 
    if [ ! -z ${output_file} ]; then 
    294294        if [ "${is_cpio_compressed}" = "compressed" ]; then 
    295295                cat ${cpio_tfile} > ${output_file} 
    296296        else 
    297                 (cat ${cpio_tfile} | ${compr}  - > ${output_file}) \ 
     297                (cat ${cpio_tfile} | ${compr} > ${output_file}) \ 
    298298                || (rm -f ${output_file} ; false) 
    299299        fi 
    300300        [ -z ${cpio_file} ] && rm ${cpio_tfile} 
  • lib/decompress.c

    a b static const struct compress_format { 
    3636        { {037, 0236}, "gzip", gunzip }, 
    3737        { {0x42, 0x5a}, "bzip2", bunzip2 }, 
    3838        { {0x5d, 0x00}, "lzma", unlzma }, 
     39        { {0x6d, 0x00}, "lzma-openwrt", unlzma }, 
    3940        { {0x89, 0x4c}, "lzo", unlzo }, 
    4041        { {0, 0}, NULL, NULL } 
    4142}; 
Note: See TracBrowser for help on using the repository browser.