diff --git a/virtme/architectures.py b/virtme/architectures.py index ba16138..1380096 100644 --- a/virtme/architectures.py +++ b/virtme/architectures.py @@ -43,6 +43,12 @@ def serial_console_args() -> List[str]: def qemu_nodisplay_args() -> List[str]: return ['-vga', 'none', '-display', 'none'] + @staticmethod + def qemu_serial_console_args() -> List[str]: + # We should be using the new-style -device serialdev,chardev=xyz, + # but many architecture-specific serial devices don't support that. + return ['-serial', 'chardev:console'] + @staticmethod def config_base() -> List[str]: return [] @@ -281,14 +287,16 @@ def qemuargs(self, is_native): # default console ret.extend(['-nodefaults']) - ret.extend(['-device', 'sclpconsole,chardev=console']) - return ret @staticmethod def config_base(): return ['CONFIG_MARCH_Z900=y'] + @staticmethod + def qemu_serial_console_args(): + return ['-device', 'sclpconsole,chardev=console'] + ARCHES = {arch.virtmename: arch for arch in [ Arch_x86('x86_64'), Arch_x86('i386'), diff --git a/virtme/commands/run.py b/virtme/commands/run.py index f11444e..5a266f2 100644 --- a/virtme/commands/run.py +++ b/virtme/commands/run.py @@ -376,9 +376,7 @@ def do_it() -> int: qemuargs.extend(['-serial', 'none']) qemuargs.extend(['-chardev', 'stdio,id=console,signal=off,mux=on']) - # We should be using the new-style -device serialdev,chardev=xyz, - # but many architecture-specific serial devices don't support that. - qemuargs.extend(['-serial', 'chardev:console']) + qemuargs.extend(arch.qemu_serial_console_args()) qemuargs.extend(['-mon', 'chardev=console'])