Serial console in 2.3.99?
Subsystems (2)
Hi all,
I don't seem to get the serial console working in Paul's 2.3.99-pre9. I have tried all kernel command lines, but no dice.... I had it working in 2.2.15, but that same command line does not work for 2.3.99. The cabling is ok; I can cat files out the serial ports and get them on the other side. But not a single character of kernel log shows up...
Anybody know what's happening? Any patches around? I absolutely need the console to debug strange crashes, with nothing in the syslog...
Thanks
Michel
-------------------------------------------------------------------------
Michel Lanners | " Read Philosophy. Study Art. 23, Rue Paul Henkes | Ask Questions. Make Mistakes. L-1710 Luxembourg | email [email protected] | http://www.cpu.lu/~mlan | Learn Always. "
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Quoted 11 lines · Michel Lanners
Hi all,
I don't seem to get the serial console working in Paul's 2.3.99-pre9. I have tried all kernel command lines, but no dice.... I had it working in 2.2.15, but that same command line does not work for 2.3.99. The cabling is ok; I can cat files out the serial ports and get them on the other side. But not a single character of kernel log shows up...
Anybody know what's happening? Any patches around? I absolutely need the console to debug strange crashes, with nothing in the syslog...
Well, not that helpful but here are my experiences:
Today rsynced 2.3.99p9 from linuxcare->
vector: 700 at pc = c000673c, lr = c00051f8, msr = 81030, sp = c01f2ee0 [c01f2e30] current = c01f1000, pid = 0, comm = swapper
mon> x
This is on a pm7200, the same with bitkeeper. So the line must be working(physical).
Tomorrow I try to get a bk tree with the changes visible, but 300MB in size..... No, not today via 56k modem....
A 2.3.99p6 DID work under 7200. I suppose digging in the diffs is now THE task, for me, if it boots, then I/we have to find out about the console stuff.
In other words, I'm also interested in getting this to work.
regards
Andreas
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Re: Serial console in 2.3.99 (PATCH)
Hi all,
On 29 May, this message from Andreas Tobler echoed through cyberspace:
Quoted 3 lines
Quoted 3 lines
I don't seem to get the serial console working in Paul's 2.3.99-pre9. I have tried all kernel command lines, but no dice.... I had it working in 2.2.15, but that same command line does not work for 2.3.99.
[snip]
Quoted 1 line
In other words, I'm also interested in getting this to work.
Well, here comes the patch to get the mac serial console working in the late 2.3.99 and 2.4.0 kernel series.
The problem was that macserial.c used serial_console_init() to init the serial ports as possible console devices, but that function was only called when CONFIG_SERIAl (i.e.generic PC-style serial ports) was enabled. On the other hand, macserial.c refused to compile serial console support in (in fact, refused to compile at all) with CONFIG_SERIAl set. Errr.....
Well, my fix changes the mac serial console init function to mac_scc_console_init(), so it's not exclusive vs. PC-style serial ports. However, as there are potential problems with port naming, if you have CONFIG_MAC_SERIAl, CONFIG_SERIAl and CONFIG_SERIAl_CONSOLE all set, mac serial ports will take precedence, and no console device can be on a PC-style serial port. I'm not sure there's a simple way to fix this short of givng the mac serial ports a different name (not ttyS...) so they are differentiated from PC-style serial.
Anyway, while I was at it, I also included a check on the kernel command line options for serial ports, so that specifying console=ttyS99 doesn't crash the kernel ;-)
Please test, especially on machines having both mac-style and PC-style serial ports, an report back. I'd like to send this off to Alan ASAP.
Thanks
Michel
-------------------------------------------------------------------------
Michel Lanners | " Read Philosophy. Study Art. 23, Rue Paul Henkes | Ask Questions. Make Mistakes. L-1710 Luxembourg | email [email protected] | http://www.cpu.lu/~mlan | Learn Always. "
drivers/char/tty_io.c +8 -3
@@ -150,6 +150,9 @@extern void console_8xx_init (void );extern int rs_8xx_init (void );#endif /* CONFIG_8xx */ +#ifdef CONFIG_MAC_SERIAL +extern void mac_scc_console_init (void ); +#endif /* CONFIG_MAC_SERIAL */ #ifdef CONFIG_HWC extern void hwc_console_init (void );#endif
@@ -2196,16 +2199,18 @@#ifdef CONFIG_SERIAL_CONSOLE #if (defined(CONFIG_8xx) || defined(CONFIG_8260 ))console_8xx_init (); +#elif defined(CONFIG_MAC_SERIAL ) +mac_scc_console_init ();#elif defined(CONFIG_SERIAL )serial_console_init ();#endif /* CONFIG_8xx */ #if defined(CONFIG_MVME162_SCC ) || defined(CONFIG_BVME6000_SCC ) || defined(CONFIG_MVME147_SCC )vme_scc_console_init (); -#endif +#endif /* CONFIG_xVME */ #if defined(CONFIG_SERIAL167 )serial167_console_init (); -#endif -#endif +#endif /* CONFIG_SERIAL167 */ +#endif /* CONFIG_SERIAL_CONSOLE */ #ifdef CONFIG_3215 con3215_init ();#endif
drivers/macintosh/macserial.c +7 -5
@@ -2643,9 +2643,6 @@* ------------------------------------------------------------ */ #ifdef CONFIG_SERIAL_CONSOLE -#ifdef CONFIG_SERIAL -#error Cannot build serial console with macserial and serial drivers -#endif /* * Print a string to the serial port trying not to disturb
@@ -2719,7 +2716,7 @@*/ static int __init serial_console_setup (struct console *co,char *options) { -struct mac_serial *info = zs_soft + co->index; +struct mac_serial *info;int baud =38400 ;int bits =8 ;int parity ='n' ;
@@ -2735,6 +2732,11 @@if (zs_chain ==0 )return -1 ; +/* Do we have the device asked for? */ +if (co->index >= zs_channels_found) +return -1 ; + info = zs_soft + co->index; +set_scc_power (info,1 );/* Reset the channel */
@@ -2904,7 +2906,7 @@/* * Register console. */ -void __init serial_console_init (void ) +void __init mac_scc_console_init (void ) {register_console (&sercons); }