[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: boot-floppies broken for 2.0 kernels?



Eric Delaunay writes:
 > Loic Prylli wrote:
 > > 
 > > 
 > > Ok I am probably wrong, I was trying to interpret a bug report that I
 > > got. Just to be sure, are you sure the fact that /dev/console is open
 > > as part of kernel initialisation does not interfere?
 > 
 > kernel 2.0 does not seem to open /dev/console at all.  It makes use of
 > /dev/tty1 or ttyS0 directly.  See init/main.c :
 > 
 >   if ((open("/dev/tty1",O_RDWR,0) < 0) &&
 >       (open("/dev/ttyS0",O_RDWR,0) < 0))
 >   printk("Unable to open an initial console.\n");
 > 

Well actually, on Alpha I have incorporated the serial-console patches 
into  2.0 kernels, by using these patch /dev/console is opened instead of
/dev/tty1 asin the code you show.

Anyway the problem I have been confronted is the code in :
  int stderrToTTY(int tty) {
  	static int fd=-1;
  	char dev[10];
  
  	/* stderr redirect only works on 2.0 kernels */
  	/* FIXME: we need to figure out why it fails on 2.2 kernels.

It seems that with Alpha 2.0 kernels with serial-console added, the same
problem occurs than with 2.2, by disabling it everything is ok. I am
not sure whether it is because Alpha kernels have some fb support in
2.0 or because I added the serial-console support which both are present in
standard in 2.2.

In trying to debug the problem a little, I saw that the slang library
has its main file descriptor open on /dev/tty3 instead of tty1. The
source show that slang tries to open /dev/tty, and I have not been able to
understand why /dev/tty could point to /dev/tty3 (which is the
stderr), or if it something else (bad fd manipulations..)

Sorry for suspecting your modification in rootdisk.sh first,

Regards,

Loic



Reply to: