lkml.org 
[lkml]   [1998]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: serial console patch for 2.0.33
This is embarassing.  I'll try as a MIME attachment now.

At 07:15 PM 2/15/98 -0600, Brian Rogers wrote:
>In my last message, the patch was mangled by my mail software. Below I
>include the patch in uuencoded format. My apologies for the waste of
>band-width and possibly your frustration.
>
>At 06:31 PM 2/15/98 -0600, Brian Rogers wrote:
>>The below patch to 2.0.33 will allow a Linux box with no video card to boot
>>with /dev/ttyS0 (COM1) as the console. The files /dev/tty1 and
>>/dev/console should be deleted then made symbolic links to /dev/ttyS0. The
>>"serial=0,9600n8", "prompt", and "timeout=" options needs to be added to
>>/etc/lilo.conf. Note that, in the kernel source, the baud rate is
>>hard-coded to 9600 and the serial port to COM1 at address 0x3f8. (It was
>>that way when I found it.) You'll probably want to disable the getty on
>>tty1 and add a getty for ttyS0 at 9600 baud.
>>
>>/* Brian Rogers */
diff -ur linux-2.0.33/arch/i386/config.in linux-2.0.33-patched/arch/i386/config.in
--- linux-2.0.33/arch/i386/config.in Sun May 12 23:17:23 1996
+++ linux-2.0.33-patched/arch/i386/config.in Fri Feb 6 00:43:49 1998
@@ -43,6 +43,7 @@
486 CONFIG_M486 \
Pentium CONFIG_M586 \
PPro CONFIG_M686" Pentium
+bool 'Echo console messages on /dev/ttyS0 (COM1)' CONFIG_SERIAL_ECHO
endmenu

source drivers/block/Config.in
diff -ur linux-2.0.33/drivers/char/console.c linux-2.0.33-patched/drivers/char/console.c
--- linux-2.0.33/drivers/char/console.c Mon Nov 3 18:56:30 1997
+++ linux-2.0.33-patched/drivers/char/console.c Sun Feb 8 15:38:48 1998
@@ -1866,6 +1866,10 @@
unsigned char c;
static int printing = 0;

+#ifdef CONFIG_SERIAL_ECHO
+ serial_echo_print(b);
+#endif /* CONFIG_SERIAL_ECHO */
+
if (!printable || printing)
return; /* console not yet initialized */
printing = 1;
@@ -1879,10 +1883,6 @@
return;
}

-#ifdef CONFIG_SERIAL_ECHO
- serial_echo_print(b);
-#endif /* CONFIG_SERIAL_ECHO */
-
while ((c = *(b++)) != 0) {
if (c == 10 || c == 13 || need_wrap) {
if (c != 13)
@@ -2077,6 +2077,10 @@
set_origin(currcons);
csi_J(currcons, 0);

+#ifdef CONFIG_SERIAL_ECHO
+ serial_echo_init(SERIAL_ECHO_PORT);
+#endif /* CONFIG_SERIAL_ECHO */
+
/* Figure out the size of the screen and screen font so we
can figure out the appropriate screen size should we load
a different font */
@@ -2088,10 +2092,6 @@
default_font_height = video_font_height = ORIG_VIDEO_POINTS;
/* This may be suboptimal but is a safe bet - go with it */
video_scan_lines = video_font_height * video_num_lines;
-
-#ifdef CONFIG_SERIAL_ECHO
- serial_echo_init(SERIAL_ECHO_PORT);
-#endif /* CONFIG_SERIAL_ECHO */

printk("Console: %ld point font, %ld scans\n",
video_font_height, video_scan_lines);
\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.104 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site