aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/wrapper')
-rwxr-xr-xarch/powerpc/boot/wrapper21
1 files changed, 13 insertions, 8 deletions
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 31147a037728..763a0c46f441 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -45,6 +45,7 @@ CROSS=
45 45
46# directory for object and other files used by this script 46# directory for object and other files used by this script
47object=arch/powerpc/boot 47object=arch/powerpc/boot
48objbin=$object
48 49
49# directory for working files 50# directory for working files
50tmpdir=. 51tmpdir=.
@@ -95,6 +96,7 @@ while [ "$#" -gt 0 ]; do
95 shift 96 shift
96 [ "$#" -gt 0 ] || usage 97 [ "$#" -gt 0 ] || usage
97 object="$1" 98 object="$1"
99 objbin="$1"
98 ;; 100 ;;
99 -W) 101 -W)
100 shift 102 shift
@@ -116,10 +118,13 @@ while [ "$#" -gt 0 ]; do
116done 118done
117 119
118if [ -n "$dts" ]; then 120if [ -n "$dts" ]; then
121 if [ ! -r "$dts" -a -r "$object/dts/$dts" ]; then
122 dts="$object/dts/$dts"
123 fi
119 if [ -z "$dtb" ]; then 124 if [ -z "$dtb" ]; then
120 dtb="$platform.dtb" 125 dtb="$platform.dtb"
121 fi 126 fi
122 dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts" 127 $object/dtc -O dtb -o "$dtb" -b 0 "$dts"
123fi 128fi
124 129
125if [ -z "$kernel" ]; then 130if [ -z "$kernel" ]; then
@@ -163,7 +168,7 @@ ps3)
163 ksection=.kernel:vmlinux.bin 168 ksection=.kernel:vmlinux.bin
164 isection=.kernel:initrd 169 isection=.kernel:initrd
165 ;; 170 ;;
166ep88xc) 171ep88xc|ep405|redboot*|ep8248e)
167 platformo="$object/fixed-head.o $object/$platform.o" 172 platformo="$object/fixed-head.o $object/$platform.o"
168 binary=y 173 binary=y
169 ;; 174 ;;
@@ -246,11 +251,11 @@ fi
246# post-processing needed for some platforms 251# post-processing needed for some platforms
247case "$platform" in 252case "$platform" in
248pseries|chrp) 253pseries|chrp)
249 $object/addnote "$ofile" 254 $objbin/addnote "$ofile"
250 ;; 255 ;;
251coff) 256coff)
252 ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile" 257 ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile"
253 $object/hack-coff "$ofile" 258 $objbin/hack-coff "$ofile"
254 ;; 259 ;;
255cuboot*) 260cuboot*)
256 gzip -f -9 "$ofile" 261 gzip -f -9 "$ofile"
@@ -259,7 +264,7 @@ cuboot*)
259 ;; 264 ;;
260treeboot*) 265treeboot*)
261 mv "$ofile" "$ofile.elf" 266 mv "$ofile" "$ofile.elf"
262 $object/mktree "$ofile.elf" "$ofile" "$base" "$entry" 267 $objbin/mktree "$ofile.elf" "$ofile" "$base" "$entry"
263 if [ -z "$cacheit" ]; then 268 if [ -z "$cacheit" ]; then
264 rm -f "$ofile.elf" 269 rm -f "$ofile.elf"
265 fi 270 fi
@@ -287,8 +292,6 @@ ps3)
287 overlay_dest="256" 292 overlay_dest="256"
288 overlay_size="256" 293 overlay_size="256"
289 294
290 rm -f "$object/otheros.bld"
291
292 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin" 295 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
293 296
294 dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ 297 dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
@@ -299,6 +302,8 @@ ps3)
299 skip=$system_reset_overlay seek=$overlay_dest \ 302 skip=$system_reset_overlay seek=$overlay_dest \
300 count=$overlay_size bs=1 303 count=$overlay_size bs=1
301 304
302 gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld" 305 odir="$(dirname "$ofile.bin")"
306 rm -f "$odir/otheros.bld"
307 gzip --force -9 --stdout "$ofile.bin" > "$odir/otheros.bld"
303 ;; 308 ;;
304esac 309esac