diff options
Diffstat (limited to 'arch/powerpc/boot/wrapper')
-rwxr-xr-x | arch/powerpc/boot/wrapper | 21 |
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 |
47 | object=arch/powerpc/boot | 47 | object=arch/powerpc/boot |
48 | objbin=$object | ||
48 | 49 | ||
49 | # directory for working files | 50 | # directory for working files |
50 | tmpdir=. | 51 | tmpdir=. |
@@ -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 | |||
116 | done | 118 | done |
117 | 119 | ||
118 | if [ -n "$dts" ]; then | 120 | if [ -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" |
123 | fi | 128 | fi |
124 | 129 | ||
125 | if [ -z "$kernel" ]; then | 130 | if [ -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 | ;; |
166 | ep88xc) | 171 | ep88xc|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 |
247 | case "$platform" in | 252 | case "$platform" in |
248 | pseries|chrp) | 253 | pseries|chrp) |
249 | $object/addnote "$ofile" | 254 | $objbin/addnote "$ofile" |
250 | ;; | 255 | ;; |
251 | coff) | 256 | coff) |
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 | ;; |
255 | cuboot*) | 260 | cuboot*) |
256 | gzip -f -9 "$ofile" | 261 | gzip -f -9 "$ofile" |
@@ -259,7 +264,7 @@ cuboot*) | |||
259 | ;; | 264 | ;; |
260 | treeboot*) | 265 | treeboot*) |
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 | ;; |
304 | esac | 309 | esac |