|
Lines 36-41
Link Here
|
| 36 |
comma-separated list of the resolutions for which the images |
36 |
comma-separated list of the resolutions for which the images |
| 37 |
are to be copied |
37 |
are to be copied |
| 38 |
-v, --verbose verbose output |
38 |
-v, --verbose verbose output |
|
|
39 |
--lzma use 'lzma' compressor (gzip default) |
| 40 |
--xz use 'xz' compressor (gzip default) |
| 39 |
--no8bpp ignore 8bpp images (can save a lot of space) |
41 |
--no8bpp ignore 8bpp images (can save a lot of space) |
| 40 |
EOTB |
42 |
EOTB |
| 41 |
|
43 |
|
|
Lines 69-77
Link Here
|
| 69 |
verbose=0 |
71 |
verbose=0 |
| 70 |
index=0 |
72 |
index=0 |
| 71 |
no8bpp=0 |
73 |
no8bpp=0 |
|
|
74 |
compressor="gzip" |
| 72 |
|
75 |
|
| 73 |
args="$@" |
76 |
args="$@" |
| 74 |
temp=`getopt -l no8bpp,all,generate:,append:,copy:,overlay:,help,verbose,res: a:g:c:r:o:hv "$@"` |
77 |
temp=`getopt -l lzma,xz,no8bpp,all,generate:,append:,copy:,overlay:,help,verbose,res: a:g:c:r:o:hv "$@"` |
| 75 |
|
78 |
|
| 76 |
if [ $? != 0 ]; then |
79 |
if [ $? != 0 ]; then |
| 77 |
usage; exit 2 |
80 |
usage; exit 2 |
|
Lines 89-94
Link Here
|
| 89 |
-v|--verbose) verbose=$(($verbose + 1)); shift;; |
92 |
-v|--verbose) verbose=$(($verbose + 1)); shift;; |
| 90 |
-o|--overlay) overlay="$2"; shift; shift;; |
93 |
-o|--overlay) overlay="$2"; shift; shift;; |
| 91 |
--no8bpp) no8bpp=1; shift;; |
94 |
--no8bpp) no8bpp=1; shift;; |
|
|
95 |
--lzma) compressor="lzma"; shift;; |
| 96 |
--xz) compressor="xz"; shift;; |
| 92 |
--) shift; break;; |
97 |
--) shift; break;; |
| 93 |
--all) |
98 |
--all) |
| 94 |
shift; |
99 |
shift; |
|
Lines 144-150
Link Here
|
| 144 |
if [ "$mode" == "a" ]; then |
149 |
if [ "$mode" == "a" ]; then |
| 145 |
printv "o Unpacking $img.." |
150 |
printv "o Unpacking $img.." |
| 146 |
cp "$img" "${imgdir}" |
151 |
cp "$img" "${imgdir}" |
| 147 |
(cd "${imgdir}"; (gunzip -c "$(basename $img)" 2>/dev/null || cat "$(basename $img)") | cpio -idm --no-absolute-filenames --quiet -H newc) |
152 |
(cd "${imgdir}"; ("${compressor}" -dc "$(basename $img)" 2>/dev/null || cat "$(basename $img)") | cpio -idm --no-absolute-filenames --quiet -H newc) |
| 148 |
rm -f "${imgdir}/$(basename $img)" |
153 |
rm -f "${imgdir}/$(basename $img)" |
| 149 |
fi |
154 |
fi |
| 150 |
|
155 |
|
|
Lines 234-241
Link Here
|
| 234 |
|
239 |
|
| 235 |
printv "o Creating initramfs image.." |
240 |
printv "o Creating initramfs image.." |
| 236 |
if [ "$mode" == "g" ] || [ "$mode" == "a" ]; then |
241 |
if [ "$mode" == "g" ] || [ "$mode" == "a" ]; then |
| 237 |
(cd "${imgdir}" ; find . | cpio --quiet -o -H newc | gzip -9 >../img.cpio.gz) |
242 |
(cd "${imgdir}" ; find . | cpio --quiet -o -H newc | "${compressor}" -9 >../img.temp) |
| 238 |
mv "${workdir}/img.cpio.gz" "${img}" |
243 |
mv "${workdir}/img.temp" "${img}" |
| 239 |
fi |
244 |
fi |
| 240 |
|
245 |
|
| 241 |
exit 0 |
246 |
exit 0 |