[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 14/19] python/qemu/machine: Allow to use other serial consoles th
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 14/19] python/qemu/machine: Allow to use other serial consoles than default |
Date: |
Thu, 26 Sep 2019 19:34:22 +0200 |
Currently we are limited to use the first serial console available.
Some machines/guest might use another console than the first one as
the 'boot console'.
To be able to use the N console as default, we simply need to connect
all the N - 1 consoles to the null chardev.
Add an index argument, so we can use a specific serial console as
default.
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
python/qemu/machine.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/python/qemu/machine.py b/python/qemu/machine.py
index 128a3d1dc2..302b158a18 100644
--- a/python/qemu/machine.py
+++ b/python/qemu/machine.py
@@ -235,6 +235,8 @@ class QEMUMachine(object):
'-display', 'none', '-vga', 'none']
if self._machine is not None:
args.extend(['-machine', self._machine])
+ for i in range(self._console_id):
+ args.extend(['-serial', 'null'])
if self._console_set:
self._console_address = os.path.join(self._temp_dir,
self._name + "-console.sock")
@@ -495,7 +497,7 @@ class QEMUMachine(object):
"""
self._machine = machine_type
- def set_console(self, device_type=None):
+ def set_console(self, device_type=None, console_id=0):
"""
Sets the device type for a console device
@@ -519,6 +521,7 @@ class QEMUMachine(object):
"""
self._console_set = True
self._console_device_type = device_type
+ self._console_id = console_id
@property
def console_socket(self):
--
2.20.1
- [PATCH 03/19] hw/arm/bcm2835_peripherals: Name various address spaces, (continued)
- [PATCH 03/19] hw/arm/bcm2835_peripherals: Name various address spaces, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 05/19] hw/arm/bcm2835: Add various unimplemented peripherals, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 07/19] hw/misc/bcm2835_mbox: Add trace events, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 06/19] hw/char/bcm2835_aux: Add trace events, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 09/19] hw/arm/bcm2835_peripherals: Use the thermal sensor block, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 08/19] hw/misc/bcm2835_thermal: Add a dummy BCM2835 thermal sensor, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 10/19] hw/timer/bcm2835: Add the BCM2835 SYS_timer, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 11/19] hw/arm/bcm2835_peripherals: Use the SYS_timer, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 12/19] hw/arm/bcm2835_peripherals: Add Clock/Power/Reset Manager blocks, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 13/19] hw/arm/raspi: Define various blocks base addresses, Philippe Mathieu-Daudé, 2019/09/26
- [PATCH 14/19] python/qemu/machine: Allow to use other serial consoles than default,
Philippe Mathieu-Daudé <=
[PATCH 15/19] tests/boot_linux_console: Extract the gunzip() helper, Philippe Mathieu-Daudé, 2019/09/26
[PATCH 17/19] tests/boot_linux_console: Test the raspi2 UART1 (16550 based), Philippe Mathieu-Daudé, 2019/09/26
[PATCH 16/19] tests/boot_linux_console: Add a test for the Raspberry Pi 2, Philippe Mathieu-Daudé, 2019/09/26
[PATCH 18/19] tests/boot_linux_console: Boot Linux and run few commands on raspi3, Philippe Mathieu-Daudé, 2019/09/26
[PATCH 19/19] tests/boot_linux_console: Test SDHCI and termal sensor on raspi3, Philippe Mathieu-Daudé, 2019/09/26
Re: [PATCH 00/19] hw/arm/raspi: Improve Raspberry Pi 2/3 reliability, BALATON Zoltan, 2019/09/26