]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
[POWERPC] Create otheros.bld next to specified output file, not in $object directory
authorDavid Woodhouse <dwmw2@infradead.org>
Mon, 3 Dec 2007 02:48:03 +0000 (13:48 +1100)
committerPaul Mackerras <paulus@samba.org>
Thu, 6 Dec 2007 03:44:30 +0000 (14:44 +1100)
The bootwrapper script currently generates an 'otheros.bld' file in
addition to the file specified by the -o option, when asked to build a
wrapper for PS3.

It should do that in the same directory as the output, not the directory
where the wrapper objects are kept (which might potentially not be
writable when the script runs).

Arguably, the 'otheros.bld' ought to be created with the filename
specified as the -o argument. But that's a more intrusive change.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/boot/wrapper

index 31147a0377283e179b473aa4fa4c9f720ce8ed48..221b8c87f57ebba1b556894b52f36502a358c62d 100755 (executable)
@@ -287,8 +287,6 @@ ps3)
     overlay_dest="256"
     overlay_size="256"
 
-    rm -f "$object/otheros.bld"
-
     ${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
 
     dd if="$ofile.bin" of="$ofile.bin" conv=notrunc   \
@@ -299,6 +297,8 @@ ps3)
         skip=$system_reset_overlay seek=$overlay_dest \
         count=$overlay_size bs=1
 
-    gzip --force -9 --stdout "$ofile.bin" > "$object/otheros.bld"
+    odir="$(dirname "$ofile.bin")"
+    rm -f "$odir/otheros.bld"
+    gzip --force -9 --stdout "$ofile.bin" > "$odir/otheros.bld"
     ;;
 esac