[Buildroot] [PATCH] systemd: let getty instead of serial-getty handle /dev/console
flat view
STALE3687d
From: Floris Bos <hidden>
Date: 2016-09-22 19:25:59
On 09/22/2016 08:50 PM, Peter Seiderer wrote:
Hello Floris, On Wed, 21 Sep 2016 23:47:02 +0200, Floris Bos [off-list ref] wrote:quoted
On 09/21/2016 10:05 PM, Peter Seiderer wrote:quoted
Hello *, On Wed, 21 Sep 2016 09:01:37 +0200, Peter Korsgaard [off-list ref] wrote:quoted
quoted
quoted
quoted
quoted
quoted
"Yann" == Yann E MORIN [off-list ref] 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 [off-list ref] > 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.Changed cmdline.txt to: root=/dev/mmcblk0p2 rootwait console=ttyAMA0,115200 console=tty1 Which gives me two (functional) logins on serial and hdmi. But I think changing package/rpi-firmware/cmdline.txt unconditional will break the other Init systems, see commit log from last patch touching cmdline.txt ([1): ...change BR2_TARGET_GENERIC_GETTY_PORT to "console", so it starts a getty on the last console= passed to the kernel, ttyAMA0...
Will withdraw my patch then, and wait for someone else to come up with a better solution. I think the one-size-fits all cmdline.txt that listens to both on HDMI and serial console by default makes things too complicated anyway. Yours sincerely, Floris Bos