--- zzzz-none-000/linux-4.4.60/scripts/gen_initramfs_list.sh 2017-04-08 07:53:53.000000000 +0000 +++ dragonfly-4020-701/linux-4.4.60/scripts/gen_initramfs_list.sh 2018-11-08 13:36:17.000000000 +0000 @@ -59,6 +59,18 @@ EOF } +list_openwrt_initramfs() { + : +} + +openwrt_initramfs() { + # make sure that /dev/console exists + cat <<-EOF >> ${output} + dir /dev 0755 0 0 + nod /dev/console 0600 0 0 c 5 1 + EOF +} + filetype() { local argv1="$1" @@ -177,6 +189,8 @@ if [ "$(echo "${dirlist}" | wc -l)" -gt 1 ]; then ${dep_list}print_mtime "$1" + ${dep_list}openwrt_initramfs + echo "${dirlist}" | \ while read x; do ${dep_list}parse ${x} @@ -226,7 +240,7 @@ output="/dev/stdout" output_file="" is_cpio_compressed= -compr="gzip -n -9 -f" +compr="gzip -n -9 -f -" arg="$1" case "$arg" in @@ -242,13 +256,13 @@ output=${cpio_list} echo "$output_file" | grep -q "\.gz$" \ && [ -x "`which gzip 2> /dev/null`" ] \ - && compr="gzip -n -9 -f" + && compr="gzip -n -9 -f -" echo "$output_file" | grep -q "\.bz2$" \ && [ -x "`which bzip2 2> /dev/null`" ] \ - && compr="bzip2 -9 -f" + && compr="bzip2 -9 -f -" echo "$output_file" | grep -q "\.lzma$" \ && [ -x "`which lzma 2> /dev/null`" ] \ - && compr="lzma -9 -f" + && compr="lzma e -d20 -lc1 -lp2 -pb2 -eos -si -so" echo "$output_file" | grep -q "\.xz$" \ && [ -x "`which xz 2> /dev/null`" ] \ && compr="xz --check=crc32 --lzma2=dict=1MiB" @@ -315,7 +329,7 @@ if [ "${is_cpio_compressed}" = "compressed" ]; then cat ${cpio_tfile} > ${output_file} else - (cat ${cpio_tfile} | ${compr} - > ${output_file}) \ + (cat ${cpio_tfile} | ${compr} > ${output_file}) \ || (rm -f ${output_file} ; false) fi [ -z ${cpio_file} ] && rm ${cpio_tfile}