Sorry again, I have yet found more info!
Actually, the above seem to be required as long as the ‘udev’ package is not installed. As soon as ‘udev’ package get installed, the above not only is no longer required, but it does render working on the serial console impossible, because you will get 2 instances of tty actually getting started on the serial console.
In other word, if you have applied the above ‘fix’, withouth ‘udev’ package installed, everything is fine. When you boot, the ttyS0 boot argument will make the system check the link you created above, and a tty is attributed to the serial console.
But, when you install ‘udev’ (or rather, as soon as it get installed, for example as a dependency to some other package), then chaos occur on subsequent boot. The above mechanism still apply, but now ‘udev’ will also, on it’s own, start a tty on the console.
The end result, at first, is that you see 2 banners right after boot. Ex:
Ubuntu 16.04.3 LTS de1-soc ttyS0
Ubuntu 16.04.3 LTS de1-soc ttyS0
localhost login: localhost login:
Then, you get 2 tty instances fighting for the input and output, ending with an unusable user interface (try to login, getting invalid password because some character end up in one instance, some character in the other instance). Really nasty (and weird feeling you get when this occurs)!
So, the best option is to install udev right away, when you build your rootfs (with qemu for example). Another option, if this is not possible (for example if you rely on a boot script to install the packages) it to do the link to the tty service when you create the rootfs, and in your boot script, install udev and delete the symlink before the next reboot.
No wonder why some people saw the issue, other did not, and why it seemed so strange to pinpoint. I guess that when you know the internals of udev, you are well aware of this. However, as usual, the challenge is to get those few persons cross those other persons who are reporting issues in the forums
Regards,
Eric