Re: Running headless

Andreas Koppenhoefer (koppenas@koppenas.informatik.uni-stuttgart.de)
Tue, 18 Jul 1995 14:29:54 +0200 (MET DST)


-----BEGIN PGP SIGNED MESSAGE-----

> > - linux cannot redirect console to serial line, yet. But there are
> > some hooks which make that possible. In linux/drivers/char/console.c
> > you can find a call
> > register_console(console_print);
> > which registers system console as output channel for printk's.
>
> I saw this when I was looking around recently. It would be good to be
> able have /dev/tty1 go to /dev/cua0 as well; this would make init and
> the /bin/login in /etc/rc.d/rc.M (slackware) work with the serial port
> with no other changes. Where is it written that the terminal that
> /etc/rc.d/* gets is tty1?

There is no need in pointing /dev/ttyX to /dev/cuaX! The behaviour of
login and getty is defined via init process and /etc/inittab (which is
in user space). /dev/ttyX is the physical device of your console while
/dev/cuaX is that of the serial lines.

What we need is a kernel function which is capable of redirecting
printk's text output to serial device. And this function must be
registered with register_console(serial_print). Just implenent
serial_print() and you're finished.

> I'm surprised that noone has written this before. It seems such a
> useful thing to have. I would, but I don't have the time (who does!).

I'm surprised, too. Maybe there are some functions in serial driver
which can be used for that?

Andreas

- --
Andreas Koppenhoefer, Student der Universitaet Stuttgart, BR Deutschland
prefered languages: German, English, C, perl ("Just another Perl hacker,")
SMTP: koppenas@informatik.uni-stuttgart.de (university address)
Andreas.Koppenhoefer@studbox.uni-stuttgart.de (my home address)
privat: Belaustr. 5/3, D-70195 Stuttgart, Germany,
Earth, Sector ZZ9 plural Z alpha
phone: +49 711 694111 and +49 711 6999006 (19-22h MEZ=GMT+1)

-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQBVAgUBMAupKUVdjNvyndGpAQGwhAH9EhFv35SK6cl8XYJ+LpCWne0bKzU9YEzy
q3rJEgOL735aItxjMR5I2Spl/22K1ubBBfuTdS0SlagLX6eZqftmqg==
=WatO
-----END PGP SIGNATURE-----