Erik Andersen wrote:
> On Tue Nov 02, 1999 at 11:47:05AM -0700, Matt Porter wrote:
> >
> > I will try this on a video console machine since I can't see a lot of error
> > messages on serial console.
>
> On the subject of serial console... Anybody know if the sparc
> is still broken wrt serial console? The old busybox init.c
> checks if console==/dev/tty[ab] and then remaps things to
> /dev/ttyS[01]. Is this sort of uglyness still needed?
It's not broken, it's a short hand to force boot on serial console: you can
pass console=ttya to the kernel directly (console=prom is another alternative
to display using OpenPROM monitor instead of Linux framebuffer).
Anyway, under 2.2 kernels, /dev/console is always used and linked to the right
device.
console=tty[ab] was needed by init running on 2.0 kernel to detect serial boot,
after the kernel has started displaying to /dev/ttySN (/dev/cuaN really). This
syntax is still supported by 2.2 kernels but init don't have to worry about
because /dev/console is always linked to the real backend. However, since the
code that implements this is really short, could you keep it in init?
> Also, a bunch of the console detection code could be simplified if
> I can be assured that somebody has done a:
> rm -f console
> mknod -m 622 console c 5 1
>
> Do the boot floppies now have /dev/console as a device instead of
> a symlink?
It's already the case in our current boot-floppies, but I think you missed the
point.
You *should* use the right real console backend for the first terminal instead
of /dev/console because the later is *not* supporting job control. To figure
out what device is the real backend (serial consoles or linux VT), issue
TIOCGSERIAL & VT_GETSTATE ioctls. See my patch below.
Moreover, what if there is no VT console, just serial one? init is then trying
to run a shell in /dev/tty2 everytime even when no such terminal exists. In
this case, console screen is flooded with these messages:
Bummer, can't write to log on /dev/tty3!
modprobe: Can't open dependencies file /lib/modules/2.2.13/modules.dep
The last one is due to the kernel which is wanting to run modprobe asking to
load the vt module :((
Well, even if modprobe find its dep file, it will be run ever and ever because
the vt driver is compiled in kernel but not enabled on serial boot.
The patch to fix all these problems is attached to this email. It works quite
well on sparc but don't know about other architectures. Hope it works too...
Could you run some trial?
> -Erik
Regards.
--
Eric Delaunay | "La guerre justifie l'existence des militaires.
delaunay@lix.polytechnique.fr | En les supprimant." Henri Jeanson (1900-1970)