From: Joerg Behrmann Date: Thu, 16 Nov 2023 09:38:53 +0000 (+0100) Subject: autologin: add dropin for ttyAMA0 on arm64 X-Git-Tag: v20~137^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e4acfb67a57a4fd29b627d4b80e269df251150b6;p=thirdparty%2Fmkosi.git autologin: add dropin for ttyAMA0 on arm64 ARM64 hardware uses the PL011 driver, which exposes serial terminals as ttyAMA0. Fixes: #2068 --- diff --git a/mkosi/__init__.py b/mkosi/__init__.py index 6900d453b..ad1302260 100644 --- a/mkosi/__init__.py +++ b/mkosi/__init__.py @@ -286,6 +286,21 @@ def configure_autologin(state: MkosiState) -> None: """ # noqa: E501 ) + if state.config.architecture == Architecture.arm64: + dropin = state.root / "usr/lib/systemd/system/serial-getty@ttyAMA0.service.d/autologin.conf" + with umask(~0o755): + dropin.parent.mkdir(parents=True, exist_ok=True) + with umask(~0o644): + dropin.write_text( + """\ + [Service] + ExecStart= + ExecStart=-/sbin/agetty -o '-f -p -- \\\\u' --autologin root --keep-baud 115200,57600,38400,9600 - $TERM + StandardInput=tty + StandardOutput=tty + """ # noqa: E501 + ) + @contextlib.contextmanager def mount_cache_overlay(state: MkosiState) -> Iterator[None]: