Hi,
This was quite some home work!
I had to re-explored Debians "systemd" logic ... wish back the
days of "System V init".
From my old notes and current understanding:
- For each serial port enabled for login, there must exist an
special entry for the UART in
/etc/systemd/system/getty.target.wants
It is normally a link to the generic
/lib/systemd/system/getty@.service
It is generated with
ln -sf
/lib/systemd/system/getty@.service
/etc/systemd/system/getty.target.wants/ge...@ttyS1.service
To enable UART2 it would be
ln -sf
/lib/systemd/system/getty@.service
/etc/systemd/system/getty.target.wants/ge...@ttyS2.service
The key command in this rule-file is
ExecStart=-/sbin/agetty -a root
--noclear %I $TERM
See man page of "agetty" for options, the baud rate goes there.
For example the"-a root" comamndline option does the "auto login".
It may be wise not to link but to copy
"getty@.service" to
"ge...@ttyS1.service",
and operate on the copy only.
cp -sf
/lib/systemd/system/getty@.service
/etc/systemd/system/getty.target.wants/ge...@ttyS1.service
Joerg