[Buildroot] [PATCH] system: run getty on boot console by default

Alexey Brodkin Alexey.Brodkin at synopsys.com
Tue Dec 23 12:32:00 UTC 2014


Hi Yegor,


On Tue, 2014-12-23 at 13:18 +0100, Yegor Yefremov wrote:
> On Tue, Dec 23, 2014 at 1:06 PM, Alexey Brodkin
> <Alexey.Brodkin at synopsys.com> wrote:
> > We used to specify explicitly serial port with all its settings
> > for init to instantiate getty.
> >
> > This limits usecases when the same one rootfs could be used.
> >
> > For example following cases won't work well with hardcoded
> > serial console settings:
> >  * On the same board other serial port is expected to be used
> >  * The same rootfs is intended to be used on different boards with
> >    different serial ports (like ttySx vs ttyAMAx or even ttyx)
> >
> > With this change by default we rely on "console" specified in
> > kernel's boot command line.
> >
> > What is important getty will be set on the last console
> > specified in bootargs.
> >
> > For example is a kernel comand line:
> > --->---
> > bootargs="... console=tty0 console=ttyS3,115200n8..."
> > --->---
> >
> > This now will instantiate serial console on ttyS3 but not on tty0.
> >
> > Tested with both Busybox and SysV init.
> 
> But can you login as root via /dev/console? AFAIK it was the main
> problem by this approach. There is also another alternative: cttyhack

Probably I don't quite understand your question.
What is a problem with "/dev/console"?

I do login as root with these new settings:
--->---
# whooami
root
--->---

Did I miss something?

-Alexey



More information about the buildroot mailing list