diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-12-02 21:52:05 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-12-05 22:44:30 -0500 |
commit | 5c539ee38263c12121d777c2e7119807742e9368 (patch) | |
tree | 3214c1f7e7631f53515e8e2973dcd2e1f0f8ce7a /arch/powerpc/boot/wrapper | |
parent | 701172d1b8a90d87532e49b946966ff37f948cc2 (diff) |
[POWERPC] Allow for bootwrapper utilities being in different directory to objects
It's possible that the executables which are built as helpers for the
bootwrapper stuff might end up in a different place to the intermediate
object files. Handle that.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot/wrapper')
-rwxr-xr-x | arch/powerpc/boot/wrapper | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper index b8e4856af759..a591ced47875 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 |
@@ -249,11 +251,11 @@ fi | |||
249 | # post-processing needed for some platforms | 251 | # post-processing needed for some platforms |
250 | case "$platform" in | 252 | case "$platform" in |
251 | pseries|chrp) | 253 | pseries|chrp) |
252 | $object/addnote "$ofile" | 254 | $objbin/addnote "$ofile" |
253 | ;; | 255 | ;; |
254 | coff) | 256 | coff) |
255 | ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile" | 257 | ${CROSS}objcopy -O aixcoff-rs6000 --set-start "$entry" "$ofile" |
256 | $object/hack-coff "$ofile" | 258 | $objbin/hack-coff "$ofile" |
257 | ;; | 259 | ;; |
258 | cuboot*) | 260 | cuboot*) |
259 | gzip -f -9 "$ofile" | 261 | gzip -f -9 "$ofile" |
@@ -262,7 +264,7 @@ cuboot*) | |||
262 | ;; | 264 | ;; |
263 | treeboot*) | 265 | treeboot*) |
264 | mv "$ofile" "$ofile.elf" | 266 | mv "$ofile" "$ofile.elf" |
265 | $object/mktree "$ofile.elf" "$ofile" "$base" "$entry" | 267 | $objbin/mktree "$ofile.elf" "$ofile" "$base" "$entry" |
266 | if [ -z "$cacheit" ]; then | 268 | if [ -z "$cacheit" ]; then |
267 | rm -f "$ofile.elf" | 269 | rm -f "$ofile.elf" |
268 | fi | 270 | fi |