diff options
| -rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 4 | ||||
| -rwxr-xr-x | scripts/runqemu | 4 | ||||
| -rwxr-xr-x | scripts/runqemu-internal | 8 |
3 files changed, 14 insertions, 2 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index e976fd0819..33f31852a7 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
| @@ -92,7 +92,7 @@ class QemuRunner: | |||
| 92 | # Set this flag so that Qemu doesn't do any grabs as SDL grabs interact | 92 | # Set this flag so that Qemu doesn't do any grabs as SDL grabs interact |
| 93 | # badly with screensavers. | 93 | # badly with screensavers. |
| 94 | os.environ["QEMU_DONT_GRAB"] = "1" | 94 | os.environ["QEMU_DONT_GRAB"] = "1" |
| 95 | self.qemuparams = 'bootparams="console=tty1 console=ttyS0,115200n8" qemuparams="-serial tcp:127.0.0.1:{} -serial tcp:127.0.0.1:{}"'.format(threadport, self.serverport) | 95 | self.qemuparams = 'bootparams="console=tty1 console=ttyS0,115200n8" qemuparams="-serial tcp:127.0.0.1:{}"'.format(threadport) |
| 96 | if qemuparams: | 96 | if qemuparams: |
| 97 | self.qemuparams = self.qemuparams[:-1] + " " + qemuparams + " " + '\"' | 97 | self.qemuparams = self.qemuparams[:-1] + " " + qemuparams + " " + '\"' |
| 98 | 98 | ||
| @@ -102,7 +102,7 @@ class QemuRunner: | |||
| 102 | fcntl.fcntl(o, fcntl.F_SETFL, fl | os.O_NONBLOCK) | 102 | fcntl.fcntl(o, fcntl.F_SETFL, fl | os.O_NONBLOCK) |
| 103 | return os.read(o.fileno(), 1000000) | 103 | return os.read(o.fileno(), 1000000) |
| 104 | 104 | ||
| 105 | launch_cmd = 'runqemu %s %s %s' % (self.machine, self.rootfs, self.qemuparams) | 105 | launch_cmd = 'runqemu tcpserial=%s %s %s %s' % (self.serverport, self.machine, self.rootfs, self.qemuparams) |
| 106 | # FIXME: We pass in stdin=subprocess.PIPE here to work around stty | 106 | # FIXME: We pass in stdin=subprocess.PIPE here to work around stty |
| 107 | # blocking at the end of the runqemu script when using this within | 107 | # blocking at the end of the runqemu script when using this within |
| 108 | # oe-selftest (this makes stty error out immediately). There ought | 108 | # oe-selftest (this makes stty error out immediately). There ought |
diff --git a/scripts/runqemu b/scripts/runqemu index 09c507dc7a..82711606f6 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
| @@ -68,6 +68,7 @@ SCRIPT_QEMU_OPT="" | |||
| 68 | SCRIPT_QEMU_EXTRA_OPT="" | 68 | SCRIPT_QEMU_EXTRA_OPT="" |
| 69 | SCRIPT_KERNEL_OPT="" | 69 | SCRIPT_KERNEL_OPT="" |
| 70 | SERIALSTDIO="" | 70 | SERIALSTDIO="" |
| 71 | TCPSERIAL_PORTNUM="" | ||
| 71 | KVM_ENABLED="no" | 72 | KVM_ENABLED="no" |
| 72 | KVM_ACTIVE="no" | 73 | KVM_ACTIVE="no" |
| 73 | 74 | ||
| @@ -150,6 +151,9 @@ while true; do | |||
| 150 | SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0" | 151 | SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0" |
| 151 | SERIALSTDIO="1" | 152 | SERIALSTDIO="1" |
| 152 | ;; | 153 | ;; |
| 154 | "tcpserial="*) | ||
| 155 | TCPSERIAL_PORTNUM=${arg##tcpserial=} | ||
| 156 | ;; | ||
| 153 | "biosdir="*) | 157 | "biosdir="*) |
| 154 | CUSTOMBIOSDIR="${arg##biosdir=}" | 158 | CUSTOMBIOSDIR="${arg##biosdir=}" |
| 155 | ;; | 159 | ;; |
diff --git a/scripts/runqemu-internal b/scripts/runqemu-internal index d743322037..b317358f94 100755 --- a/scripts/runqemu-internal +++ b/scripts/runqemu-internal | |||
| @@ -620,6 +620,14 @@ if [ "x$QEMUOPTIONS" = "x" ]; then | |||
| 620 | return 1 | 620 | return 1 |
| 621 | fi | 621 | fi |
| 622 | 622 | ||
| 623 | if [ $TCPSERIAL_PORTNUM != "" ]; then | ||
| 624 | if [ "$MACHINE" = "qemuarm64" ]; then | ||
| 625 | QEMUOPTIONS="$QEMUOPTIONS -device virtio-serial-device -chardev socket,id=virtcon,port=$TCPSERIAL_PORTNUM,host=127.0.0.1 -device virtconsole,chardev=virtcon" | ||
| 626 | else | ||
| 627 | QEMUOPTIONS="$QEMUOPTIONS -serial tcp:127.0.0.1:$TCPSERIAL_PORTNUM" | ||
| 628 | fi | ||
| 629 | fi | ||
| 630 | |||
| 623 | PATH=$OECORE_NATIVE_SYSROOT/usr/bin:$PATH | 631 | PATH=$OECORE_NATIVE_SYSROOT/usr/bin:$PATH |
| 624 | 632 | ||
| 625 | QEMUBIN=`which $QEMU 2> /dev/null` | 633 | QEMUBIN=`which $QEMU 2> /dev/null` |
