lkml.org 
[lkml]   [1997]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectNew /dev/console and /dev/tty0

I'm having some problems with the new /dev/console and the lost /dev/tty0
while using a serial console.


Originally we had

c 4 0 /dev/tty0 current virtual console
c 4 1 /dev/tty1 first virtual console
... ... ...
c 4 63 /dev/tty63 63rd virtual console

c 4 64 /dev/ttyS0 first serial port
... ... ...
c 4 127 /dev/ttyS63 64th serial port

/dev/console -> /dev/tty0 (soft link)


Then Miquel van Smoorenburg added nice serial console support, which is
(unfortunately) still not included in the current kernel. The current serial
console is IMHO far less powerfull (console=xxx? $CONSOLE? kernel monitor?).
And what's Miquel's serial-console.txt doing there but confusing people?

I ported Miquel's serial console to Linux/m68k and added (experimental) support
for multiple frame buffer devices (yes, multiheaded Linux/m68k!). The goal is
to `map' frame buffer devices to virtual consoles, so you can use
`console=/dev/tty1' to get the console on frame buffer device x (if frame
buffer device x is mapped to tty1). So we had

/dev/console -> /dev/{tty?,ttyS?}

This required some changes to software that incorrectly opened /dev/console
instead of /dev/tty0, and thus we binpatched X and gpm and everything worked
fine.


Now (2.1.3x) there's (limited and hardcoded) serial console support, and
/dev/console is automatically mapped to the real console device, obsoleting the
creation of a soft link to the real console device by one of the rc scripts.
This looks very appealing from a first view --- e.g. it makes `console=xxx'
much easier to implement ---, but there are some pitfalls. Now we have

c 4 0 /dev/console current console (automatic)

I upgraded our serial console support, and then the problem shows up. I have
both a serial terminal (used as console) and a normal screen (used for virtual
consoles). Gpm no longer works with `console=/dev/ttyS0', because my old
/dev/tty0 (c 4 0, which should be renamed to /dev/console, but that doesn't
matter here) automatically points to /dev/ttyS0. I can make gpm open /dev/tty1,
but then I can paste to the first virtual console only, which is not really
what I want :-(

In summary, while we created an `automatic' /dev/console, we lost the ability
to access the current virtual console (formerly /dev/tty0), or am I missing
something??

IMHO we have two options:

- revert to a `manual' /dev/console, to be linked to the real console device
by one of the rc scripts. This requires the setting of $CONSOLE for init.

- create a new device for /dev/console, so c 4 0 can stay /dev/tty0 and can
be used to access the current virtual console.

Any comments and/or solutions are strongly welcomed!

Greetings,

Geert

--
Geert Uytterhoeven Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/m68k on Amiga http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium


\
 
 \ /
  Last update: 2005-03-22 13:39    [W:1.301 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site