Search
j0ke.net Open Build Service
>
Projects
>
stresslinux
>
memtest86+
> serial-enable
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File serial-enable of Package memtest86+ (Revision 8)
Currently displaying revision
8
,
show latest
diff -ur memtest86+-1.70.orig/config.h memtest86+-1.70/config.h --- memtest86+-1.70.orig/config.h 2006-12-27 02:33:06.000000000 +0100 +++ memtest86+-1.70/config.h 2007-01-25 16:34:01.000000000 +0100 @@ -13,7 +13,7 @@ /* SERIAL_CONSOLE_DEFAULT - The default state of the serial console. */ /* This is normally off since it slows down testing. Change to a 1 */ /* to enable. */ -#define SERIAL_CONSOLE_DEFAULT 0 +#define SERIAL_CONSOLE_DEFAULT 1 /* SERIAL_BAUD_RATE - Baud rate for the serial console */ #define SERIAL_BAUD_RATE 9600 diff -ur memtest86+-1.70.orig/init.c memtest86+-1.70/init.c --- memtest86+-1.70.orig/init.c 2007-01-04 08:19:43.000000000 +0100 +++ memtest86+-1.70/init.c 2007-01-25 16:34:31.000000000 +0100 @@ -29,6 +29,7 @@ static void cpu_type(void); static void cacheable(void); static int cpuspeed(void); +extern short serial_cons; static void display_init(void) { @@ -65,6 +66,9 @@ } serial_echo_print("\x1B[0m"); + + if (!serial_cons && SERIAL_CONSOLE_DEFAULT) + cprint (23, 0, "Timout on serial console: disabled"); } /* diff -ur memtest86+-1.70.orig/serial.h memtest86+-1.70/serial.h --- memtest86+-1.70.orig/serial.h 2006-12-27 02:33:06.000000000 +0100 +++ memtest86+-1.70/serial.h 2007-01-25 16:34:31.000000000 +0100 @@ -140,10 +140,12 @@ #define serial_echo_inb(a) inb((a)+0x3f8) #define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) /* Wait for transmitter & holding register to empty */ -#define WAIT_FOR_XMITR \ - do { \ - lsr = serial_echo_inb(UART_LSR); \ - } while ((lsr & BOTH_EMPTY) != BOTH_EMPTY) +#define WAIT_FOR_XMITR \ + int _i = 1<<15; \ + do { \ + lsr = serial_echo_inb(UART_LSR); \ + } while ((lsr & BOTH_EMPTY) != BOTH_EMPTY && --_i); \ + if (!_i) serial_cons = 0 #if 0 static inline void serial_echo(int ch)