bug-grub
[Top][All Lists]
Advanced

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

Default serial console


From: Christoph Plattner
Subject: Default serial console
Date: Sat, 11 Nov 2000 18:29:14 +0100

Hi Mr. OKUJI !

For first step using of new or prototyp embedded hardware I
need the GRUB to be able to run the serial console as default
(also as fault back), if no menu.lst file is used (or if it
is not find). 

For this I made this patch for a default serial console with
following restrictions:
        Only ttyS0 (COM1, unit 0) can be used
        Only standard setup of 8 data bits, 1 stop bit, no parity.
        Only VT100 standard
But in the embedded "world" this is default, anyway.

This restriction is only for the default. The user can select
any other configuration by the commands `serial' and `terminal',
as before. But if there is no config, then this default serial
console is used. The user can go to monitor and keyboard by 
config file with

        terminal console 

of course.

For this patch only for files were touched:

        configure.in   (added --enable-default-serial=xxxx, default 9600)

        Makefile.am    (added SERIAL_EXTRAFLAGS)

        common.c       (calls serial_init for default console)

        builtins.c     (set default terminal to TERMINAL_SERIAL)

(More detail, see ChangeLog).


Points to be improved:
        * When using serial default console the `--timeout' default
          value should be '0' when calling `terminal serial' to
          switch back from PC console (of somebody wishs to do so)

        * configure does not check if serial support is active, when
          processing `--enable-default-serial=xxx'

I really would like, if you do my patch into the main stream, as I
often need this feature for lab experiments with different ehternet
boards or different embedded machines without video (VGA) connection
and keyboard.

The cvs-diff log also includes the "result of changes" in the
Makefile.in and configure files. Should I clear them out from
the diff log in the future ?

With friendly regards

        Christoph Plattner

        
        


-------------------------------------------------------------------------
private:        address@hidden
company:        address@hidden
Index: grub/ChangeLog
===================================================================
RCS file: /cvs/grub/ChangeLog,v
retrieving revision 1.365
diff -u -r1.365 ChangeLog
--- grub/ChangeLog      2000/11/10 16:24:18     1.365
+++ grub/ChangeLog      2000/11/11 17:07:34
@@ -1,3 +1,19 @@
+2000-11-11    <address@hidden>
+
+       * stage2/builtins.c: set (int) terminal to TERMINAL_SERIAL, if
+       DEFAULT_SERIAL is defined (section of initialization with defaults)
+
+       * stage2/Makefile.am (SERIAL_FLAGS): added `$(SERIAL_EXTRAFLAGS)'
+
+       * configure.in: added `--enable-default-serial=SPEED' to
+       enable default (fallback) serial console
+       added `SERIAL_EXTRAFLAGS' (AC_SUBST).
+
+       * stage2/common.c include `serial.h' if DEFAULT_SERIAL is set.
+       (init_bios_info): added initcode for serial line
+       if DEFAULT_SERIAL is set
+       
+
 2000-11-11  OKUJI Yoshinori  <address@hidden>
 
        From Jan Fricke <address@hidden>:
Index: grub/Makefile.in
===================================================================
RCS file: /cvs/grub/Makefile.in,v
retrieving revision 1.31
diff -u -r1.31 Makefile.in
--- grub/Makefile.in    2000/06/19 11:46:27     1.31
+++ grub/Makefile.in    2000/11/11 17:07:36
@@ -79,6 +79,7 @@
 PACKAGE = @PACKAGE@
 PERL = @PERL@
 RANLIB = @RANLIB@
+SERIAL_EXTRAFLAGS = @SERIAL_EXTRAFLAGS@
 STAGE1_CFLAGS = @STAGE1_CFLAGS@
 STAGE2_CFLAGS = @STAGE2_CFLAGS@
 VERSION = @VERSION@
Index: grub/configure
===================================================================
RCS file: /cvs/grub/configure,v
retrieving revision 1.83
diff -u -r1.83 configure
--- grub/configure      2000/10/21 21:58:45     1.83
+++ grub/configure      2000/11/11 17:07:52
@@ -121,6 +121,9 @@
 ac_help="$ac_help
   --enable-serial-speed-simulation
                           simulate the slowness of a serial device"
+ac_help="$ac_help
+  --enable-default-serial=SPEED   
+                         serial 0 is default console with SPEED baud"
 
 # Initialize some variables set by options.
 # The variables have the same names as the options, with
@@ -662,7 +665,7 @@
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:666: checking for a BSD compatible install" >&5
+echo "configure:669: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -715,7 +718,7 @@
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:719: checking whether build environment is sane" >&5
+echo "configure:722: checking whether build environment is sane" >&5
 # Just in case
 sleep 1
 echo timestamp > conftestfile
@@ -787,7 +790,7 @@
 # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:791: checking for $ac_word" >&5
+echo "configure:794: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -817,7 +820,7 @@
 done
 
 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:821: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:824: checking whether ${MAKE-make} sets \${MAKE}" >&5
 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; 
then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -943,7 +946,7 @@
 fi
 
 echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:947: checking host system type" >&5
+echo "configure:950: checking host system type" >&5
 
 host_alias=$host
 case "$host_alias" in
@@ -977,7 +980,7 @@
 #
 
 echo $ac_n "checking whether to enable maintainer-specific portions of 
Makefiles""... $ac_c" 1>&6
-echo "configure:981: checking whether to enable maintainer-specific portions 
of Makefiles" >&5
+echo "configure:984: checking whether to enable maintainer-specific portions 
of Makefiles" >&5
     # Check whether --enable-maintainer-mode or --disable-maintainer-mode was 
given.
 if test "${enable_maintainer_mode+set}" = set; then
   enableval="$enable_maintainer_mode"
@@ -1003,7 +1006,7 @@
   # Extract the first word of "perl", so it can be a program name with args.
 set dummy perl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1007: checking for $ac_word" >&5
+echo "configure:1010: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1050,7 +1053,7 @@
 #
 
 echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:1054: checking build system type" >&5
+echo "configure:1057: checking build system type" >&5
 
 build_alias=$build
 case "$build_alias" in
@@ -1076,7 +1079,7 @@
 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program 
name with args.
 set dummy ${ac_tool_prefix}gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1080: checking for $ac_word" >&5
+echo "configure:1083: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1108,7 +1111,7 @@
 # Extract the first word of "gcc", so it can be a program name with args.
 set dummy gcc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1112: checking for $ac_word" >&5
+echo "configure:1115: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1138,7 +1141,7 @@
   # Extract the first word of "cc", so it can be a program name with args.
 set dummy cc; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1142: checking for $ac_word" >&5
+echo "configure:1145: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1189,7 +1192,7 @@
       # Extract the first word of "cl", so it can be a program name with args.
 set dummy cl; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1193: checking for $ac_word" >&5
+echo "configure:1196: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1221,7 +1224,7 @@
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... 
$ac_c" 1>&6
-echo "configure:1225: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) 
works" >&5
+echo "configure:1228: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) 
works" >&5
 
 ac_ext=c
 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1232,12 +1235,12 @@
 
 cat > conftest.$ac_ext << EOF
 
-#line 1236 "configure"
+#line 1239 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
+if { (eval echo configure:1244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
   ac_cv_prog_cc_works=yes
   # If we can't run a trivial program, we are probably using a cross compiler.
   if (./conftest; exit) 2>/dev/null; then
@@ -1263,12 +1266,12 @@
   { echo "configure: error: installation or configuration problem: C compiler 
cannot create executables." 1>&2; exit 1; }
 fi
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a 
cross-compiler""... $ac_c" 1>&6
-echo "configure:1267: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) 
is a cross-compiler" >&5
+echo "configure:1270: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) 
is a cross-compiler" >&5
 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1272: checking whether we are using GNU C" >&5
+echo "configure:1275: checking whether we are using GNU C" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1277,7 +1280,7 @@
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1281: 
\"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1284: 
\"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
   ac_cv_prog_gcc=yes
 else
   ac_cv_prog_gcc=no
@@ -1296,7 +1299,7 @@
 ac_save_CFLAGS="$CFLAGS"
 CFLAGS=
 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1300: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1303: checking whether ${CC-cc} accepts -g" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1329,7 +1332,7 @@
 
 
 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1333: checking how to run the C preprocessor" >&5
+echo "configure:1336: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
@@ -1344,13 +1347,13 @@
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 1348 "configure"
+#line 1351 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1357: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1361,13 +1364,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 1365 "configure"
+#line 1368 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1371: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1374: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1378,13 +1381,13 @@
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 1382 "configure"
+#line 1385 "configure"
 #include "confdefs.h"
 #include <assert.h>
 Syntax Error
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1388: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   :
@@ -1417,7 +1420,7 @@
 depcc="$CC"
 depcpp="$CPP"
 echo $ac_n "checking dependency style of $depcc""... $ac_c" 1>&6
-echo "configure:1421: checking dependency style of $depcc" >&5
+echo "configure:1424: checking dependency style of $depcc" >&5
 if eval "test \"`echo '$''{'am_cv_CC_dependencies_compiler_type'+set}'`\" = 
set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1473,7 +1476,7 @@
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1477: checking for $ac_word" >&5
+echo "configure:1480: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1510,7 +1513,7 @@
   # Extract the first word of "ranlib", so it can be a program name with args.
 set dummy ranlib; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1514: checking for $ac_word" >&5
+echo "configure:1517: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1550,7 +1553,7 @@
     STAGE1_CFLAGS="-O2"
     GRUB_CFLAGS="-O2"
     echo $ac_n "checking whether optimization for size works""... $ac_c" 1>&6
-echo "configure:1554: checking whether optimization for size works" >&5
+echo "configure:1557: checking whether optimization for size works" >&5
 if eval "test \"`echo '$''{'size_flag'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1558,14 +1561,14 @@
       saved_CFLAGS=$CFLAGS
       CFLAGS="-Os -g"
       cat > conftest.$ac_ext <<EOF
