diff options
-rwxr-xr-x | arch/powerpc/boot/wrapper | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index 157d8c89e138..f9238f53c1f3 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper | |||
@@ -29,6 +29,7 @@ initrd= | |||
29 | dtb= | 29 | dtb= |
30 | dts= | 30 | dts= |
31 | cacheit= | 31 | cacheit= |
32 | gzip=.gz | ||
32 | 33 | ||
33 | # cross-compilation prefix | 34 | # cross-compilation prefix |
34 | CROSS= | 35 | CROSS= |
@@ -42,7 +43,7 @@ tmpdir=. | |||
42 | usage() { | 43 | usage() { |
43 | echo 'Usage: wrapper [-o output] [-p platform] [-i initrd]' >&2 | 44 | echo 'Usage: wrapper [-o output] [-p platform] [-i initrd]' >&2 |
44 | echo ' [-d devtree] [-s tree.dts] [-c] [-C cross-prefix]' >&2 | 45 | echo ' [-d devtree] [-s tree.dts] [-c] [-C cross-prefix]' >&2 |
45 | echo ' [-D datadir] [-W workingdir] [vmlinux]' >&2 | 46 | echo ' [-D datadir] [-W workingdir] [--no-gzip] [vmlinux]' >&2 |
46 | exit 1 | 47 | exit 1 |
47 | } | 48 | } |
48 | 49 | ||
@@ -91,6 +92,9 @@ while [ "$#" -gt 0 ]; do | |||
91 | [ "$#" -gt 0 ] || usage | 92 | [ "$#" -gt 0 ] || usage |
92 | tmpdir="$1" | 93 | tmpdir="$1" |
93 | ;; | 94 | ;; |
95 | --no-gzip) | ||
96 | gzip= | ||
97 | ;; | ||
94 | -?) | 98 | -?) |
95 | usage | 99 | usage |
96 | ;; | 100 | ;; |
@@ -142,14 +146,20 @@ esac | |||
142 | vmz="$tmpdir/`basename \"$kernel\"`.$ext" | 146 | vmz="$tmpdir/`basename \"$kernel\"`.$ext" |
143 | if [ -z "$cacheit" -o ! -f "$vmz.gz" -o "$vmz.gz" -ot "$kernel" ]; then | 147 | if [ -z "$cacheit" -o ! -f "$vmz.gz" -o "$vmz.gz" -ot "$kernel" ]; then |
144 | ${CROSS}objcopy $objflags "$kernel" "$vmz.$$" | 148 | ${CROSS}objcopy $objflags "$kernel" "$vmz.$$" |
145 | gzip -f -9 "$vmz.$$" | 149 | |
150 | if [ -n "$gzip" ]; then | ||
151 | gzip -f -9 "$vmz.$$" | ||
152 | fi | ||
153 | |||
146 | if [ -n "$cacheit" ]; then | 154 | if [ -n "$cacheit" ]; then |
147 | mv -f "$vmz.$$.gz" "$vmz.gz" | 155 | mv -f "$vmz.$$$gzip" "$vmz$gzip" |
148 | else | 156 | else |
149 | vmz="$vmz.$$" | 157 | vmz="$vmz.$$" |
150 | fi | 158 | fi |
151 | fi | 159 | fi |
152 | 160 | ||
161 | vmz="$vmz$gzip" | ||
162 | |||
153 | case "$platform" in | 163 | case "$platform" in |
154 | uboot) | 164 | uboot) |
155 | rm -f "$ofile" | 165 | rm -f "$ofile" |
@@ -159,9 +169,9 @@ uboot) | |||
159 | version="-n Linux-$version" | 169 | version="-n Linux-$version" |
160 | fi | 170 | fi |
161 | mkimage -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 \ | 171 | mkimage -A ppc -O linux -T kernel -C gzip -a 00000000 -e 00000000 \ |
162 | $version -d "$vmz.gz" "$ofile" | 172 | $version -d "$vmz" "$ofile" |
163 | if [ -z "$cacheit" ]; then | 173 | if [ -z "$cacheit" ]; then |
164 | rm -f $vmz.gz | 174 | rm -f "$vmz" |
165 | fi | 175 | fi |
166 | exit 0 | 176 | exit 0 |
167 | ;; | 177 | ;; |
@@ -173,9 +183,9 @@ addsec() { | |||
173 | --set-section-flags=$3=contents,alloc,load,readonly,data | 183 | --set-section-flags=$3=contents,alloc,load,readonly,data |
174 | } | 184 | } |
175 | 185 | ||
176 | addsec $tmp "$vmz.gz" $ksection $object/empty.o | 186 | addsec $tmp "$vmz" $ksection $object/empty.o |
177 | if [ -z "$cacheit" ]; then | 187 | if [ -z "$cacheit" ]; then |
178 | rm -f "$vmz.gz" | 188 | rm -f "$vmz" |
179 | fi | 189 | fi |
180 | 190 | ||
181 | if [ -n "$initrd" ]; then | 191 | if [ -n "$initrd" ]; then |