提交 879c26d4 编写于 作者: G Geoff Levand 提交者: Michael Ellerman

powerpc/ps3: Quieten boot wrapper output with run_cmd

Add a boot wrapper script function run_cmd which will run a shell command
quietly and only print the output if either V=1 or an error occurs.

Also, run the ps3 dd commands with run_cmd to clean up the build output.
Signed-off-by: NGeoff Levand <geoff@infradead.org>
Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au>
上级 1856f50c
......@@ -63,6 +63,23 @@ usage() {
exit 1
}
run_cmd() {
if [ "$V" = 1 ]; then
$* 2>&1
else
local msg
set +e
msg=$($* 2>&1)
if [ $? -ne "0" ]; then
echo $msg
exit 1
fi
set -e
fi
}
while [ "$#" -gt 0 ]; do
case "$1" in
-o)
......@@ -456,11 +473,11 @@ ps3)
${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
run_cmd dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
skip=$overlay_dest seek=$system_reset_kernel \
count=$overlay_size bs=1
dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
run_cmd dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
skip=$system_reset_overlay seek=$overlay_dest \
count=$overlay_size bs=1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册