image: add getty systemd unit for debug images

This replaces the mkosi --autologin solution with a getty systemd unit for ttyS0.
Note that both console and debug images hace their consoles enabled.
This commit is contained in:
Leonard Cohnen 2024-09-13 23:26:04 +02:00
parent 6a0296701e
commit cdcb6dd871
3 changed files with 14 additions and 0 deletions

View File

@ -2,6 +2,7 @@ enable systemd-timesyncd.service
enable systemd-networkd.service
enable systemd-networkd-wait-online.service
enable configure-constel-csp.service
enable serial-getty@tty0.service
enable dbus.service
enable dbus-broker.service
enable dbus-daemon.service

View File

@ -0,0 +1,12 @@
[Unit]
Description=autologin
ConditionPathExists=/proc/cmdline
ConditionKernelCommandLine=|constellation.console
ConditionKernelCommandLine=|constellation.debug
[Service]
ExecStart=
ExecStart=-/sbin/agetty -o '-p -f -- \\u' --keep-baud --autologin root 115200,57600,38400,9600 - $TERM
[Install]
WantedBy=multi-user.target

View File

@ -135,6 +135,7 @@ attestation_variant_settings = {
stream_settings = {
"console": {
"kernel_command_line": "constellation.console",
},
"debug": {
"kernel_command_line": "constellation.debug",