aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xarch/powerpc/boot/wrapper24
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=
29dtb= 29dtb=
30dts= 30dts=
31cacheit= 31cacheit=
32gzip=.gz
32 33
33# cross-compilation prefix 34# cross-compilation prefix
34CROSS= 35CROSS=
@@ -42,7 +43,7 @@ tmpdir=.
42usage() { 43usage() {
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
142vmz="$tmpdir/`basename \"$kernel\"`.$ext" 146vmz="$tmpdir/`basename \"$kernel\"`.$ext"
143if [ -z "$cacheit" -o ! -f "$vmz.gz" -o "$vmz.gz" -ot "$kernel" ]; then 147if [ -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
151fi 159fi
152 160
161vmz="$vmz$gzip"
162
153case "$platform" in 163case "$platform" in
154uboot) 164uboot)
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
176addsec $tmp "$vmz.gz" $ksection $object/empty.o 186addsec $tmp "$vmz" $ksection $object/empty.o
177if [ -z "$cacheit" ]; then 187if [ -z "$cacheit" ]; then
178 rm -f "$vmz.gz" 188 rm -f "$vmz"
179fi 189fi
180 190
181if [ -n "$initrd" ]; then 191if [ -n "$initrd" ]; then