From 8f207701174735bebc854d63ea84132951efe5eb Mon Sep 17 00:00:00 2001 From: Wren Turkal Date: Thu, 23 Jul 2020 21:45:13 -0700 Subject: [PATCH] Allow logging serial from qemu to a file. Setting the qemu_serial_logfile variable in your .config to a file path will cause the serial output from qemu to be mirrored to that file. Signed-off-by: Wren Turkal --- mk/qemu.mk | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mk/qemu.mk b/mk/qemu.mk index 6b70c37..a68f153 100644 --- a/mk/qemu.mk +++ b/mk/qemu.mk @@ -5,7 +5,8 @@ QEMU_EFI=/usr/share/OVMF/OVMF_CODE.fd ifeq ($(serial),no) QEMUFLAGS+=-chardev stdio,id=debug -device isa-debugcon,iobase=0x402,chardev=debug else - QEMUFLAGS+=-serial mon:stdio + QEMUFLAGS+=-chardev stdio,id=debug,signal=off,mux=on,"$(if $(qemu_serial_logfile),logfile=$(qemu_serial_logfile))" + QEMUFLAGS+=-serial chardev:debug -mon chardev=debug endif ifeq ($(iommu),yes) QEMUFLAGS+=-machine q35,iommu=on