-#line 1562 "configure"
+#line 1565 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1569: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>&5; }; then
+if { (eval echo configure:1572: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>&5; }; then
   rm -rf conftest*
   size_flag=yes
 else
@@ -1597,7 +1600,7 @@
 CPPFLAGS="$CPPFLAGS -Wpointer-arith"
 
 echo $ac_n "checking whether -Wundef works""... $ac_c" 1>&6
-echo "configure:1601: checking whether -Wundef works" >&5
+echo "configure:1604: checking whether -Wundef works" >&5
 if eval "test \"`echo '$''{'undef_flag'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1605,14 +1608,14 @@
   saved_CPPFLAGS=$CPPFLAGS
   CPPFLAGS="-Wundef"
   cat > conftest.$ac_ext <<EOF
-#line 1609 "configure"
+#line 1612 "configure"
 #include "confdefs.h"
 
 int main() {
 
 ; return 0; }
 EOF
-if { (eval echo configure:1616: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>&5; }; then
+if { (eval echo configure:1619: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>&5; }; then
   rm -rf conftest*
   undef_flag=yes
 else
@@ -1639,7 +1642,7 @@
   # Extract the first word of "objcopy", so it can be a program name with args.
 set dummy objcopy; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1643: checking for $ac_word" >&5
+echo "configure:1646: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1675,7 +1678,7 @@
   # Extract the first word of "${ac_tool_prefix}objcopy", so it can be a 
program name with args.
 set dummy ${ac_tool_prefix}objcopy; ac_word=$2
 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1679: checking for $ac_word" >&5
+echo "configure:1682: checking for $ac_word" >&5
 if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1709,7 +1712,7 @@
 # Defined in acinclude.m4.
 
 echo $ac_n "checking if C symbols get an underscore after compilation""... 
$ac_c" 1>&6
-echo "configure:1713: checking if C symbols get an underscore after 
compilation" >&5
+echo "configure:1716: checking if C symbols get an underscore after 
compilation" >&5
 if eval "test \"`echo '$''{'grub_cv_asm_uscore'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1722,7 +1725,7 @@
 }
 EOF
 
-if { ac_try='${CC-cc} ${CFLAGS} -S conftest.c'; { (eval echo configure:1726: 
\"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then
+if { ac_try='${CC-cc} ${CFLAGS} -S conftest.c'; { (eval echo configure:1729: 
\"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then
   true
 else
   { echo "configure: error: ${CC-cc} failed to produce assembly code" 1>&2; 
exit 1; }
@@ -1748,7 +1751,7 @@
 echo "$ac_t""$grub_cv_asm_uscore" 1>&6
 
 echo $ac_n "checking whether ${OBJCOPY} works for absolute addresses""... 
$ac_c" 1>&6
-echo "configure:1752: checking whether ${OBJCOPY} works for absolute 
addresses" >&5
+echo "configure:1755: checking whether ${OBJCOPY} works for absolute 
addresses" >&5
 if eval "test \"`echo '$''{'grub_cv_prog_objcopy_absolute'+set}'`\" = set"; 
then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1760,21 +1763,21 @@
 }
 EOF
 
-if { (eval echo configure:1764: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>&5; } && test -s conftest.o; then :
+if { (eval echo configure:1767: \"$ac_compile\") 1>&5; (eval $ac_compile) 
2>&5; } && test -s conftest.o; then :
 else
   { echo "configure: error: ${CC-cc} cannot compile C source code" 1>&2; exit 
1; }
 fi
 grub_cv_prog_objcopy_absolute=yes
 for link_addr in 2000 8000 7C00; do
-  if { ac_try='${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr 
conftest.o -o conftest.exec'; { (eval echo configure:1770: \"$ac_try\") 1>&5; 
(eval $ac_try) 2>&5; }; }; then :
+  if { ac_try='${CC-cc} ${CFLAGS} -nostdlib -Wl,-N -Wl,-Ttext -Wl,$link_addr 
conftest.o -o conftest.exec'; { (eval echo configure:1773: \"$ac_try\") 1>&5; 
(eval $ac_try) 2>&5; }; }; then :
   else
     { echo "configure: error: ${CC-cc} cannot link at address $link_addr" 
1>&2; exit 1; }
   fi
-  if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval 
echo configure:1774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
+  if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval 
echo configure:1777: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
   else
     { echo "configure: error: ${OBJCOPY-objcopy} cannot create binary files" 
1>&2; exit 1; }
   fi
-  if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { 
(eval echo configure:1778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
+  if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { 
(eval echo configure:1781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
     mv -f conftest conftest.old
   else
     grub_cv_prog_objcopy_absolute=no
@@ -1791,7 +1794,7 @@
 
 
 echo $ac_n "checking whether addr32 must be in the same line as the 
instruction""... $ac_c" 1>&6
-echo "configure:1795: checking whether addr32 must be in the same line as the 
instruction" >&5
+echo "configure:1798: checking whether addr32 must be in the same line as the 
instruction" >&5
 if eval "test \"`echo '$''{'grub_cv_asm_prefix_requirement'+set}'`\" = set"; 
then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1800,7 +1803,7 @@
 l1:    addr32  movb    %al, l1
 EOF
 
-if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1804: 
\"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
+if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1807: 
\"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
   grub_cv_asm_prefix_requirement=yes
 else
   grub_cv_asm_prefix_requirement=no
@@ -1832,7 +1835,7 @@
 
 
 echo $ac_n "checking for .code16 addr32 assembler support""... $ac_c" 1>&6
-echo "configure:1836: checking for .code16 addr32 assembler support" >&5
+echo "configure:1839: checking for .code16 addr32 assembler support" >&5
 if eval "test \"`echo '$''{'grub_cv_asm_addr32'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1847,7 +1850,7 @@
   sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
 fi
 
-if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1851: 
\"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
+if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1854: 
\"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
   grub_cv_asm_addr32=yes
 else
   grub_cv_asm_addr32=no
@@ -1864,7 +1867,7 @@
 
 
 echo $ac_n "checking whether an absolute indirect call/jump must not be 
prefixed with an asterisk""... $ac_c" 1>&6
-echo "configure:1868: checking whether an absolute indirect call/jump must not 
be prefixed with an asterisk" >&5
+echo "configure:1871: checking whether an absolute indirect call/jump must not 
be prefixed with an asterisk" >&5
 if eval "test \"`echo '$''{'grub_cv_asm_absolute_without_asterisk'+set}'`\" = 
set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
@@ -1875,7 +1878,7 @@
        .word   0
 EOF
 
-if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1879: 
\"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
+if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1882: 
\"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
   grub_cv_asm_absolute_without_asterisk=no
 else
   grub_cv_asm_absolute_without_asterisk=yes
@@ -1896,19 +1899,19 @@
 
 
 echo $ac_n "checking if start is defined by the compiler""... $ac_c" 1>&6
-echo "configure:1900: checking if start is defined by the compiler" >&5
+echo "configure:1903: checking if start is defined by the compiler" >&5
 if eval "test \"`echo '$''{'grub_cv_check_start_symbol'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1905 "configure"
+#line 1908 "configure"
 #include "confdefs.h"
 
 int main() {
 asm ("incl start")
 ; return 0; }
 EOF
-if { (eval echo configure:1912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
+if { (eval echo configure:1915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
   rm -rf conftest*
   grub_cv_check_start_symbol=yes
 else
@@ -1932,19 +1935,19 @@
 
 
 echo $ac_n "checking if _start is defined by the compiler""... $ac_c" 1>&6
-echo "configure:1936: checking if _start is defined by the compiler" >&5
+echo "configure:1939: checking if _start is defined by the compiler" >&5
 if eval "test \"`echo '$''{'grub_cv_check_uscore_start_symbol'+set}'`\" = 
set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1941 "configure"
+#line 1944 "configure"
 #include "confdefs.h"
 
 int main() {
 asm ("incl _start")
 ; return 0; }
 EOF
-if { (eval echo configure:1948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
+if { (eval echo configure:1951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
   rm -rf conftest*
   grub_cv_check_uscore_start_symbol=yes
 else
@@ -1973,19 +1976,19 @@
 
 
 echo $ac_n "checking if __bss_start is defined by the compiler""... $ac_c" 1>&6
-echo "configure:1977: checking if __bss_start is defined by the compiler" >&5
+echo "configure:1980: checking if __bss_start is defined by the compiler" >&5
 if eval "test \"`echo 
'$''{'grub_cv_check_uscore_uscore_bss_start_symbol'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 1982 "configure"
+#line 1985 "configure"
 #include "confdefs.h"
 
 int main() {
 asm ("incl __bss_start")
 ; return 0; }
 EOF
-if { (eval echo configure:1989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
+if { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
   rm -rf conftest*
   grub_cv_check_uscore_uscore_bss_start_symbol=yes
 else
@@ -2009,19 +2012,19 @@
 
 
 echo $ac_n "checking if _edata is defined by the compiler""... $ac_c" 1>&6
-echo "configure:2013: checking if _edata is defined by the compiler" >&5
+echo "configure:2016: checking if _edata is defined by the compiler" >&5
 if eval "test \"`echo '$''{'grub_cv_check_uscore_edata_symbol'+set}'`\" = 
set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2018 "configure"
+#line 2021 "configure"
 #include "confdefs.h"
 
 int main() {
 asm ("incl _edata")
 ; return 0; }
 EOF
-if { (eval echo configure:2025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
+if { (eval echo configure:2028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
   rm -rf conftest*
   grub_cv_check_uscore_edata_symbol=yes
 else
@@ -2045,19 +2048,19 @@
 
 
 echo $ac_n "checking if edata is defined by the compiler""... $ac_c" 1>&6
-echo "configure:2049: checking if edata is defined by the compiler" >&5
+echo "configure:2052: checking if edata is defined by the compiler" >&5
 if eval "test \"`echo '$''{'grub_cv_check_edata_symbol'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2054 "configure"
+#line 2057 "configure"
 #include "confdefs.h"
 
 int main() {
 asm ("incl edata")
 ; return 0; }
 EOF
-if { (eval echo configure:2061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
+if { (eval echo configure:2064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
   rm -rf conftest*
   grub_cv_check_edata_symbol=yes
 else
@@ -2087,19 +2090,19 @@
 
 
 echo $ac_n "checking if end is defined by the compiler""... $ac_c" 1>&6
-echo "configure:2091: checking if end is defined by the compiler" >&5
+echo "configure:2094: checking if end is defined by the compiler" >&5
 if eval "test \"`echo '$''{'grub_cv_check_end_symbol'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2096 "configure"
+#line 2099 "configure"
 #include "confdefs.h"
 
 int main() {
 asm ("incl end")
 ; return 0; }
 EOF
-if { (eval echo configure:2103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
+if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
   rm -rf conftest*
   grub_cv_check_end_symbol=yes
 else
@@ -2123,19 +2126,19 @@
 
 
 echo $ac_n "checking if _end is defined by the compiler""... $ac_c" 1>&6
-echo "configure:2127: checking if _end is defined by the compiler" >&5
+echo "configure:2130: checking if _end is defined by the compiler" >&5
 if eval "test \"`echo '$''{'grub_cv_check_uscore_end_symbol'+set}'`\" = set"; 
then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2132 "configure"
+#line 2135 "configure"
 #include "confdefs.h"
 
 int main() {
 asm ("incl _end")
 ; return 0; }
 EOF
-if { (eval echo configure:2139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
+if { (eval echo configure:2142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
   rm -rf conftest*
   grub_cv_check_uscore_end_symbol=yes
 else
@@ -2173,7 +2176,7 @@
 # Get the filename or the whole disk and open it.
 # Known to work on NetBSD.
 echo $ac_n "checking for opendisk in -lutil""... $ac_c" 1>&6
-echo "configure:2177: checking for opendisk in -lutil" >&5
+echo "configure:2180: checking for opendisk in -lutil" >&5
 ac_lib_var=`echo util'_'opendisk | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2181,7 +2184,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lutil  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2185 "configure"
+#line 2188 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2192,7 +2195,7 @@
 opendisk()
 ; return 0; }
 EOF
-if { (eval echo configure:2196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
+if { (eval echo configure:2199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2220,7 +2223,7 @@
 # Unless the user specify --without-curses, check for curses.
 if test "x$with_curses" != "xno"; then
   echo $ac_n "checking for wgetch in -lncurses""... $ac_c" 1>&6
-echo "configure:2224: checking for wgetch in -lncurses" >&5
+echo "configure:2227: checking for wgetch in -lncurses" >&5
 ac_lib_var=`echo ncurses'_'wgetch | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2228,7 +2231,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lncurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2232 "configure"
+#line 2235 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2239,7 +2242,7 @@
 wgetch()
 ; return 0; }
 EOF
-if { (eval echo configure:2243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
+if { (eval echo configure:2246: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2262,7 +2265,7 @@
 else
   echo "$ac_t""no" 1>&6
 echo $ac_n "checking for wgetch in -lcurses""... $ac_c" 1>&6
-echo "configure:2266: checking for wgetch in -lcurses" >&5
+echo "configure:2269: checking for wgetch in -lcurses" >&5
 ac_lib_var=`echo curses'_'wgetch | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -2270,7 +2273,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lcurses  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 2274 "configure"
+#line 2277 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -2281,7 +2284,7 @@
 wgetch()
 ; return 0; }
 EOF
-if { (eval echo configure:2285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
+if { (eval echo configure:2288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && 
test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
@@ -2316,17 +2319,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2320: checking for $ac_hdr" >&5
+echo "configure:2323: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 2325 "configure"
+#line 2328 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2330: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2333: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -2882,6 +2885,15 @@
   SERIAL_SPEED_SIMULATION_FALSE=
 fi
 
+# Check whether --enable-default-serial or --disable-default-serial was given.
+if test "${enable_default_serial+set}" = set; then
+  enableval="$enable_default_serial"
+  SERIAL_EXTRAFLAGS="$SERIAL_EXTRAFLAGS 
-DDEFAULT_SERIAL=$enable_default_serial"
+else
+  SERIAL_EXTRAFLAGS="$SERIAL_EXTRAFLAGS -DDEFAULT_SERIAL=9600"
+fi
+
+
 # Sanity check.
 if test "x$enable_diskless" = xyes; then
   if test "x$NET_CFLAGS" = x; then
@@ -3083,6 +3095,7 @@
 address@hidden@%$NET_CFLAGS%g
 address@hidden@%$NET_EXTRAFLAGS%g
 address@hidden@%$NETBOOT_DRIVERS%g
address@hidden@%$SERIAL_EXTRAFLAGS%g
 
 CEOF
 EOF
Index: grub/configure.in
===================================================================
RCS file: /cvs/grub/configure.in,v
retrieving revision 1.56
diff -u -r1.56 configure.in
--- grub/configure.in   2000/10/21 21:58:45     1.56
+++ grub/configure.in   2000/11/11 17:07:55
@@ -510,6 +510,13 @@
 AM_CONDITIONAL(SERIAL_SPEED_SIMULATION,
   test "x$enable_serial_speed_simulation" = xyes)
 
+dnl Serial console as default interface with restrictions
+AC_ARG_ENABLE(default-serial,
+  [  --enable-default-serial=SPEED   
+                         serial 0 is default console with SPEED baud],
+  [SERIAL_EXTRAFLAGS="$SERIAL_EXTRAFLAGS 
-DDEFAULT_SERIAL=$enable_default_serial"],
+  [SERIAL_EXTRAFLAGS="$SERIAL_EXTRAFLAGS -DDEFAULT_SERIAL=9600"])
+
 # Sanity check.
 if test "x$enable_diskless" = xyes; then
   if test "x$NET_CFLAGS" = x; then
@@ -522,7 +529,7 @@
 AC_SUBST(NET_CFLAGS)
 AC_SUBST(NET_EXTRAFLAGS)
 AC_SUBST(NETBOOT_DRIVERS)
-
+AC_SUBST(SERIAL_EXTRAFLAGS)
 
 dnl Output.
 AC_OUTPUT([Makefile stage1/Makefile stage2/Makefile docs/Makefile \
Index: grub/debian/Makefile.in
===================================================================
RCS file: /cvs/grub/debian/Makefile.in,v
retrieving revision 1.23
diff -u -r1.23 Makefile.in
--- grub/debian/Makefile.in     2000/04/15 13:39:37     1.23
+++ grub/debian/Makefile.in     2000/11/11 17:08:00
@@ -79,6 +79,7 @@
 PACKAGE = @PACKAGE@
 PERL = @PERL@
 RANLIB = @RANLIB@
+SERIAL_EXTRAFLAGS = @SERIAL_EXTRAFLAGS@
 STAGE1_CFLAGS = @STAGE1_CFLAGS@
 STAGE2_CFLAGS = @STAGE2_CFLAGS@
 VERSION = @VERSION@
Index: grub/docs/Makefile.in
===================================================================
RCS file: /cvs/grub/docs/Makefile.in,v
retrieving revision 1.36
diff -u -r1.36 Makefile.in
--- grub/docs/Makefile.in       2000/10/21 21:58:45     1.36
+++ grub/docs/Makefile.in       2000/11/11 17:08:00
@@ -79,6 +79,7 @@
 PACKAGE = @PACKAGE@
 PERL = @PERL@
 RANLIB = @RANLIB@
+SERIAL_EXTRAFLAGS = @SERIAL_EXTRAFLAGS@
 STAGE1_CFLAGS = @STAGE1_CFLAGS@
 STAGE2_CFLAGS = @STAGE2_CFLAGS@
 VERSION = @VERSION@
@@ -139,7 +140,7 @@
        @:
 
 $(srcdir)/stamp-vti: grub.texi $(top_srcdir)/configure.in
-       @echo "@set UPDATED `$(SHELL) $(top_srcdir)/mdate-sh 
$(srcdir)/grub.texi`" > vti.tmp
+       @echo "@set UPDATED `$(SHELL) $(srcdir)/mdate-sh $(srcdir)/grub.texi`" 
> vti.tmp
        @echo "@set EDITION $(VERSION)" >> vti.tmp
        @echo "@set VERSION $(VERSION)" >> vti.tmp
        @cmp -s vti.tmp $(srcdir)/version.texi \
@@ -174,7 +175,7 @@
          && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
 
 .texi.dvi:
-       TEXINPUTS=$(top_srcdir):$$TEXINPUTS \
+       TEXINPUTS=$(srcdir):$$TEXINPUTS \
          MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
 
 .texinfo.info:
@@ -188,7 +189,7 @@
          && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
 
 .texinfo.dvi:
-       TEXINPUTS=$(top_srcdir):$$TEXINPUTS \
+       TEXINPUTS=$(srcdir):$$TEXINPUTS \
          MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
 
 .txi.info:
@@ -197,7 +198,7 @@
          && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
 
 .txi.dvi:
-       TEXINPUTS=$(top_srcdir):$$TEXINPUTS \
+       TEXINPUTS=$(srcdir):$$TEXINPUTS \
          MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
 
 .txi:
Index: grub/grub/Makefile.in
===================================================================
RCS file: /cvs/grub/grub/Makefile.in,v
retrieving revision 1.30
diff -u -r1.30 Makefile.in
--- grub/grub/Makefile.in       2000/08/21 06:30:14     1.30
+++ grub/grub/Makefile.in       2000/11/11 17:08:02
@@ -79,6 +79,7 @@
 PACKAGE = @PACKAGE@
 PERL = @PERL@
 RANLIB = @RANLIB@
+SERIAL_EXTRAFLAGS = @SERIAL_EXTRAFLAGS@
 STAGE1_CFLAGS = @STAGE1_CFLAGS@
 STAGE2_CFLAGS = @STAGE2_CFLAGS@
 VERSION = @VERSION@
Index: grub/lib/Makefile.in
===================================================================
RCS file: /cvs/grub/lib/Makefile.in,v
retrieving revision 1.9
diff -u -r1.9 Makefile.in
--- grub/lib/Makefile.in        2000/07/11 16:13:46     1.9
+++ grub/lib/Makefile.in        2000/11/11 17:08:03
@@ -79,6 +79,7 @@
 PACKAGE = @PACKAGE@
 PERL = @PERL@
 RANLIB = @RANLIB@
+SERIAL_EXTRAFLAGS = @SERIAL_EXTRAFLAGS@
 STAGE1_CFLAGS = @STAGE1_CFLAGS@
 STAGE2_CFLAGS = @STAGE2_CFLAGS@
 VERSION = @VERSION@
Index: grub/netboot/Makefile.in
===================================================================
RCS file: /cvs/grub/netboot/Makefile.in,v
retrieving revision 1.14
diff -u -r1.14 Makefile.in
--- grub/netboot/Makefile.in    2000/06/17 03:44:43     1.14
+++ grub/netboot/Makefile.in    2000/11/11 17:08:06
@@ -79,6 +79,7 @@
 PACKAGE = @PACKAGE@
 PERL = @PERL@
 RANLIB = @RANLIB@
+SERIAL_EXTRAFLAGS = @SERIAL_EXTRAFLAGS@
 STAGE1_CFLAGS = @STAGE1_CFLAGS@
 STAGE2_CFLAGS = @STAGE2_CFLAGS@
 VERSION = @VERSION@
Index: grub/stage1/Makefile.in
===================================================================
RCS file: /cvs/grub/stage1/Makefile.in,v
retrieving revision 1.31
diff -u -r1.31 Makefile.in
--- grub/stage1/Makefile.in     2000/04/15 13:39:38     1.31
+++ grub/stage1/Makefile.in     2000/11/11 17:08:08
@@ -77,6 +77,7 @@
 PACKAGE = @PACKAGE@
 PERL = @PERL@
 RANLIB = @RANLIB@
+SERIAL_EXTRAFLAGS = @SERIAL_EXTRAFLAGS@
 STAGE1_CFLAGS = @STAGE1_CFLAGS@
 STAGE2_CFLAGS = @STAGE2_CFLAGS@
 VERSION = @VERSION@
Index: grub/stage2/Makefile.am
===================================================================
RCS file: /cvs/grub/stage2/Makefile.am,v
retrieving revision 1.32
diff -u -r1.32 Makefile.am
--- grub/stage2/Makefile.am     2000/10/19 21:10:42     1.32
+++ grub/stage2/Makefile.am     2000/11/11 17:08:09
@@ -57,7 +57,7 @@
 endif
 
 if SERIAL_SUPPORT
-SERIAL_FLAGS = -DSUPPORT_SERIAL=1
+SERIAL_FLAGS = -DSUPPORT_SERIAL=1 $(SERIAL_EXTRAFLAGS)
 else
 SERIAL_FLAGS =
 endif
Index: grub/stage2/Makefile.in
===================================================================
RCS file: /cvs/grub/stage2/Makefile.in,v
retrieving revision 1.48
diff -u -r1.48 Makefile.in
--- grub/stage2/Makefile.in     2000/10/19 21:10:42     1.48
+++ grub/stage2/Makefile.in     2000/11/11 17:08:17
@@ -77,6 +77,7 @@
 PACKAGE = @PACKAGE@
 PERL = @PERL@
 RANLIB = @RANLIB@
+SERIAL_EXTRAFLAGS = @SERIAL_EXTRAFLAGS@
 STAGE1_CFLAGS = @STAGE1_CFLAGS@
 STAGE2_CFLAGS = @STAGE2_CFLAGS@
 VERSION = @VERSION@
@@ -138,7 +139,7 @@
 PXELOADER_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00
 @address@hidden = @address@hidden(top_srcdir)/netboot -DSUPPORT_NETBOOT=1
 @address@hidden = 
address@hidden@SERIAL_FLAGS = @address@hidden
address@hidden@SERIAL_FLAGS = @address@hidden $(SERIAL_EXTRAFLAGS)
 @address@hidden = 
 
 STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
@@ -1408,57 +1409,54 @@
 check-TESTS: $(TESTS)
        @failed=0; all=0; xfail=0; xpass=0; \
        srcdir=$(srcdir); export srcdir; \
-       list='$(TESTS)'; \
-       if test -n "$$list"; then \
-         for tst in $$list; do \
-           if test -f ./$$tst; then dir=./; \
-           elif test -f $$tst; then dir=; \
-           else dir="$(srcdir)/"; fi; \
-           if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
-             all=`expr $$all + 1`; \
-             case " $(XFAIL_TESTS) " in \
-             *" $$tst "*) \
-               xpass=`expr $$xpass + 1`; \
-               failed=`expr $$failed + 1`; \
-               echo "XPASS: $$tst"; \
-             ;; \
-             *) \
-               echo "PASS: $$tst"; \
-             ;; \
-             esac; \
-           elif test $$? -ne 77; then \
-             all=`expr $$all + 1`; \
-             case " $(XFAIL_TESTS) " in \
-             *" $$tst "*) \
-               xfail=`expr $$xfail + 1`; \
-               echo "XFAIL: $$tst"; \
-             ;; \
-             *) \
-               failed=`expr $$failed + 1`; \
-               echo "FAIL: $$tst"; \
-             ;; \
-             esac; \
-           fi; \
-         done; \
-         if test "$$failed" -eq 0; then \
-           if test "$$xfail" -eq 0; then \
-             banner="All $$all tests passed"; \
-           else \
-             banner="All $$all tests behaved as expected ($$xfail expected 
failures)"; \
-           fi; \
+       for tst in $(TESTS); do \
+         if test -f ./$$tst; then dir=./; \
+         elif test -f $$tst; then dir=; \
+         else dir="$(srcdir)/"; fi; \
+         if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+           all=`expr $$all + 1`; \
+           case " $(XFAIL_TESTS) " in \
+           *" $$tst "*) \
+             xpass=`expr $$xpass + 1`; \
+             failed=`expr $$failed + 1`; \
+             echo "XPASS: $$tst"; \
+           ;; \
+           *) \
+             echo "PASS: $$tst"; \
+           ;; \
+           esac; \
+         elif test $$? -ne 77; then \
+           all=`expr $$all + 1`; \
+           case " $(XFAIL_TESTS) " in \
+           *" $$tst "*) \
+             xfail=`expr $$xfail + 1`; \
+             echo "XFAIL: $$tst"; \
+           ;; \
+           *) \
+             failed=`expr $$failed + 1`; \
+             echo "FAIL: $$tst"; \
+           ;; \
+           esac; \
+         fi; \
+       done; \
+       if test "$$failed" -eq 0; then \
+         if test "$$xfail" -eq 0; then \
+           banner="All $$all tests passed"; \
+         else \
+           banner="All $$all tests behaved as expected ($$xfail expected 
failures)"; \
+         fi; \
+       else \
+         if test "$$xpass" -eq 0; then \
+           banner="$$failed of $$all tests failed"; \
          else \
-           if test "$$xpass" -eq 0; then \
-             banner="$$failed of $$all tests failed"; \
-           else \
-             banner="$$failed of $$all tests did not behave as expected 
($$xpass unexpected passes)"; \
-           fi; \
+           banner="$$failed of $$all tests did not behave as expected ($$xpass 
unexpected passes)"; \
          fi; \
-         dashes=`echo "$$banner" | sed s/./=/g`; \
-         echo "$$dashes"; \
-         echo "$$banner"; \
-         echo "$$dashes"; \
-         test "$$failed" -eq 0; \
-       fi
+       fi; \
+       dashes=`echo "$$banner" | sed s/./=/g`; \
+       echo "$$dashes"; \
+       echo "$$banner"; \
+       echo "$$dashes"; \
+       test "$$failed" -eq 0
 
 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
 
Index: grub/stage2/builtins.c
===================================================================
RCS file: /cvs/grub/stage2/builtins.c,v
retrieving revision 1.97
diff -u -r1.97 builtins.c
--- grub/stage2/builtins.c      2000/11/04 16:15:26     1.97
+++ grub/stage2/builtins.c      2000/11/11 17:08:33
@@ -48,7 +48,11 @@
 #endif
 
 /* Terminal types.  */
+#if defined (SUPPORT_SERIAL) && defined (DEFAULT_SERIAL)
+int terminal = TERMINAL_SERIAL;
+#else
 int terminal = TERMINAL_CONSOLE;
+#endif
 /* The type of kernel loaded.  */
 kernel_t kernel_type;
 /* The boot device.  */
Index: grub/stage2/common.c
===================================================================
RCS file: /cvs/grub/stage2/common.c,v
retrieving revision 1.15
diff -u -r1.15 common.c
--- grub/stage2/common.c        2000/10/19 21:10:42     1.15
+++ grub/stage2/common.c        2000/11/11 17:08:35
@@ -25,6 +25,10 @@
 # include <etherboot.h>
 #endif
 
+#if defined (SUPPORT_SERIAL) && defined (DEFAULT_SERIAL)
+# include <serial.h>
+#endif
+
 /*
  *  Shared BIOS/boot data.
  */
@@ -332,6 +336,16 @@
     return;
 #endif
 
+#if !defined (STAGE1_5) && defined (SUPPORT_SERIAL)
+#ifdef DEFAULT_SERIAL
+  /* If DEFAULT_SERIAL is defined, initialize the serial console here. */
+  if (! serial_init (serial_get_port (0), DEFAULT_SERIAL, UART_8BITS_WORD,
+                    UART_NO_PARITY, UART_1_STOP_BIT))
+      /* try with fix 9600 baud, and ignore if we fail here */
+      (void)serial_init (serial_get_port (0), 9600, UART_8BITS_WORD,
+                        UART_NO_PARITY, UART_1_STOP_BIT);
+#endif  
+#endif
   /* Set boot drive and partition.  */
   saved_drive = boot_drive;
   saved_partition = install_partition;
Index: grub/util/Makefile.in
===================================================================
RCS file: /cvs/grub/util/Makefile.in,v
retrieving revision 1.11
diff -u -r1.11 Makefile.in
--- grub/util/Makefile.in       2000/10/21 21:58:46     1.11
+++ grub/util/Makefile.in       2000/11/11 17:08:36
@@ -79,6 +79,7 @@
 PACKAGE = @PACKAGE@
 PERL = @PERL@
 RANLIB = @RANLIB@
+SERIAL_EXTRAFLAGS = @SERIAL_EXTRAFLAGS@
 STAGE1_CFLAGS = @STAGE1_CFLAGS@
 STAGE2_CFLAGS = @STAGE2_CFLAGS@
 VERSION = @VERSION@

reply via email to

[Prev in Thread] Current Thread [Next in Thread]