summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@arm.com>2024-02-21 20:36:56 +0100
committerSteve Sakoman <steve@sakoman.com>2024-03-01 05:19:53 -1000
commitda694d9d5867cb4c406768dcf0ee5ed4ff84b810 (patch)
tree665b7abdaff75d2b51a44ce01123d651990a21f1 /scripts
parente00bde2372bbc65b9f183a2ae5a353197459ea87 (diff)
downloadpoky-da694d9d5867cb4c406768dcf0ee5ed4ff84b810.tar.gz
runqemu: add qmp socket support
Add support for qmp sockets and defaults to unix:qmp.sock if unspecified (From OE-Core rev: 31de620e9d899b93c6e982d3a563bbf618ce79c6) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Eilís 'pidge' Ní Fhlannagáin <pidge@baylibre.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Backported from master: 380631797f0d63124a8c21efa93ab672dbd79283 Qemu throws many warnings without qmp and many runtime tests fail without this patch also on kirkstone. Signed-off-by: Adrian Freihofer <adrian.freihofer@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/runqemu11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 81d95133b6..ba7c1b2461 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -82,6 +82,7 @@ of the following environment variables (in any order):
82 kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required) 82 kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required)
83 publicvnc - enable a VNC server open to all hosts 83 publicvnc - enable a VNC server open to all hosts
84 audio - enable audio 84 audio - enable audio
85 qmp=<path> - create a QMP socket (defaults to unix:qmp.sock if unspecified)
85 [*/]ovmf* - OVMF firmware file or base name for booting with UEFI 86 [*/]ovmf* - OVMF firmware file or base name for booting with UEFI
86 tcpserial=<port> - specify tcp serial port number 87 tcpserial=<port> - specify tcp serial port number
87 qemuparams=<xyz> - specify custom parameters to QEMU 88 qemuparams=<xyz> - specify custom parameters to QEMU
@@ -216,6 +217,7 @@ class BaseConfig(object):
216 self.cleaned = False 217 self.cleaned = False
217 # Files to cleanup after run 218 # Files to cleanup after run
218 self.cleanup_files = [] 219 self.cleanup_files = []
220 self.qmp = None
219 221
220 def acquire_taplock(self, error=True): 222 def acquire_taplock(self, error=True):
221 logger.debug("Acquiring lockfile %s..." % self.taplock) 223 logger.debug("Acquiring lockfile %s..." % self.taplock)
@@ -512,6 +514,10 @@ to your build configuration.
512 elif arg == 'publicvnc': 514 elif arg == 'publicvnc':
513 self.publicvnc = True 515 self.publicvnc = True
514 self.qemu_opt_script += ' -vnc :0' 516 self.qemu_opt_script += ' -vnc :0'
517 elif arg == "qmp":
518 self.qmp = "unix:qmp.sock"
519 elif arg.startswith("qmp="):
520 self.qmp = arg[len('qmp='):]
515 elif arg.startswith('tcpserial='): 521 elif arg.startswith('tcpserial='):
516 self.tcpserial_portnum = '%s' % arg[len('tcpserial='):] 522 self.tcpserial_portnum = '%s' % arg[len('tcpserial='):]
517 elif arg.startswith('qemuparams='): 523 elif arg.startswith('qemuparams='):
@@ -1332,6 +1338,10 @@ to your build configuration.
1332 raise RunQemuError("Failed to boot, QB_SYSTEM_NAME is NULL!") 1338 raise RunQemuError("Failed to boot, QB_SYSTEM_NAME is NULL!")
1333 self.qemu_system = qemu_system 1339 self.qemu_system = qemu_system
1334 1340
1341 def setup_qmp(self):
1342 if self.qmp:
1343 self.qemu_opt += " -qmp %s,server,nowait" % self.qmp
1344
1335 def setup_vga(self): 1345 def setup_vga(self):
1336 if self.nographic == True: 1346 if self.nographic == True:
1337 if self.sdl == True: 1347 if self.sdl == True:
@@ -1462,6 +1472,7 @@ to your build configuration.
1462 if self.snapshot: 1472 if self.snapshot:
1463 self.qemu_opt += " -snapshot" 1473 self.qemu_opt += " -snapshot"
1464 1474
1475 self.setup_qmp()
1465 self.setup_serial() 1476 self.setup_serial()
1466 self.setup_vga() 1477 self.setup_vga()
1467 1478