Hi Thomas,
On 09-Sep-98 Thomas Riemer wrote:
> Thanks for the helpful hints - I've actually managed to get characters
> flowing through the serial line at this point.
>
> I noticed in my debugging that the kernel was generating an error
> that it couldn't open /dev/console - it looked like it was failing
> on dz_open. Anyone tell me the vague story on how /dev/console
> gets mapped to the serial port? Or at least point me at the right
> file.
linux/Documentation/serial_console.txt :-).
--- begin quote ---
If no console device is specified [in the command line options], the first
device found capable of acting as a system console will be used. At this time,
the system first looks for a VGA card and then for a serial port. So if you
don't have a VGA card in your system the first serial port will automatically
become the console.
--- end quote ---
The first serial port is usually /dev/ttyS0.
>From dz_init():
..
i = 0;
for (info = &multi[i]; i < DZ_NB_PORT; i++) {
info->magic = SERIAL_MAGIC;
info->port = (unsigned) dec_serial_base;
info->line = i;
info->tty = 0;
...
}
..
>From dz_open():
static int dz_open (struct tty_struct *tty, struct file *filp)
{
struct dz_serial *info;
int retval, line;
line = MINOR(tty->device) - tty->driver.minor_start;
/* The dz lines for the mouse/keyboard must be
* opened using their respective drivers.
*/
if ((line < 0) || (line >= DZ_NB_PORT))
return -ENODEV;
if ((line == DZ_KEYBOARD) || (line == DZ_MOUSE))
return -ENODEV;
...
}
>From dz.h:
#define DZ_KEYBOARD 0x0000 /* line 0 = keyboard */
That means:
open("/dev/console") -> dz_open(line 0) -> line == DZ_KEYBOARD
-> return -ENODEV;
You can try passing a commandline option to the kernel:
<insert_your_boot_command_here> nbImage console=ttyS3
or change the mapping of line numbers to actual lines.
Hope this helps.
---
Regards,
Harald
|