[PATCH] powerpc/ps3: Quieten the build when building ps3
Michael Ellerman
mpe at ellerman.id.au
Mon Oct 19 15:53:22 AEDT 2015
The boot wrapper uses dd when building for ps3, which annoyingly tells
us in great detail what it's doing, eg:
512+0 records in
512+0 records out
512 bytes (512 B) copied, 0.000802129 s, 638 kB/s
512+0 records in
512+0 records out
512 bytes (512 B) copied, 0.000745101 s, 687 kB/s
Also annoyingly, there is no "quiet" flag to dd, so our only option is
to grab all the output from dd, and iff there is an error print it out.
As it turns out we used to do this, so this is actually a partial revert
of commit d47403733403 ("[POWERPC] bootwrapper: Bail from script if any
command fails").
Signed-off-by: Michael Ellerman <mpe at ellerman.id.au>
---
arch/powerpc/boot/wrapper | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 3f50c27ed8f8..b7d353b88029 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -456,13 +456,27 @@ ps3)
${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
- dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
- skip=$overlay_dest seek=$system_reset_kernel \
- count=$overlay_size bs=1
+ set +e
- dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
- skip=$system_reset_overlay seek=$overlay_dest \
- count=$overlay_size bs=1
+ msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
+ skip=$overlay_dest seek=$system_reset_kernel \
+ count=$overlay_size bs=1 2>&1)
+
+ if [ $? -ne "0" ]; then
+ echo $msg
+ exit 1
+ fi
+
+ msg=$(dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
+ skip=$system_reset_overlay seek=$overlay_dest \
+ count=$overlay_size bs=1 2>&1)
+
+ if [ $? -ne "0" ]; then
+ echo $msg
+ exit 2
+ fi
+
+ set -e
odir="$(dirname "$ofile.bin")"
rm -f "$odir/otheros.bld"
--
2.5.0
More information about the Linuxppc-dev
mailing list