mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
scripts/runqemu: Add serialstdio mode
Its currently not possible to have a console available whilst using qemu in graphics mode. This is causing some issues for testing autobuilder bringup so all a "serialstdio" mode to runqemu to accomodate this. The existing serialstdio internal variable is renamed to allow the new user visible option. (From OE-Core rev: 101b70d3c6a0a5a022d96dfdd21500b757c8fada) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
+7
-2
@@ -75,6 +75,7 @@ of the following environment variables (in any order):
|
|||||||
Simplified QEMU command-line options can be passed with:
|
Simplified QEMU command-line options can be passed with:
|
||||||
nographic - disable video console
|
nographic - disable video console
|
||||||
serial - enable a serial console on /dev/ttyS0
|
serial - enable a serial console on /dev/ttyS0
|
||||||
|
serialstdio - enable a serial console on the console (regardless of graphics mode)
|
||||||
slirp - enable user networking, no root privileges is required
|
slirp - enable user networking, no root privileges is required
|
||||||
kvm - enable KVM when running x86/x86_64 (VT-capable CPU required)
|
kvm - enable KVM when running x86/x86_64 (VT-capable CPU required)
|
||||||
kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required)
|
kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required)
|
||||||
@@ -211,6 +212,7 @@ class BaseConfig(object):
|
|||||||
self.slirp_enabled = False
|
self.slirp_enabled = False
|
||||||
self.nfs_instance = 0
|
self.nfs_instance = 0
|
||||||
self.nfs_running = False
|
self.nfs_running = False
|
||||||
|
self.serialconsole = False
|
||||||
self.serialstdio = False
|
self.serialstdio = False
|
||||||
self.cleantap = False
|
self.cleantap = False
|
||||||
self.saved_stty = ''
|
self.saved_stty = ''
|
||||||
@@ -428,6 +430,9 @@ class BaseConfig(object):
|
|||||||
self.qemu_opt_script += ' -nographic'
|
self.qemu_opt_script += ' -nographic'
|
||||||
self.kernel_cmdline_script += ' console=ttyS0'
|
self.kernel_cmdline_script += ' console=ttyS0'
|
||||||
elif arg == 'serial':
|
elif arg == 'serial':
|
||||||
|
self.kernel_cmdline_script += ' console=ttyS0'
|
||||||
|
self.serialconsole = True
|
||||||
|
elif arg == "serialstdio":
|
||||||
self.kernel_cmdline_script += ' console=ttyS0'
|
self.kernel_cmdline_script += ' console=ttyS0'
|
||||||
self.serialstdio = True
|
self.serialstdio = True
|
||||||
elif arg == 'audio':
|
elif arg == 'audio':
|
||||||
@@ -1169,7 +1174,7 @@ class BaseConfig(object):
|
|||||||
if self.snapshot:
|
if self.snapshot:
|
||||||
self.qemu_opt += " -snapshot"
|
self.qemu_opt += " -snapshot"
|
||||||
|
|
||||||
if self.serialstdio:
|
if self.serialconsole:
|
||||||
if sys.stdin.isatty():
|
if sys.stdin.isatty():
|
||||||
subprocess.check_call("stty intr ^]", shell=True)
|
subprocess.check_call("stty intr ^]", shell=True)
|
||||||
logger.info("Interrupt character is '^]'")
|
logger.info("Interrupt character is '^]'")
|
||||||
@@ -1196,7 +1201,7 @@ class BaseConfig(object):
|
|||||||
# INIT: Id "S1" respawning too fast: disabled for 5 minutes
|
# INIT: Id "S1" respawning too fast: disabled for 5 minutes
|
||||||
serial_num = len(re.findall("-serial", self.qemu_opt))
|
serial_num = len(re.findall("-serial", self.qemu_opt))
|
||||||
if serial_num == 0:
|
if serial_num == 0:
|
||||||
if re.search("-nographic", self.qemu_opt):
|
if re.search("-nographic", self.qemu_opt) or self.serialstdio:
|
||||||
self.qemu_opt += " -serial mon:stdio -serial null"
|
self.qemu_opt += " -serial mon:stdio -serial null"
|
||||||
else:
|
else:
|
||||||
self.qemu_opt += " -serial mon:vc -serial null"
|
self.qemu_opt += " -serial mon:vc -serial null"
|
||||||
|
|||||||
Reference in New Issue
Block a user