Patchwork runqemu: add a seriallog option

login
register
mail settings
Submitter Ross Burton
Date April 5, 2013, 4:21 p.m.
Message ID <1365178916-3790-1-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/47515/
State New
Headers show

Comments

Ross Burton - April 5, 2013, 4:21 p.m.
Similar to serial, but this will write everything that is output on the console
to the specified file.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 scripts/runqemu |    6 ++++++
 1 file changed, 6 insertions(+)

Patch

diff --git a/scripts/runqemu b/scripts/runqemu
index 8ed1226..3db2cf5 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -32,6 +32,7 @@  usage() {
     echo "  Simplified QEMU command-line options can be passed with:"
     echo "    nographic - disables video console"
     echo "    serial - enables a serial console on /dev/ttyS0"
+    echo "    seriallog=/path/to/output - writes the console output to this file"
     echo "    kvm - enables KVM when running qemux86/qemux86-64 (VT-capable CPU required)"
     echo "    publicvnc - enable a VNC server open to all hosts"
     echo "  qemuparams=\"xyz\" - specify custom parameters to QEMU"
@@ -148,6 +149,11 @@  while true; do
             SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
             SERIALSTDIO="1"
             ;;
+        "seriallog="*)
+            SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -serial file:${arg##seriallog=}"
+            SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0 console=tty"
+            SERIALSTDIO="1"
+            ;;
         "qemuparams="*)
             SCRIPT_QEMU_EXTRA_OPT="${arg##qemuparams=}"