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

Re: Debian on SGI Altix IA-64


On Sunday 24 December 2006 13:19, dann frazier wrote:
> This should be fixed in the next upload of linux-2.6 (2.6.18-9).
> I'll look into the console stuff next. Thanks!

I've done some other research about the console thing on the Altix. In kernel 
> 2.6.7, there is a new serial console driver for the Altix L1 
(CONFIG_SERIAL_SGI_L1_CONSOLE=y) and the device is /dev/ttySG0. I think this 
device is the one associated with /dev/console in the d-i because, if I 
create it (just before busybox init starts):
mknod ttySG0 c 204 40
echo "something" > /dev/ttySG0 or
echo "something" > /dev/console
both will echo.

Then I looked at how busybox init was choosing the console and found out that 
this part of code is being executed:
... (from busybox init.c source)
if (ioctl(0, TIOCGSERIAL, &sr) == 0) {
  /* this is a serial console */
  snprintf(console, sizeof(console) - 1, SC_FORMAT, sr.line);
 while ((fd = open(console, O_RDONLY | O_NONBLOCK)) < 0 && tried < 2) {
       /* Can't open selected console -- try
              logical system console and VT_MASTER */
    safe_strncpy(console, (tried == 0 ? _PATH_CONSOLE : CURRENT_VC), 

So sr.line is set to 0 which seems correct but the SC_FORMAT variable 
is '/dev/tts/' (hard-coded) resulting in console=/dev/tts/0 instead 
of /dev/ttySG0.

On the d-i CD, /dev/tts/0 is created by 
the /lib/debian-installer/init-udev-devices script, so busybox will try to 
open it and will succeed but this device is not the correct one on the Altix 
so no more console output after busybox init.

If I delete /dev/tts/0 (or comment out the line to create this device in the 
init-udev-devices script), the 'open' call of busybox will fail so busybox 
will retry with console=_PATH_CONSOLE (which is defined as /dev/console) and 
this will work since we effectively are on /dev/console (/dev/ttySG0) during 
the Debian installation on Altix.

That is what I think creates the problem with console output when installing 
on Altix. I don't know what is the best solution but maybe:
1- patching busybox so that SC_FORMAT would be /dev/ttySG on Altix (if kernel 
> 2.6.7)
2- creating the /dev/ttySG0 device in the init-udev-devices script


Reply to: