[Buildroot] [PATCH] systemd: let getty instead of serial-getty handle /dev/console

Floris Bos bos at je-eigen-domein.nl
Wed Sep 21 21:47:02 UTC 2016


On 09/21/2016 10:05 PM, Peter Seiderer wrote:
> Hello *,
>
> On Wed, 21 Sep 2016 09:01:37 +0200, Peter Korsgaard <peter at korsgaard.com> wrote:
>
>>>>>>> "Yann" == Yann E MORIN <yann.morin.1998 at free.fr> writes:
>>   > Floris, All,
>>   > On 2016-09-09 18:10 +0200, Floris Bos spake thusly:
>>   >> The serial-getty unit depends on dev-%i.device which does not
>>   >> seem to be created for /dev/console
>>   >> Workaround this by letting normal getty unit handle things
>>   >> if BR2_TARGET_GENERIC_GETTY_PORT is set to 'console'
>>   >>
>>   >> Signed-off-by: Floris Bos <bos at je-eigen-domein.nl>
>>
>>   > I haven't tested that, but I think this is OK just on principle.
>>
>>   > I just wonder if that behaves correctly when console is a serial line or
>>   > anything else (e.g. a VT on HDMI, or through a debug channel...)
>>
>> Yeah, me too. Does anybody know what the difference exactly is between
>> getty/serial-getty, and when one should be used over the other?
>>
> Tested for the rpi3/glibc/systemd case and failed: I get a doubled
> (and unusable) ' Welcome to Buildroot/buildroot login:' on serial and
> no login on hdmi...

Empty cmdline.txt will give hdmi.

Recall you need "console=serial0,115200 console=tty1" with tty1 last in 
cmdline.txt if you want them simultaneous.
So that tty1 becomes /dev/console and serial is handled by systemd's 
automatic getty generator.

Perhaps there is an issue if you have the order swapped, and both 
systemd's automatic stuff and the manual symlink try to display a getty 
on serial.
Not sure how to disable systemd's automatic behavior.



Yours sincerely,

Floris Bos




More information about the buildroot mailing list