linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/ps3: Quieten the build when building ps3
@ 2015-10-19  4:53 Michael Ellerman
  2015-10-19 17:53 ` [PATCH] powerpc: Add run_cmd function to boot wrapper Geoff Levand
  2015-10-21 16:47 ` [PATCH] powerpc/ps3: Quieten the build when building ps3 Segher Boessenkool
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Ellerman @ 2015-10-19  4:53 UTC (permalink / raw)
  To: linuxppc-dev; +Cc: geoff

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@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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-10-21 23:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-19  4:53 [PATCH] powerpc/ps3: Quieten the build when building ps3 Michael Ellerman
2015-10-19 17:53 ` [PATCH] powerpc: Add run_cmd function to boot wrapper Geoff Levand
2015-10-20  0:44   ` Michael Ellerman
2015-10-21 11:41   ` Michael Ellerman
2015-10-21 16:47 ` [PATCH] powerpc/ps3: Quieten the build when building ps3 Segher Boessenkool
2015-10-21 23:32   ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).