diff options
author | Scott Wood <scottwood@freescale.com> | 2007-10-24 12:56:28 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-11-07 22:15:30 -0500 |
commit | aeb4552fad19fa1fb7a164c14be1f5f657791f12 (patch) | |
tree | 04b020dadfcda35bb40250a892e080542fc37787 /arch/powerpc/boot/wrapper | |
parent | d102c9d5d33f05c80fe91e95bd21c099e6d20260 (diff) |
[POWERPC] bootwrapper: Revert ps3 binary flag usage, and remove .bin suffix
The ps3 target produces two images, and the binary one is not the
"primary" image that corresponds to the -o flag; thus, it no longer
uses the generic binary flag.
On platforms which do use the binary flag, it no longer produces a
.bin suffix, so that the output file matches what was passed to the -o flag.
This should fix the zImage ln problems for the ps3 target.
Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/wrapper')
-rwxr-xr-x | arch/powerpc/boot/wrapper | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index 39b27e5ef6c1..ece6f49638da 100755 --- a/arch/powerpc/boot/wrapper +++ b/arch/powerpc/boot/wrapper | |||
@@ -149,7 +149,6 @@ cuboot*) | |||
149 | ps3) | 149 | ps3) |
150 | platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o" | 150 | platformo="$object/ps3-head.o $object/ps3-hvcall.o $object/ps3.o" |
151 | lds=$object/zImage.ps3.lds | 151 | lds=$object/zImage.ps3.lds |
152 | binary=y | ||
153 | gzip= | 152 | gzip= |
154 | ext=bin | 153 | ext=bin |
155 | objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data" | 154 | objflags="-O binary --set-section-flags=.bss=contents,alloc,load,data" |
@@ -233,7 +232,7 @@ entry=`${CROSS}objdump -f "$ofile" | grep '^start address ' | cut -d' ' -f3` | |||
233 | 232 | ||
234 | if [ -n "$binary" ]; then | 233 | if [ -n "$binary" ]; then |
235 | mv "$ofile" "$ofile".elf | 234 | mv "$ofile" "$ofile".elf |
236 | ${CROSS}objcopy -O binary "$ofile".elf "$ofile".bin | 235 | ${CROSS}objcopy -O binary "$ofile".elf "$ofile" |
237 | fi | 236 | fi |
238 | 237 | ||
239 | # post-processing needed for some platforms | 238 | # post-processing needed for some platforms |
@@ -246,9 +245,9 @@ coff) | |||
246 | $object/hack-coff "$ofile" | 245 | $object/hack-coff "$ofile" |
247 | ;; | 246 | ;; |
248 | cuboot*) | 247 | cuboot*) |
249 | gzip -f -9 "$ofile".bin | 248 | gzip -f -9 "$ofile" |
250 | mkimage -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \ | 249 | mkimage -A ppc -O linux -T kernel -C gzip -a "$base" -e "$entry" \ |
251 | $uboot_version -d "$ofile".bin.gz "$ofile" | 250 | $uboot_version -d "$ofile".gz "$ofile" |
252 | ;; | 251 | ;; |
253 | treeboot*) | 252 | treeboot*) |
254 | mv "$ofile" "$ofile.elf" | 253 | mv "$ofile" "$ofile.elf" |
@@ -269,11 +268,11 @@ ps3) | |||
269 | # then copied to offset 0x100. At runtime the bootwrapper program | 268 | # then copied to offset 0x100. At runtime the bootwrapper program |
270 | # copies the 0x100 bytes at __system_reset_kernel to addr 0x100. | 269 | # copies the 0x100 bytes at __system_reset_kernel to addr 0x100. |
271 | 270 | ||
272 | system_reset_overlay=0x`${CROSS}nm "$ofile".elf \ | 271 | system_reset_overlay=0x`${CROSS}nm "$ofile" \ |
273 | | grep ' __system_reset_overlay$' \ | 272 | | grep ' __system_reset_overlay$' \ |
274 | | cut -d' ' -f1` | 273 | | cut -d' ' -f1` |
275 | system_reset_overlay=`printf "%d" $system_reset_overlay` | 274 | system_reset_overlay=`printf "%d" $system_reset_overlay` |
276 | system_reset_kernel=0x`${CROSS}nm "$ofile".elf \ | 275 | system_reset_kernel=0x`${CROSS}nm "$ofile" \ |
277 | | grep ' __system_reset_kernel$' \ | 276 | | grep ' __system_reset_kernel$' \ |
278 | | cut -d' ' -f1` | 277 | | cut -d' ' -f1` |
279 | system_reset_kernel=`printf "%d" $system_reset_kernel` | 278 | system_reset_kernel=`printf "%d" $system_reset_kernel` |
@@ -282,6 +281,8 @@ ps3) | |||
282 | 281 | ||
283 | rm -f "$object/otheros.bld" | 282 | rm -f "$object/otheros.bld" |
284 | 283 | ||
284 | ${CROSS}objcopy -O binary "$ofile" "$ofile.bin" | ||
285 | |||
285 | msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ | 286 | msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ |
286 | skip=$overlay_dest seek=$system_reset_kernel \ | 287 | skip=$overlay_dest seek=$system_reset_kernel \ |
287 | count=$overlay_size bs=1 2>&1) | 288 | count=$overlay_size bs=1 2>&1) |