Skip to contentSkip to conversation

sticon/sercon patch for new bootfloppies...

parisc-linux Helge Deller 2 participants 2 messages Jun 13, 2001

lore
Share & tools
lore
#0 lore raw

Hi,

the attached patch enables only those consoles, which are given on the linux kernel command line.
Examples: "console=tty0" activates STIcon only, "console=ttyS0" activates serial console only and if you use both on the commandline you will get the system messages on both consoles.

Known bugs:
- STIcon will not show any messages which happened before the STI initialisation

Please test and comment
Greetings,
Helge

Index: arch/parisc/kernel/pdc_cons.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/pdc_cons.c,v retrieving revision 1.25

pdc_cons.c +8 -0
diff -u -r1.25 pdc_cons.c
@@ -11,6 +11,10 @@
 #include <asm/system.h>
 #include <asm/pdc.h>	/* for iodc_call() proto and friends */
 
+
+/* Enable to use this simple PDC console (for debugging purposes only!): */
+#undef EARLY_BOOTUP_DEBUG
+
 static void pdc_console_write(struct console *co, const char *s, unsigned count)
 {
 	while(count--)
@@ -46,15 +50,18 @@
 	if (PAGE0->mem_cons.cl_class == CL_DUPLEX)
 		memcpy(&PAGE0->mem_kbd, &PAGE0->mem_cons, sizeof(PAGE0->mem_cons));
 
+#ifdef EARLY_BOOTUP_DEBUG
 	pdc_console_write(0, "PDC Console Initialized\n", 24);
 	/* register the pdc console */
 	register_console(&pdc_cons);
+#endif /* EARLY_BOOTUP_DEBUG */
 }
 
 
 /* Unregister the pdc console with the printk console layer */
 void pdc_console_die(void)
 {
+#ifdef EARLY_BOOTUP_DEBUG
 	extern unsigned long log_size; /* kernel/printk.c */
 
 	printk("Switching from PDC console\n");
@@ -74,6 +81,7 @@
 #endif
 
 	unregister_console(&pdc_cons);
+#endif /* EARLY_BOOTUP_DEBUG */
 }
 
 

Index: arch/parisc/kernel/setup.c
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/kernel/setup.c,v retrieving revision 1.81

setup.c +4 -8
diff -u -r1.81 setup.c
@@ -425,14 +425,10 @@
 			boot_cpu_data.cpu_hz / 1000000,
 			boot_cpu_data.cpu_hz % 1000000	);
 
-#ifdef CONFIG_SERIAL_CONSOLE
-	/* nothing */
-#elif CONFIG_VT
-#if   defined(CONFIG_STI_CONSOLE)
-	conswitchp = &dummy_con;	/* we use take_over_console() later ! */
-#elif defined(CONFIG_DUMMY_CONSOLE)
-	conswitchp = &dummy_con;
-#endif
+#ifdef CONFIG_VT
+# if defined(CONFIG_STI_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE)
+        conswitchp = &dummy_con;        /* we use take_over_console() later ! */
+# endif
 #endif
 
 }
#1 lore raw
Quoted 11 lines · Helge Deller

Hi,

the attached patch enables only those consoles, which are given on the linux kernel command line.
Examples: "console=tty0" activates STIcon only, "console=ttyS0" activates serial console only and if you use both on the commandline you will get the system messages on both consoles.

Known bugs:
- STIcon will not show any messages which happened before the STI initialisation

Just tried a kernel with serial console, sti console, and sti fb all compiled in, with palo/unstable. Seems to do the right thing on my B180 :)

The kernel knows it cannot support b180 fb, so uses sti console automatically but this kernel should use sti fb on those machines that we support.

I left the b180 alone until the "screen blanking" cut in. It just turns off the cursor, btw, doesn't blank the screen.

When I came back to it the cursor had gone back to top-left, and all chars are printed as blobs of garbage. System is still happy apart from that.

I think the cursor going to top-left on a screen blank is a result of your last lot of bug fixes, but not certain of that.

The other thing for people to note is that if you specify both console=ttyS0 and console=tty0, then the order is important. The real console is the second one you specify, the other just gets a copy of boot messages (all kernel printk's, I guess).

Richard