From: Daan De Meyer Date: Tue, 18 Apr 2023 11:53:35 +0000 (+0200) Subject: Configure both hvc0 and ttyS0 X-Git-Tag: v15~230^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87ef95f9cc67b0a0c1173a6f720a93f3c148377f;p=thirdparty%2Fmkosi.git Configure both hvc0 and ttyS0 When hvc0 doesn't work for some reason, we can switch back to ttyS0 and still have a working console. --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 6a07c90b0..465fe7c87 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -372,6 +372,8 @@ def configure_autologin(state: MkosiState) -> None: with complete_step("Setting up autologin…"): add_dropin_config_from_resource(state.root, "console-getty.service", "autologin", "mkosi.resources", "console_getty_autologin.conf") + add_dropin_config_from_resource(state.root, "serial-getty@ttyS0.service", "autologin", + "mkosi.resources", "serial_getty_autologin.conf") add_dropin_config_from_resource(state.root, "serial-getty@hvc0.service", "autologin", "mkosi.resources", "serial_getty_autologin.conf") add_dropin_config_from_resource(state.root, "getty@tty1.service", "autologin", @@ -1101,6 +1103,9 @@ def load_kernel_command_line_extra(args: argparse.Namespace) -> list[str]: f"systemd.tty.term.hvc0={os.getenv('TERM', 'vt220')}", f"systemd.tty.columns.hvc0={columns}", f"systemd.tty.rows.hvc0={lines}", + f"systemd.tty.term.ttyS0={os.getenv('TERM', 'vt220')}", + f"systemd.tty.columns.ttyS0={columns}", + f"systemd.tty.rows.ttyS0={lines}", "console=hvc0", ]