aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/boot/wrapper')
-rwxr-xr-xarch/powerpc/boot/wrapper32
1 files changed, 15 insertions, 17 deletions
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index ece6f49638da..31147a037728 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -21,6 +21,14 @@
21# (default ./arch/powerpc/boot) 21# (default ./arch/powerpc/boot)
22# -W dir specify working directory for temporary files (default .) 22# -W dir specify working directory for temporary files (default .)
23 23
24# Stop execution if any command fails
25set -e
26
27# Allow for verbose output
28if [ "$V" = 1 ]; then
29 set -x
30fi
31
24# defaults 32# defaults
25kernel= 33kernel=
26ofile=zImage 34ofile=zImage
@@ -111,7 +119,7 @@ if [ -n "$dts" ]; then
111 if [ -z "$dtb" ]; then 119 if [ -z "$dtb" ]; then
112 dtb="$platform.dtb" 120 dtb="$platform.dtb"
113 fi 121 fi
114 dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts" || exit 1 122 dtc -O dtb -o "$dtb" -b 0 -V 16 "$dts"
115fi 123fi
116 124
117if [ -z "$kernel" ]; then 125if [ -z "$kernel" ]; then
@@ -283,23 +291,13 @@ ps3)
283 291
284 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin" 292 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
285 293
286 msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ 294 dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
287 skip=$overlay_dest seek=$system_reset_kernel \ 295 skip=$overlay_dest seek=$system_reset_kernel \
288 count=$overlay_size bs=1 2>&1) 296 count=$overlay_size bs=1
289 297
290 if [ $? -ne "0" ]; then 298 dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
291 echo $msg 299 skip=$system_reset_overlay seek=$overlay_dest \
292 exit 1 300 count=$overlay_size bs=1
293 fi
294
295 msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
296 skip=$system_reset_overlay seek=$overlay_dest \
297 count=$overlay_size bs=1 2>&1)
298
299 if [ $? -ne "0" ]; then
300 echo $msg
301 exit 2
302 fi
303 301
304 gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld" 302 gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld"
305 ;; 303 ;;