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

Bug#504721: (forw) Re: Please help solve #504721

Forwarding Bjørn's interesting comments to the bug report.

----- Forwarded message from Bjørn Mork <bmork@dod.no> -----

To: debian-boot@lists.debian.org
From: Bjørn Mork <bmork@dod.no>
Subject:  Re: Please help solve #504721
Date:  Sat, 29 Nov 2008 23:35:12 +0100
Organization:  Dystrophy on Doggerel
X-Mailing-List: <debian-boot@lists.debian.org> archive/latest/136459
X-CRM114-Status: Good  ( pR: 53.0237 )

Jurij Smakov <jurij@wooyd.org> writes:

> We have recently recognized that serial console detection in the 
> installer is not working as expected, which resulted in RC bug 
> http://bugs.debian.org/504721.

The problem is that there is no reliable platform independent way to
detect the preferred console.  It would have been really helpful if
register_console() could have printed it's conclusions, but it doesn't.
The guesswork done by reopen-console is correct, given that nothing has
ever called add_preferred_console().

This fails on sparc64, and presumably other platforms where the
preferred console is configured by the boot prom.

The failure on sparc64 is cause by the following chain of events:

- of_console_init() in arch/sparc64/kernel/prom.c sets of_console_device
  based on openboot prom settings
- a number of (Sun) serial drivers will call sunserial_console_match()
  in drivers/serial/suncore.c, which calls add_preferred_console() in
  kernel/printk.c if the device matches of_console_device
- add_preferred_console() adds the device to the console_cmdline structure 
- register_console() in kernel/printk.c will set the preferred console
  based on the console_cmdline structure, which contains both the kernel
  cmdline console options and the additions made by add_preferred_console()

This can probably be fixed on sparc64 by parsing the output from
of_console_init().  It is supposed to print "OF stdout device is: %s\n".

But the problem will also affect other platforms.  Just grep for
add_preferred_console() in the kernel source to find other possible
failure cases.  Note that things sometimes may work even if
add_preferred_console() is called.  E.g. if the preferred console is
registered first by chance, or if it is listed on the kernel command

It's well known that depravity is pretty fun

To UNSUBSCRIBE, email to debian-boot-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

 ** CRM114 Whitelisted by: WHITELIST **

----- End forwarded message -----


Attachment: signature.asc
Description: Digital signature

Reply to: