On my embedded system, I use linux kernel 4.19.102 and systemd 240. Everything is generated using buildroot 2019.02.9.
I use the serial port of my device to output console.
bootargs = "console=ttyS0,115200";
With the previous version I used, everything were fine one the console side (buildroot 2018.05, kernel 4.16.y and systemd 237). I had the following file :
/email@example.com which was launching
/sbin/getty -L ttyS0 115200 vt100
Now, the console prints the usual starting messages and then, prints the log message twice :
Welcome to MyDevice MyDevice login: Welcome to MyDevice MyDevice login:
And when I try to log with a long password beginning with 'r', I get something like this :
Welcome to MyDevice MyDevice login: Welcome to MyDevice MyDevice login: root Password: r Login incorrect MyDevice login:
I can hopefully login with SSH. I have seen that the "getty" service is started twice in this version :
# ps | grep getty 988 root /sbin/getty -L ttyS0 115200 vt100 1002 root /sbin/getty -L console 115200 vt100 1117 root grep getty
The /etc file is now :
/etc/systemd/system/getty.target.wants/console-getty.service which was launching
/sbin/getty -L console 115200 vt100
/sbin/getty -L ttyS0 115200 vt100 is still started.
When I kill the 'console' service (to be in the same state as the previous version), I can login and the console is finally fine.
How Can I configure buildroot or systemd to prevent the console service to start ?