diff options
author | Randy Witt <randy.e.witt@linux.intel.com> | 2015-08-24 00:25:03 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-08-24 23:47:07 +0100 |
commit | d893a2503da29ec99b3a911f8877cc59e7e6b50d (patch) | |
tree | 183020614bdb63c539d648116ce83a90508cb20a /meta/lib/oeqa/utils | |
parent | fd164dcc31aa6c60e9834036a7cfcea5411daa3d (diff) | |
download | poky-d893a2503da29ec99b3a911f8877cc59e7e6b50d.tar.gz |
runqemu: Add a tcpserial option
The option was added so that the qemurunner could start a second tcp
serial port without adding machine conditional logic to qemurunner.
The issue that made this necessary was that when "virt" is passed to
qemu-system-aarch64, the normal mechanism for specifying a tcp serial
port does not work. This is because the hardware for the "virt" machine
is hardcoded in the device tree blob and the addition devices must be
virtio devices.
So runqemu can specify virtio for qemuarm64 whereas it seems all other
qemu machines work with the "-serial tcp*" option.
(From OE-Core rev: 849d65d55e4df5fa443b2cb7b4cee23913fc9d5a)
Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils')
-rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 4 |
1 files changed, 2 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 |