diff options
author | Paul Mackerras <paulus@samba.org> | 2007-11-07 22:28:14 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-11-07 22:28:14 -0500 |
commit | 688016f4e2028e3c2c27e959ad001536e10ee2c5 (patch) | |
tree | f45baa7b2c115f1297b4ad8d30b306204ef5e537 /arch/powerpc/boot/wrapper | |
parent | 2c84b4076c0cbbc44ffea2ae1da2a801fb23f081 (diff) | |
parent | 29273158f82020241d9a6539d6cef9cf926654c9 (diff) |
Merge branch 'for-2.6.24' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx into merge
Diffstat (limited to 'arch/powerpc/boot/wrapper')
-rwxr-xr-x | arch/powerpc/boot/wrapper | 32 |
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 | ||
25 | set -e | ||
26 | |||
27 | # Allow for verbose output | ||
28 | if [ "$V" = 1 ]; then | ||
29 | set -x | ||
30 | fi | ||
31 | |||
24 | # defaults | 32 | # defaults |
25 | kernel= | 33 | kernel= |
26 | ofile=zImage | 34 | ofile=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" |
115 | fi | 123 | fi |
116 | 124 | ||
117 | if [ -z "$kernel" ]; then | 125 | if [ -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 | ;; |