]> git.ipfire.org Git - thirdparty/mkosi.git/commit
qemu: Use virtconsole serial console instead of regular serial console
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 30 Mar 2023 11:56:53 +0000 (13:56 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 30 Mar 2023 19:37:14 +0000 (21:37 +0200)
commit5b1dfd3869a9f2e2f263138ed2aea291e42f0c70
tree067bd8600c64b0dada96746c3995f11d8ae5fb6d
parentaf1fe54805c84bb09e80bb585399121946fec701
qemu: Use virtconsole serial console instead of regular serial console

With --qemu-headless, qemu stops working when latest systemd is not
available because smbios provided kernel cmdline arguments are ignored.
This includes "console=ttyS0" meaning we don't get any output on the
serial console when booting in qemu.

As a workaround, let's use qemu's virtconsole instead. This means the
serial console will be available in the VM as /dev/hvc0, on which
systemd will automatically spawn a serial getty. This means we'll
eventually get a login prompt, even if latest systemd is not used.

One caveat is that EDK2 doesn't seem to support virtio-serial with
virtconsole. To get around this limitation, we keep a regular serial
console around as well, which can be used by the bootloader to log
its output.
mkosi.md
mkosi/__init__.py