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 <wt@penguintechs.org>
This commit is contained in:
Wren Turkal 2020-07-23 21:45:13 -07:00
parent a5a912228e
commit 8f20770117

View file

@ -5,7 +5,8 @@ QEMU_EFI=/usr/share/OVMF/OVMF_CODE.fd
ifeq ($(serial),no) ifeq ($(serial),no)
QEMUFLAGS+=-chardev stdio,id=debug -device isa-debugcon,iobase=0x402,chardev=debug QEMUFLAGS+=-chardev stdio,id=debug -device isa-debugcon,iobase=0x402,chardev=debug
else 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 endif
ifeq ($(iommu),yes) ifeq ($(iommu),yes)
QEMUFLAGS+=-machine q35,iommu=on QEMUFLAGS+=-machine q35,iommu=on