add hercules support.

This commit is contained in:
okuji 2001-02-27 12:59:00 +00:00
parent 3a598264dc
commit e85272f436
17 changed files with 530 additions and 132 deletions

View file

@ -35,3 +35,5 @@ stage2/fsys_reiserfs.c and stage2/md5.c.
Christoph Plattner added support for Net Boot Image Proposal. Christoph Plattner added support for Net Boot Image Proposal.
Stefan Ondrejicka added the commands "partnew" and "parttype". Stefan Ondrejicka added the commands "partnew" and "parttype".
Frank Mehnert added support for hercules console.

View file

@ -1,3 +1,48 @@
2001-02-27 OKUJI Yoshinori <okuji@gnu.org>
Added hercules support based on a patch by Frank Mehnert
<fm3@os.inf.tu-dresden.de>. I translated his assembly code into
C, and separated hercules from the normal console.
* configure.in (--disable-hercules): New option.
* grub/asmstub.c: Include <hercules.h>.
(set_attrib): Renamed to ...
(console_set_attrib): ... this.
(herc_cls): New function.
(herc_getxy): Likewise.
(herc_gotoxy): Likewise.
(herc_putchar): Likewise.
(herc_set_attrib): Likewise.
* stage2/Makefile.am (noinst_HEADERS): Added hercules.h.
(libgrub_a_CFLAGS): Added -DSUPPORT_HERCULES=1.
(HERCULES_FLAGS): New variable.
(STAGE2_COMPILE): Added $(HERCULES_FLAGS).
(pre_stage2_exec_SOURCES): Added hercules.c.
* stage2/asm.S [!STAGE1_5] (set_attrib) Renamed to ...
[!STAGE1_5] (console_set_attrib): ... this.
* stage2/builtins.c [SUPPORT_HERCULES] (terminal_func): Added
hercules support.
(builtin_table) [SUPPORT_HERCULES]: Added a pointer to
BUILTIN_TERMINAL.
* stage2/char_io.c [SUPPORT_HERCULES]: Include <hercules.h>.
[!STAGE1_5] (get_cmdline) [SUPPORT_HERCULES]: Added hercules
support.
[!STAGE1_5] (getkey) [SUPPORT_HERCULES]: Likewise.
[!STAGE1_5] (checkkey) [SUPPORT_HERCULES]: Likewise.
(grub_putchar) [SUPPORT_HERCULES]: Likewise.
[!STAGE1_5] (gotoxy) [SUPPORT_HERCULES]: Likewise.
[!STAGE1_5] (getxy) [SUPPORT_HERCULES]: Likewise.
[!STAGE1_5] (cls) [SUPPORT_HERCULES]: Likewise.
(set_attrib): New function.
* stage2/shared.h (console_set_attrib): Declared.
(TERMINAL_HERCULES): New macro.
* stage2/stage2.c (run_menu) [SUPPORT_HERCULES]: Added hercules
support.
* stage2/hercules.h: New file.
* stage2/hercules.c: Likewise.
2001-02-17 OKUJI Yoshinori <okuji@gnu.org> 2001-02-17 OKUJI Yoshinori <okuji@gnu.org>
From "Treutwein; Bernhard" From "Treutwein; Bernhard"

1
NEWS
View file

@ -25,6 +25,7 @@ New in 1.0 - XXXX-XX-XX:
specify the option `--enable-example-kernel' to the configure script. specify the option `--enable-example-kernel' to the configure script.
* New command, "ifconfig". * New command, "ifconfig".
* Linux software RAID support is added (only for RAID-1). * Linux software RAID support is added (only for RAID-1).
* Hercules support is added.
New in 0.5.96 - 2000-10-04: New in 0.5.96 - 2000-10-04:
* New commands, "reboot" and "halt". * New commands, "reboot" and "halt".

188
configure vendored
View file

@ -116,6 +116,8 @@ ac_help="$ac_help
--enable-cs-scan=LIST probe for CS89x0 base address using LIST" --enable-cs-scan=LIST probe for CS89x0 base address using LIST"
ac_help="$ac_help ac_help="$ac_help
--enable-diskless enable diskless support" --enable-diskless enable diskless support"
ac_help="$ac_help
--disable-hercules disable hercules terminal support"
ac_help="$ac_help ac_help="$ac_help
--disable-serial diable serial terminal support" --disable-serial diable serial terminal support"
ac_help="$ac_help ac_help="$ac_help
@ -668,7 +670,7 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh. # ./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 $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
echo "configure:672: checking for a BSD compatible install" >&5 echo "configure:674: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -721,7 +723,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
echo "configure:725: checking whether build environment is sane" >&5 echo "configure:727: checking whether build environment is sane" >&5
# Just in case # Just in case
sleep 1 sleep 1
echo timestamp > conftestfile echo timestamp > conftestfile
@ -793,7 +795,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args. # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2 set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:797: checking for $ac_word" >&5 echo "configure:799: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -823,7 +825,7 @@ test -n "$AWK" && break
done done
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
echo "configure:827: checking whether ${MAKE-make} sets \${MAKE}" >&5 echo "configure:829: checking whether ${MAKE-make} sets \${MAKE}" >&5
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` 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 if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -949,7 +951,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi fi
echo $ac_n "checking host system type""... $ac_c" 1>&6 echo $ac_n "checking host system type""... $ac_c" 1>&6
echo "configure:953: checking host system type" >&5 echo "configure:955: checking host system type" >&5
host_alias=$host host_alias=$host
case "$host_alias" in case "$host_alias" in
@ -983,7 +985,7 @@ esac
# #
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
echo "configure:987: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo "configure:989: checking whether to enable maintainer-specific portions of Makefiles" >&5
# Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
if test "${enable_maintainer_mode+set}" = set; then if test "${enable_maintainer_mode+set}" = set; then
enableval="$enable_maintainer_mode" enableval="$enable_maintainer_mode"
@ -1009,7 +1011,7 @@ if test "x$enable_maintainer_mode" = xyes; then
# Extract the first word of "perl", so it can be a program name with args. # Extract the first word of "perl", so it can be a program name with args.
set dummy perl; ac_word=$2 set dummy perl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1013: checking for $ac_word" >&5 echo "configure:1015: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1056,7 +1058,7 @@ fi
# #
echo $ac_n "checking build system type""... $ac_c" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6
echo "configure:1060: checking build system type" >&5 echo "configure:1062: checking build system type" >&5
build_alias=$build build_alias=$build
case "$build_alias" in case "$build_alias" in
@ -1082,7 +1084,7 @@ fi
# Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. # 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 set dummy ${ac_tool_prefix}gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1086: checking for $ac_word" >&5 echo "configure:1088: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1114,7 +1116,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args. # Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2 set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1118: checking for $ac_word" >&5 echo "configure:1120: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1144,7 +1146,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args. # Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2 set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1148: checking for $ac_word" >&5 echo "configure:1150: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1195,7 +1197,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args. # Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2 set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1199: checking for $ac_word" >&5 echo "configure:1201: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1227,7 +1229,7 @@ fi
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
echo "configure:1231: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 echo "configure:1233: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@ -1238,12 +1240,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF cat > conftest.$ac_ext << EOF
#line 1242 "configure" #line 1244 "configure"
#include "confdefs.h" #include "confdefs.h"
main(){return(0);} main(){return(0);}
EOF EOF
if { (eval echo configure:1247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler. # If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then if (./conftest; exit) 2>/dev/null; then
@ -1269,12 +1271,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
echo "configure:1273: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "configure:1275: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
echo "configure:1278: checking whether we are using GNU C" >&5 echo "configure:1280: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1283,7 +1285,7 @@ else
yes; yes;
#endif #endif
EOF EOF
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1287: \"$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:1289: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes ac_cv_prog_gcc=yes
else else
ac_cv_prog_gcc=no ac_cv_prog_gcc=no
@ -1302,7 +1304,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS" ac_save_CFLAGS="$CFLAGS"
CFLAGS= CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
echo "configure:1306: checking whether ${CC-cc} accepts -g" >&5 echo "configure:1308: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1335,7 +1337,7 @@ fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1339: checking how to run the C preprocessor" >&5 echo "configure:1341: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory. # On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then if test -n "$CPP" && test -d "$CPP"; then
CPP= CPP=
@ -1350,13 +1352,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser, # On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp. # not just through cpp.
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1354 "configure" #line 1356 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1360: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1362: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1367,13 +1369,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp" CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1371 "configure" #line 1373 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1384,13 +1386,13 @@ else
rm -rf conftest* rm -rf conftest*
CPP="${CC-cc} -nologo -E" CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1388 "configure" #line 1390 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <assert.h> #include <assert.h>
Syntax Error Syntax Error
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1394: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:1396: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
: :
@ -1423,7 +1425,7 @@ echo "$ac_t""$CPP" 1>&6
depcc="$CC" depcc="$CC"
depcpp="$CPP" depcpp="$CPP"
echo $ac_n "checking dependency style of $depcc""... $ac_c" 1>&6 echo $ac_n "checking dependency style of $depcc""... $ac_c" 1>&6
echo "configure:1427: checking dependency style of $depcc" >&5 echo "configure:1429: checking dependency style of $depcc" >&5
if eval "test \"`echo '$''{'am_cv_CC_dependencies_compiler_type'+set}'`\" = set"; then if eval "test \"`echo '$''{'am_cv_CC_dependencies_compiler_type'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1479,7 +1481,7 @@ if test "x$with_binutils" != x; then
# Extract the first word of "ranlib", so it can be a program name with args. # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2 set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1483: checking for $ac_word" >&5 echo "configure:1485: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_RANLIB'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1516,7 +1518,7 @@ else
# Extract the first word of "ranlib", so it can be a program name with args. # Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2 set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1520: checking for $ac_word" >&5 echo "configure:1522: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1556,7 +1558,7 @@ if test "x$ac_cv_prog_gcc" = xyes; then
STAGE1_CFLAGS="-O2" STAGE1_CFLAGS="-O2"
GRUB_CFLAGS="-O2" GRUB_CFLAGS="-O2"
echo $ac_n "checking whether optimization for size works""... $ac_c" 1>&6 echo $ac_n "checking whether optimization for size works""... $ac_c" 1>&6
echo "configure:1560: checking whether optimization for size works" >&5 echo "configure:1562: checking whether optimization for size works" >&5
if eval "test \"`echo '$''{'size_flag'+set}'`\" = set"; then if eval "test \"`echo '$''{'size_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1564,14 +1566,14 @@ else
saved_CFLAGS=$CFLAGS saved_CFLAGS=$CFLAGS
CFLAGS="-Os -g" CFLAGS="-Os -g"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1568 "configure" #line 1570 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
size_flag=yes size_flag=yes
else else
@ -1603,7 +1605,7 @@ CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused -Wshadow"
CPPFLAGS="$CPPFLAGS -Wpointer-arith" CPPFLAGS="$CPPFLAGS -Wpointer-arith"
echo $ac_n "checking whether -Wundef works""... $ac_c" 1>&6 echo $ac_n "checking whether -Wundef works""... $ac_c" 1>&6
echo "configure:1607: checking whether -Wundef works" >&5 echo "configure:1609: checking whether -Wundef works" >&5
if eval "test \"`echo '$''{'undef_flag'+set}'`\" = set"; then if eval "test \"`echo '$''{'undef_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1611,14 +1613,14 @@ else
saved_CPPFLAGS=$CPPFLAGS saved_CPPFLAGS=$CPPFLAGS
CPPFLAGS="-Wundef" CPPFLAGS="-Wundef"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1615 "configure" #line 1617 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then if { (eval echo configure:1624: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest* rm -rf conftest*
undef_flag=yes undef_flag=yes
else else
@ -1645,7 +1647,7 @@ if test "x$with_binutils" != x; then
# Extract the first word of "objcopy", so it can be a program name with args. # Extract the first word of "objcopy", so it can be a program name with args.
set dummy objcopy; ac_word=$2 set dummy objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1649: checking for $ac_word" >&5 echo "configure:1651: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_path_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1681,7 +1683,7 @@ else
# Extract the first word of "${ac_tool_prefix}objcopy", so it can be a program name with args. # 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 set dummy ${ac_tool_prefix}objcopy; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1685: checking for $ac_word" >&5 echo "configure:1687: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_prog_OBJCOPY'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1715,7 +1717,7 @@ fi
# Defined in acinclude.m4. # Defined in acinclude.m4.
echo $ac_n "checking if C symbols get an underscore after compilation""... $ac_c" 1>&6 echo $ac_n "checking if C symbols get an underscore after compilation""... $ac_c" 1>&6
echo "configure:1719: checking if C symbols get an underscore after compilation" >&5 echo "configure:1721: checking if C symbols get an underscore after compilation" >&5
if eval "test \"`echo '$''{'grub_cv_asm_uscore'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_asm_uscore'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1728,7 +1730,7 @@ func (int *list)
} }
EOF EOF
if { ac_try='${CC-cc} ${CFLAGS} -S conftest.c'; { (eval echo configure:1732: \"$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:1734: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then
true true
else else
{ echo "configure: error: ${CC-cc} failed to produce assembly code" 1>&2; exit 1; } { echo "configure: error: ${CC-cc} failed to produce assembly code" 1>&2; exit 1; }
@ -1754,7 +1756,7 @@ fi
echo "$ac_t""$grub_cv_asm_uscore" 1>&6 echo "$ac_t""$grub_cv_asm_uscore" 1>&6
echo $ac_n "checking whether ${OBJCOPY} works for absolute addresses""... $ac_c" 1>&6 echo $ac_n "checking whether ${OBJCOPY} works for absolute addresses""... $ac_c" 1>&6
echo "configure:1758: checking whether ${OBJCOPY} works for absolute addresses" >&5 echo "configure:1760: checking whether ${OBJCOPY} works for absolute addresses" >&5
if eval "test \"`echo '$''{'grub_cv_prog_objcopy_absolute'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_prog_objcopy_absolute'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1766,21 +1768,21 @@ cmain (void)
} }
EOF EOF
if { (eval echo configure:1770: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then : if { (eval echo configure:1772: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then :
else else
{ echo "configure: error: ${CC-cc} cannot compile C source code" 1>&2; exit 1; } { echo "configure: error: ${CC-cc} cannot compile C source code" 1>&2; exit 1; }
fi fi
grub_cv_prog_objcopy_absolute=yes grub_cv_prog_objcopy_absolute=yes
for link_addr in 2000 8000 7C00; do 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:1776: \"$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:1778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
else else
{ echo "configure: error: ${CC-cc} cannot link at address $link_addr" 1>&2; exit 1; } { echo "configure: error: ${CC-cc} cannot link at address $link_addr" 1>&2; exit 1; }
fi fi
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then : if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1782: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
else else
{ echo "configure: error: ${OBJCOPY-objcopy} cannot create binary files" 1>&2; exit 1; } { echo "configure: error: ${OBJCOPY-objcopy} cannot create binary files" 1>&2; exit 1; }
fi fi
if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { (eval echo configure:1784: \"$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:1786: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
mv -f conftest conftest.old mv -f conftest conftest.old
else else
grub_cv_prog_objcopy_absolute=no grub_cv_prog_objcopy_absolute=no
@ -1797,7 +1799,7 @@ fi
echo $ac_n "checking whether addr32 must be in the same line as the instruction""... $ac_c" 1>&6 echo $ac_n "checking whether addr32 must be in the same line as the instruction""... $ac_c" 1>&6
echo "configure:1801: checking whether addr32 must be in the same line as the instruction" >&5 echo "configure:1803: 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 if eval "test \"`echo '$''{'grub_cv_asm_prefix_requirement'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1806,7 +1808,7 @@ else
l1: addr32 movb %al, l1 l1: addr32 movb %al, l1
EOF EOF
if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1810: \"$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:1812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
grub_cv_asm_prefix_requirement=yes grub_cv_asm_prefix_requirement=yes
else else
grub_cv_asm_prefix_requirement=no grub_cv_asm_prefix_requirement=no
@ -1838,7 +1840,7 @@ echo "$ac_t""$grub_cv_asm_prefix_requirement" 1>&6
echo $ac_n "checking for .code16 addr32 assembler support""... $ac_c" 1>&6 echo $ac_n "checking for .code16 addr32 assembler support""... $ac_c" 1>&6
echo "configure:1842: checking for .code16 addr32 assembler support" >&5 echo "configure:1844: checking for .code16 addr32 assembler support" >&5
if eval "test \"`echo '$''{'grub_cv_asm_addr32'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_asm_addr32'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1853,7 +1855,7 @@ else
sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
fi fi
if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1857: \"$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:1859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
grub_cv_asm_addr32=yes grub_cv_asm_addr32=yes
else else
grub_cv_asm_addr32=no grub_cv_asm_addr32=no
@ -1870,7 +1872,7 @@ fi
echo $ac_n "checking whether an absolute indirect call/jump must not be prefixed with an asterisk""... $ac_c" 1>&6 echo $ac_n "checking whether an absolute indirect call/jump must not be prefixed with an asterisk""... $ac_c" 1>&6
echo "configure:1874: checking whether an absolute indirect call/jump must not be prefixed with an asterisk" >&5 echo "configure:1876: 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 if eval "test \"`echo '$''{'grub_cv_asm_absolute_without_asterisk'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
@ -1881,7 +1883,7 @@ offset:
.word 0 .word 0
EOF EOF
if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1885: \"$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:1887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
grub_cv_asm_absolute_without_asterisk=no grub_cv_asm_absolute_without_asterisk=no
else else
grub_cv_asm_absolute_without_asterisk=yes grub_cv_asm_absolute_without_asterisk=yes
@ -1902,19 +1904,19 @@ echo "$ac_t""$grub_cv_asm_absolute_without_asterisk" 1>&6
echo $ac_n "checking if start is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if start is defined by the compiler""... $ac_c" 1>&6
echo "configure:1906: checking if start is defined by the compiler" >&5 echo "configure:1908: checking if start is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_start_symbol'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_check_start_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1911 "configure" #line 1913 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl start") asm ("incl start")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1920: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_start_symbol=yes grub_cv_check_start_symbol=yes
else else
@ -1938,19 +1940,19 @@ echo "$ac_t""$grub_cv_check_start_symbol" 1>&6
echo $ac_n "checking if _start is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if _start is defined by the compiler""... $ac_c" 1>&6
echo "configure:1942: checking if _start is defined by the compiler" >&5 echo "configure:1944: checking if _start is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_uscore_start_symbol'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_check_uscore_start_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1947 "configure" #line 1949 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl _start") asm ("incl _start")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_uscore_start_symbol=yes grub_cv_check_uscore_start_symbol=yes
else else
@ -1979,19 +1981,19 @@ fi
echo $ac_n "checking if __bss_start is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if __bss_start is defined by the compiler""... $ac_c" 1>&6
echo "configure:1983: checking if __bss_start is defined by the compiler" >&5 echo "configure:1985: 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 if eval "test \"`echo '$''{'grub_cv_check_uscore_uscore_bss_start_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 1988 "configure" #line 1990 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl __bss_start") asm ("incl __bss_start")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:1995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:1997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_uscore_uscore_bss_start_symbol=yes grub_cv_check_uscore_uscore_bss_start_symbol=yes
else else
@ -2015,19 +2017,19 @@ echo "$ac_t""$grub_cv_check_uscore_uscore_bss_start_symbol" 1>&6
echo $ac_n "checking if _edata is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if _edata is defined by the compiler""... $ac_c" 1>&6
echo "configure:2019: checking if _edata is defined by the compiler" >&5 echo "configure:2021: checking if _edata is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_uscore_edata_symbol'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_check_uscore_edata_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2024 "configure" #line 2026 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl _edata") asm ("incl _edata")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_uscore_edata_symbol=yes grub_cv_check_uscore_edata_symbol=yes
else else
@ -2051,19 +2053,19 @@ echo "$ac_t""$grub_cv_check_uscore_edata_symbol" 1>&6
echo $ac_n "checking if edata is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if edata is defined by the compiler""... $ac_c" 1>&6
echo "configure:2055: checking if edata is defined by the compiler" >&5 echo "configure:2057: checking if edata is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_edata_symbol'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_check_edata_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2060 "configure" #line 2062 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl edata") asm ("incl edata")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_edata_symbol=yes grub_cv_check_edata_symbol=yes
else else
@ -2093,19 +2095,19 @@ fi
echo $ac_n "checking if end is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if end is defined by the compiler""... $ac_c" 1>&6
echo "configure:2097: checking if end is defined by the compiler" >&5 echo "configure:2099: checking if end is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_end_symbol'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_check_end_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2102 "configure" #line 2104 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl end") asm ("incl end")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_end_symbol=yes grub_cv_check_end_symbol=yes
else else
@ -2129,19 +2131,19 @@ echo "$ac_t""$grub_cv_check_end_symbol" 1>&6
echo $ac_n "checking if _end is defined by the compiler""... $ac_c" 1>&6 echo $ac_n "checking if _end is defined by the compiler""... $ac_c" 1>&6
echo "configure:2133: checking if _end is defined by the compiler" >&5 echo "configure:2135: checking if _end is defined by the compiler" >&5
if eval "test \"`echo '$''{'grub_cv_check_uscore_end_symbol'+set}'`\" = set"; then if eval "test \"`echo '$''{'grub_cv_check_uscore_end_symbol'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2138 "configure" #line 2140 "configure"
#include "confdefs.h" #include "confdefs.h"
int main() { int main() {
asm ("incl _end") asm ("incl _end")
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
grub_cv_check_uscore_end_symbol=yes grub_cv_check_uscore_end_symbol=yes
else else
@ -2179,7 +2181,7 @@ fi
# Get the filename or the whole disk and open it. # Get the filename or the whole disk and open it.
# Known to work on NetBSD. # Known to work on NetBSD.
echo $ac_n "checking for opendisk in -lutil""... $ac_c" 1>&6 echo $ac_n "checking for opendisk in -lutil""... $ac_c" 1>&6
echo "configure:2183: checking for opendisk in -lutil" >&5 echo "configure:2185: checking for opendisk in -lutil" >&5
ac_lib_var=`echo util'_'opendisk | sed 'y%./+-%__p_%'` ac_lib_var=`echo util'_'opendisk | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -2187,7 +2189,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lutil $LIBS" LIBS="-lutil $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2191 "configure" #line 2193 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -2198,7 +2200,7 @@ int main() {
opendisk() opendisk()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -2226,7 +2228,7 @@ fi
# Unless the user specify --without-curses, check for curses. # Unless the user specify --without-curses, check for curses.
if test "x$with_curses" != "xno"; then if test "x$with_curses" != "xno"; then
echo $ac_n "checking for wgetch in -lncurses""... $ac_c" 1>&6 echo $ac_n "checking for wgetch in -lncurses""... $ac_c" 1>&6
echo "configure:2230: checking for wgetch in -lncurses" >&5 echo "configure:2232: checking for wgetch in -lncurses" >&5
ac_lib_var=`echo ncurses'_'wgetch | sed 'y%./+-%__p_%'` ac_lib_var=`echo ncurses'_'wgetch | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -2234,7 +2236,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS" LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2238 "configure" #line 2240 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -2245,7 +2247,7 @@ int main() {
wgetch() wgetch()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -2268,7 +2270,7 @@ EOF
else else
echo "$ac_t""no" 1>&6 echo "$ac_t""no" 1>&6
echo $ac_n "checking for wgetch in -lcurses""... $ac_c" 1>&6 echo $ac_n "checking for wgetch in -lcurses""... $ac_c" 1>&6
echo "configure:2272: checking for wgetch in -lcurses" >&5 echo "configure:2274: checking for wgetch in -lcurses" >&5
ac_lib_var=`echo curses'_'wgetch | sed 'y%./+-%__p_%'` ac_lib_var=`echo curses'_'wgetch | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
@ -2276,7 +2278,7 @@ else
ac_save_LIBS="$LIBS" ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS" LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2280 "configure" #line 2282 "configure"
#include "confdefs.h" #include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */ /* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2 /* We use char because int might match the return type of a gcc2
@ -2287,7 +2289,7 @@ int main() {
wgetch() wgetch()
; return 0; } ; return 0; }
EOF EOF
if { (eval echo configure:2291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then if { (eval echo configure:2293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest* rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes" eval "ac_cv_lib_$ac_lib_var=yes"
else else
@ -2322,17 +2324,17 @@ for ac_hdr in string.h strings.h ncurses/curses.h ncurses.h curses.h
do do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:2326: checking for $ac_hdr" >&5 echo "configure:2328: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6 echo $ac_n "(cached) $ac_c" 1>&6
else else
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 2331 "configure" #line 2333 "configure"
#include "confdefs.h" #include "confdefs.h"
#include <$ac_hdr> #include <$ac_hdr>
EOF EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:2336: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } { (eval echo configure:2338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then if test -z "$ac_err"; then
rm -rf conftest* rm -rf conftest*
@ -2856,6 +2858,22 @@ else
DISKLESS_SUPPORT_FALSE= DISKLESS_SUPPORT_FALSE=
fi fi
# Check whether --enable-hercules or --disable-hercules was given.
if test "${enable_hercules+set}" = set; then
enableval="$enable_hercules"
:
fi
if test "x$enable_hercules" != xno; then
HERCULES_SUPPORT_TRUE=
HERCULES_SUPPORT_FALSE='#'
else
HERCULES_SUPPORT_TRUE='#'
HERCULES_SUPPORT_FALSE=
fi
# Check whether --enable-serial or --disable-serial was given. # Check whether --enable-serial or --disable-serial was given.
if test "${enable_serial+set}" = set; then if test "${enable_serial+set}" = set; then
enableval="$enable_serial" enableval="$enable_serial"
@ -2938,7 +2956,7 @@ main (void)
} }
EOF EOF
if { ac_try='${CC-cc} ${CFLAGS} conftest.c -o conftest'; { (eval echo configure:2942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then if { ac_try='${CC-cc} ${CFLAGS} conftest.c -o conftest'; { (eval echo configure:2960: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
grub_tmp_value=`./conftest < "$enable_preset_menu"` grub_tmp_value=`./conftest < "$enable_preset_menu"`
else else
{ echo "configure: error: ${CC-cc} failed to produce an executable file" 1>&2; exit 1; } { echo "configure: error: ${CC-cc} failed to produce an executable file" 1>&2; exit 1; }
@ -3158,6 +3176,8 @@ s%@NETBOOT_SUPPORT_TRUE@%$NETBOOT_SUPPORT_TRUE%g
s%@NETBOOT_SUPPORT_FALSE@%$NETBOOT_SUPPORT_FALSE%g s%@NETBOOT_SUPPORT_FALSE@%$NETBOOT_SUPPORT_FALSE%g
s%@DISKLESS_SUPPORT_TRUE@%$DISKLESS_SUPPORT_TRUE%g s%@DISKLESS_SUPPORT_TRUE@%$DISKLESS_SUPPORT_TRUE%g
s%@DISKLESS_SUPPORT_FALSE@%$DISKLESS_SUPPORT_FALSE%g s%@DISKLESS_SUPPORT_FALSE@%$DISKLESS_SUPPORT_FALSE%g
s%@HERCULES_SUPPORT_TRUE@%$HERCULES_SUPPORT_TRUE%g
s%@HERCULES_SUPPORT_FALSE@%$HERCULES_SUPPORT_FALSE%g
s%@SERIAL_SUPPORT_TRUE@%$SERIAL_SUPPORT_TRUE%g s%@SERIAL_SUPPORT_TRUE@%$SERIAL_SUPPORT_TRUE%g
s%@SERIAL_SUPPORT_FALSE@%$SERIAL_SUPPORT_FALSE%g s%@SERIAL_SUPPORT_FALSE@%$SERIAL_SUPPORT_FALSE%g
s%@SERIAL_SPEED_SIMULATION_TRUE@%$SERIAL_SPEED_SIMULATION_TRUE%g s%@SERIAL_SPEED_SIMULATION_TRUE@%$SERIAL_SPEED_SIMULATION_TRUE%g

View file

@ -1,5 +1,5 @@
dnl Configure script for GRUB. dnl Configure script for GRUB.
dnl Copyright 1999,2000 Free Software Foundation, Inc. dnl Copyright 1999,2000,2001 Free Software Foundation, Inc.
dnl Permission to use, copy, modify and distribute this software and its dnl Permission to use, copy, modify and distribute this software and its
dnl documentation is hereby granted, provided that both the copyright dnl documentation is hereby granted, provided that both the copyright
@ -498,6 +498,11 @@ AC_ARG_ENABLE(diskless,
[ --enable-diskless enable diskless support]) [ --enable-diskless enable diskless support])
AM_CONDITIONAL(DISKLESS_SUPPORT, test "x$enable_diskless" = xyes) AM_CONDITIONAL(DISKLESS_SUPPORT, test "x$enable_diskless" = xyes)
dnl Hercules terminal
AC_ARG_ENABLE(hercules,
[ --disable-hercules disable hercules terminal support])
AM_CONDITIONAL(HERCULES_SUPPORT, test "x$enable_hercules" != xno)
dnl Serial terminal dnl Serial terminal
AC_ARG_ENABLE(serial, AC_ARG_ENABLE(serial,
[ --disable-serial diable serial terminal support]) [ --disable-serial diable serial terminal support])

View file

@ -1,3 +1,3 @@
@set UPDATED 11 February 2001 @set UPDATED 17 February 2001
@set EDITION 0.5.97 @set EDITION 0.5.97
@set VERSION 0.5.97 @set VERSION 0.5.97

View file

@ -1,3 +1,3 @@
@set UPDATED 11 February 2001 @set UPDATED 17 February 2001
@set EDITION 0.5.97 @set EDITION 0.5.97
@set VERSION 0.5.97 @set VERSION 0.5.97

View file

@ -60,6 +60,7 @@ int grub_stage2 (void);
#include <shared.h> #include <shared.h>
#include <device.h> #include <device.h>
#include <serial.h> #include <serial.h>
#include <hercules.h>
/* Simulated memory sizes. */ /* Simulated memory sizes. */
#define EXTENDED_MEMSIZE (3 * 1024 * 1024) /* 3MB */ #define EXTENDED_MEMSIZE (3 * 1024 * 1024) /* 3MB */
@ -642,7 +643,7 @@ console_checkkey (void)
/* sets text mode character attribute at the cursor position */ /* sets text mode character attribute at the cursor position */
void void
set_attrib (int attr) console_set_attrib (int attr)
{ {
#ifdef HAVE_LIBCURSES #ifdef HAVE_LIBCURSES
if (use_curses) if (use_curses)
@ -1134,3 +1135,34 @@ set_serial_device (const char *device)
serial_device = strdup (device); serial_device = strdup (device);
} }
/* There is no difference between console and hercules in the grub shell. */
void
herc_cls (void)
{
console_cls ();
}
int
herc_getxy (void)
{
return console_getxy ();
}
void
herc_gotoxy (int x, int y)
{
console_gotoxy (x, y);
}
void
herc_putchar (int c)
{
console_putchar (c);
}
void
herc_set_attrib (int attr)
{
console_set_attrib (attr);
}

View file

@ -4,9 +4,9 @@ noinst_SCRIPTS = $(TESTS)
# For dist target. # For dist target.
noinst_HEADERS = apic.h defs.h dir.h disk_inode.h disk_inode_ffs.h \ noinst_HEADERS = apic.h defs.h dir.h disk_inode.h disk_inode_ffs.h \
fat.h filesys.h freebsd.h fs.h i386-elf.h imgact_aout.h \ fat.h filesys.h freebsd.h fs.h hercules.h i386-elf.h \
mb_header.h mb_info.h md5.h pc_slice.h serial.h shared.h \ imgact_aout.h mb_header.h mb_info.h md5.h pc_slice.h serial.h \
smp-imps.h nbi.h shared.h smp-imps.h nbi.h
EXTRA_DIST = setjmp.S apm.S $(noinst_SCRIPTS) EXTRA_DIST = setjmp.S apm.S $(noinst_SCRIPTS)
# For <stage1.h>. # For <stage1.h>.
@ -19,8 +19,8 @@ libgrub_a_SOURCES = boot.c builtins.c common.c char_io.c cmdline.c \
fsys_minix.c fsys_reiserfs.c stage2.c md5.c fsys_minix.c fsys_reiserfs.c stage2.c md5.c
libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \ libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \
-DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \ -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \
-DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DSUPPORT_SERIAL \ -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DSUPPORT_SERIAL=1 \
-fwritable-strings -DSUPPORT_HERCULES=1 -fwritable-strings
# Stage 2 and Stage 1.5's. # Stage 2 and Stage 1.5's.
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor) pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
@ -62,8 +62,14 @@ else
SERIAL_FLAGS = SERIAL_FLAGS =
endif endif
if HERCULES_SUPPORT
HERCULES_FLAGS = -DSUPPORT_HERCULES=1
else
HERCULES_FLAGS =
endif
STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
$(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)
STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000 STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
STAGE1_5_COMPILE = $(STAGE2_COMPILE) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1 STAGE1_5_COMPILE = $(STAGE2_COMPILE) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1
@ -71,8 +77,8 @@ STAGE1_5_COMPILE = $(STAGE2_COMPILE) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1
# For stage2 target. # For stage2 target.
pre_stage2_exec_SOURCES = asm.S bios.c boot.c builtins.c common.c \ pre_stage2_exec_SOURCES = asm.S bios.c boot.c builtins.c common.c \
char_io.c cmdline.c disk_io.c gunzip.c fsys_ext2fs.c \ char_io.c cmdline.c disk_io.c gunzip.c fsys_ext2fs.c \
fsys_fat.c fsys_ffs.c fsys_minix.c fsys_reiserfs.c serial.c \ fsys_fat.c fsys_ffs.c fsys_minix.c fsys_reiserfs.c hercules.c \
smp-imps.c stage2.c md5.c serial.c smp-imps.c stage2.c md5.c
pre_stage2_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) pre_stage2_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS)
pre_stage2_exec_LDFLAGS = $(PRE_STAGE2_LINK) pre_stage2_exec_LDFLAGS = $(PRE_STAGE2_LINK)

View file

@ -92,9 +92,9 @@ noinst_SCRIPTS = $(TESTS)
# For dist target. # For dist target.
noinst_HEADERS = apic.h defs.h dir.h disk_inode.h disk_inode_ffs.h \ noinst_HEADERS = apic.h defs.h dir.h disk_inode.h disk_inode_ffs.h \
fat.h filesys.h freebsd.h fs.h i386-elf.h imgact_aout.h \ fat.h filesys.h freebsd.h fs.h hercules.h i386-elf.h \
mb_header.h mb_info.h md5.h pc_slice.h serial.h shared.h \ imgact_aout.h mb_header.h mb_info.h md5.h pc_slice.h serial.h \
smp-imps.h nbi.h shared.h smp-imps.h nbi.h
EXTRA_DIST = setjmp.S apm.S $(noinst_SCRIPTS) EXTRA_DIST = setjmp.S apm.S $(noinst_SCRIPTS)
@ -109,8 +109,8 @@ libgrub_a_SOURCES = boot.c builtins.c common.c char_io.c cmdline.c \
libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \ libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \
-DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \ -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \
-DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DSUPPORT_SERIAL \ -DFSYS_MINIX=1 -DFSYS_REISERFS=1 -DSUPPORT_SERIAL=1 \
-fwritable-strings -DSUPPORT_HERCULES=1 -fwritable-strings
# Stage 2 and Stage 1.5's. # Stage 2 and Stage 1.5's.
@ -140,9 +140,11 @@ PXELOADER_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00
@NETBOOT_SUPPORT_FALSE@NETBOOT_FLAGS = @NETBOOT_SUPPORT_FALSE@NETBOOT_FLAGS =
@SERIAL_SUPPORT_TRUE@SERIAL_FLAGS = @SERIAL_SUPPORT_TRUE@-DSUPPORT_SERIAL=1 @SERIAL_SUPPORT_TRUE@SERIAL_FLAGS = @SERIAL_SUPPORT_TRUE@-DSUPPORT_SERIAL=1
@SERIAL_SUPPORT_FALSE@SERIAL_FLAGS = @SERIAL_SUPPORT_FALSE@SERIAL_FLAGS =
@HERCULES_SUPPORT_TRUE@HERCULES_FLAGS = @HERCULES_SUPPORT_TRUE@-DSUPPORT_HERCULES=1
@HERCULES_SUPPORT_FALSE@HERCULES_FLAGS =
STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \
$(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS)
STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000 STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000
@ -151,8 +153,8 @@ STAGE1_5_COMPILE = $(STAGE2_COMPILE) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1
# For stage2 target. # For stage2 target.
pre_stage2_exec_SOURCES = asm.S bios.c boot.c builtins.c common.c \ pre_stage2_exec_SOURCES = asm.S bios.c boot.c builtins.c common.c \
char_io.c cmdline.c disk_io.c gunzip.c fsys_ext2fs.c \ char_io.c cmdline.c disk_io.c gunzip.c fsys_ext2fs.c \
fsys_fat.c fsys_ffs.c fsys_minix.c fsys_reiserfs.c serial.c \ fsys_fat.c fsys_ffs.c fsys_minix.c fsys_reiserfs.c hercules.c \
smp-imps.c stage2.c md5.c serial.c smp-imps.c stage2.c md5.c
pre_stage2_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) pre_stage2_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS)
pre_stage2_exec_LDFLAGS = $(PRE_STAGE2_LINK) pre_stage2_exec_LDFLAGS = $(PRE_STAGE2_LINK)
@ -258,8 +260,8 @@ diskless_exec-char_io.o diskless_exec-cmdline.o diskless_exec-disk_io.o \
diskless_exec-gunzip.o diskless_exec-fsys_ext2fs.o \ diskless_exec-gunzip.o diskless_exec-fsys_ext2fs.o \
diskless_exec-fsys_fat.o diskless_exec-fsys_ffs.o \ diskless_exec-fsys_fat.o diskless_exec-fsys_ffs.o \
diskless_exec-fsys_minix.o diskless_exec-fsys_reiserfs.o \ diskless_exec-fsys_minix.o diskless_exec-fsys_reiserfs.o \
diskless_exec-serial.o diskless_exec-smp-imps.o diskless_exec-stage2.o \ diskless_exec-hercules.o diskless_exec-serial.o \
diskless_exec-md5.o diskless_exec-smp-imps.o diskless_exec-stage2.o diskless_exec-md5.o
diskless_exec_OBJECTS = $(am_diskless_exec_OBJECTS) diskless_exec_OBJECTS = $(am_diskless_exec_OBJECTS)
diskless_exec_DEPENDENCIES = ../netboot/libdrivers.a diskless_exec_DEPENDENCIES = ../netboot/libdrivers.a
am_e2fs_stage1_5_exec_OBJECTS = e2fs_stage1_5_exec-start.o \ am_e2fs_stage1_5_exec_OBJECTS = e2fs_stage1_5_exec-start.o \
@ -305,9 +307,9 @@ pre_stage2_exec-char_io.o pre_stage2_exec-cmdline.o \
pre_stage2_exec-disk_io.o pre_stage2_exec-gunzip.o \ pre_stage2_exec-disk_io.o pre_stage2_exec-gunzip.o \
pre_stage2_exec-fsys_ext2fs.o pre_stage2_exec-fsys_fat.o \ pre_stage2_exec-fsys_ext2fs.o pre_stage2_exec-fsys_fat.o \
pre_stage2_exec-fsys_ffs.o pre_stage2_exec-fsys_minix.o \ pre_stage2_exec-fsys_ffs.o pre_stage2_exec-fsys_minix.o \
pre_stage2_exec-fsys_reiserfs.o pre_stage2_exec-serial.o \ pre_stage2_exec-fsys_reiserfs.o pre_stage2_exec-hercules.o \
pre_stage2_exec-smp-imps.o pre_stage2_exec-stage2.o \ pre_stage2_exec-serial.o pre_stage2_exec-smp-imps.o \
pre_stage2_exec-md5.o pre_stage2_exec-stage2.o pre_stage2_exec-md5.o
pre_stage2_exec_OBJECTS = $(am_pre_stage2_exec_OBJECTS) pre_stage2_exec_OBJECTS = $(am_pre_stage2_exec_OBJECTS)
@NETBOOT_SUPPORT_TRUE@pre_stage2_exec_DEPENDENCIES = \ @NETBOOT_SUPPORT_TRUE@pre_stage2_exec_DEPENDENCIES = \
@NETBOOT_SUPPORT_TRUE@../netboot/libdrivers.a @NETBOOT_SUPPORT_TRUE@../netboot/libdrivers.a
@ -353,9 +355,10 @@ $(DEPDIR)/diskless_exec-fsys_ext2fs.Po \
$(DEPDIR)/diskless_exec-fsys_fat.Po $(DEPDIR)/diskless_exec-fsys_ffs.Po \ $(DEPDIR)/diskless_exec-fsys_fat.Po $(DEPDIR)/diskless_exec-fsys_ffs.Po \
$(DEPDIR)/diskless_exec-fsys_minix.Po \ $(DEPDIR)/diskless_exec-fsys_minix.Po \
$(DEPDIR)/diskless_exec-fsys_reiserfs.Po \ $(DEPDIR)/diskless_exec-fsys_reiserfs.Po \
$(DEPDIR)/diskless_exec-gunzip.Po $(DEPDIR)/diskless_exec-md5.Po \ $(DEPDIR)/diskless_exec-gunzip.Po $(DEPDIR)/diskless_exec-hercules.Po \
$(DEPDIR)/diskless_exec-serial.Po $(DEPDIR)/diskless_exec-smp-imps.Po \ $(DEPDIR)/diskless_exec-md5.Po $(DEPDIR)/diskless_exec-serial.Po \
$(DEPDIR)/diskless_exec-stage2.Po $(DEPDIR)/e2fs_stage1_5_exec-asm.Po \ $(DEPDIR)/diskless_exec-smp-imps.Po $(DEPDIR)/diskless_exec-stage2.Po \
$(DEPDIR)/e2fs_stage1_5_exec-asm.Po \
$(DEPDIR)/e2fs_stage1_5_exec-bios.Po \ $(DEPDIR)/e2fs_stage1_5_exec-bios.Po \
$(DEPDIR)/e2fs_stage1_5_exec-char_io.Po \ $(DEPDIR)/e2fs_stage1_5_exec-char_io.Po \
$(DEPDIR)/e2fs_stage1_5_exec-common.Po \ $(DEPDIR)/e2fs_stage1_5_exec-common.Po \
@ -403,7 +406,8 @@ $(DEPDIR)/pre_stage2_exec-fsys_fat.Po \
$(DEPDIR)/pre_stage2_exec-fsys_ffs.Po \ $(DEPDIR)/pre_stage2_exec-fsys_ffs.Po \
$(DEPDIR)/pre_stage2_exec-fsys_minix.Po \ $(DEPDIR)/pre_stage2_exec-fsys_minix.Po \
$(DEPDIR)/pre_stage2_exec-fsys_reiserfs.Po \ $(DEPDIR)/pre_stage2_exec-fsys_reiserfs.Po \
$(DEPDIR)/pre_stage2_exec-gunzip.Po $(DEPDIR)/pre_stage2_exec-md5.Po \ $(DEPDIR)/pre_stage2_exec-gunzip.Po \
$(DEPDIR)/pre_stage2_exec-hercules.Po $(DEPDIR)/pre_stage2_exec-md5.Po \
$(DEPDIR)/pre_stage2_exec-serial.Po \ $(DEPDIR)/pre_stage2_exec-serial.Po \
$(DEPDIR)/pre_stage2_exec-smp-imps.Po \ $(DEPDIR)/pre_stage2_exec-smp-imps.Po \
$(DEPDIR)/pre_stage2_exec-stage2.Po \ $(DEPDIR)/pre_stage2_exec-stage2.Po \
@ -497,6 +501,7 @@ diskless_exec-fsys_fat.o: fsys_fat.c
diskless_exec-fsys_ffs.o: fsys_ffs.c diskless_exec-fsys_ffs.o: fsys_ffs.c
diskless_exec-fsys_minix.o: fsys_minix.c diskless_exec-fsys_minix.o: fsys_minix.c
diskless_exec-fsys_reiserfs.o: fsys_reiserfs.c diskless_exec-fsys_reiserfs.o: fsys_reiserfs.c
diskless_exec-hercules.o: hercules.c
diskless_exec-serial.o: serial.c diskless_exec-serial.o: serial.c
diskless_exec-smp-imps.o: smp-imps.c diskless_exec-smp-imps.o: smp-imps.c
diskless_exec-stage2.o: stage2.c diskless_exec-stage2.o: stage2.c
@ -582,6 +587,7 @@ pre_stage2_exec-fsys_fat.o: fsys_fat.c
pre_stage2_exec-fsys_ffs.o: fsys_ffs.c pre_stage2_exec-fsys_ffs.o: fsys_ffs.c
pre_stage2_exec-fsys_minix.o: fsys_minix.c pre_stage2_exec-fsys_minix.o: fsys_minix.c
pre_stage2_exec-fsys_reiserfs.o: fsys_reiserfs.c pre_stage2_exec-fsys_reiserfs.o: fsys_reiserfs.c
pre_stage2_exec-hercules.o: hercules.c
pre_stage2_exec-serial.o: serial.c pre_stage2_exec-serial.o: serial.c
pre_stage2_exec-smp-imps.o: smp-imps.c pre_stage2_exec-smp-imps.o: smp-imps.c
pre_stage2_exec-stage2.o: stage2.c pre_stage2_exec-stage2.o: stage2.c
@ -684,6 +690,7 @@ maintainer-clean-tags:
@AMDEP@include $(DEPDIR)/diskless_exec-fsys_minix.Po @AMDEP@include $(DEPDIR)/diskless_exec-fsys_minix.Po
@AMDEP@include $(DEPDIR)/diskless_exec-fsys_reiserfs.Po @AMDEP@include $(DEPDIR)/diskless_exec-fsys_reiserfs.Po
@AMDEP@include $(DEPDIR)/diskless_exec-gunzip.Po @AMDEP@include $(DEPDIR)/diskless_exec-gunzip.Po
@AMDEP@include $(DEPDIR)/diskless_exec-hercules.Po
@AMDEP@include $(DEPDIR)/diskless_exec-md5.Po @AMDEP@include $(DEPDIR)/diskless_exec-md5.Po
@AMDEP@include $(DEPDIR)/diskless_exec-serial.Po @AMDEP@include $(DEPDIR)/diskless_exec-serial.Po
@AMDEP@include $(DEPDIR)/diskless_exec-smp-imps.Po @AMDEP@include $(DEPDIR)/diskless_exec-smp-imps.Po
@ -749,6 +756,7 @@ maintainer-clean-tags:
@AMDEP@include $(DEPDIR)/pre_stage2_exec-fsys_minix.Po @AMDEP@include $(DEPDIR)/pre_stage2_exec-fsys_minix.Po
@AMDEP@include $(DEPDIR)/pre_stage2_exec-fsys_reiserfs.Po @AMDEP@include $(DEPDIR)/pre_stage2_exec-fsys_reiserfs.Po
@AMDEP@include $(DEPDIR)/pre_stage2_exec-gunzip.Po @AMDEP@include $(DEPDIR)/pre_stage2_exec-gunzip.Po
@AMDEP@include $(DEPDIR)/pre_stage2_exec-hercules.Po
@AMDEP@include $(DEPDIR)/pre_stage2_exec-md5.Po @AMDEP@include $(DEPDIR)/pre_stage2_exec-md5.Po
@AMDEP@include $(DEPDIR)/pre_stage2_exec-serial.Po @AMDEP@include $(DEPDIR)/pre_stage2_exec-serial.Po
@AMDEP@include $(DEPDIR)/pre_stage2_exec-smp-imps.Po @AMDEP@include $(DEPDIR)/pre_stage2_exec-smp-imps.Po
@ -1000,6 +1008,14 @@ diskless_exec-fsys_reiserfs.o: fsys_reiserfs.c
@AMDEP@CCDEPMODE = @CCDEPMODE@ @AMDEP@CCDEPMODE = @CCDEPMODE@
diskless_exec-hercules.o: hercules.c
@AMDEP@ source='hercules.c' object='diskless_exec-hercules.o' libtool=no @AMDEPBACKSLASH@
@AMDEP@ depfile='$(DEPDIR)/diskless_exec-hercules.Po' tmpdepfile='$(DEPDIR)/diskless_exec-hercules.TPo' @AMDEPBACKSLASH@
@AMDEP@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(diskless_exec_CFLAGS) $(CFLAGS) -c -o diskless_exec-hercules.o `test -f hercules.c || echo '$(srcdir)/'`hercules.c
@AMDEP@CCDEPMODE = @CCDEPMODE@
diskless_exec-serial.o: serial.c diskless_exec-serial.o: serial.c
@AMDEP@ source='serial.c' object='diskless_exec-serial.o' libtool=no @AMDEPBACKSLASH@ @AMDEP@ source='serial.c' object='diskless_exec-serial.o' libtool=no @AMDEPBACKSLASH@
@AMDEP@ depfile='$(DEPDIR)/diskless_exec-serial.Po' tmpdepfile='$(DEPDIR)/diskless_exec-serial.TPo' @AMDEPBACKSLASH@ @AMDEP@ depfile='$(DEPDIR)/diskless_exec-serial.Po' tmpdepfile='$(DEPDIR)/diskless_exec-serial.TPo' @AMDEPBACKSLASH@
@ -1328,6 +1344,14 @@ pre_stage2_exec-fsys_reiserfs.o: fsys_reiserfs.c
@AMDEP@CCDEPMODE = @CCDEPMODE@ @AMDEP@CCDEPMODE = @CCDEPMODE@
pre_stage2_exec-hercules.o: hercules.c
@AMDEP@ source='hercules.c' object='pre_stage2_exec-hercules.o' libtool=no @AMDEPBACKSLASH@
@AMDEP@ depfile='$(DEPDIR)/pre_stage2_exec-hercules.Po' tmpdepfile='$(DEPDIR)/pre_stage2_exec-hercules.TPo' @AMDEPBACKSLASH@
@AMDEP@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
$(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pre_stage2_exec_CFLAGS) $(CFLAGS) -c -o pre_stage2_exec-hercules.o `test -f hercules.c || echo '$(srcdir)/'`hercules.c
@AMDEP@CCDEPMODE = @CCDEPMODE@
pre_stage2_exec-serial.o: serial.c pre_stage2_exec-serial.o: serial.c
@AMDEP@ source='serial.c' object='pre_stage2_exec-serial.o' libtool=no @AMDEPBACKSLASH@ @AMDEP@ source='serial.c' object='pre_stage2_exec-serial.o' libtool=no @AMDEPBACKSLASH@
@AMDEP@ depfile='$(DEPDIR)/pre_stage2_exec-serial.Po' tmpdepfile='$(DEPDIR)/pre_stage2_exec-serial.TPo' @AMDEPBACKSLASH@ @AMDEP@ depfile='$(DEPDIR)/pre_stage2_exec-serial.Po' tmpdepfile='$(DEPDIR)/pre_stage2_exec-serial.TPo' @AMDEPBACKSLASH@

View file

@ -1943,7 +1943,7 @@ ENTRY(console_gotoxy)
/* /*
* set_attrib(attr) : Sets the character attributes for character at * console_set_attrib(attr) : Sets the character attributes for character at
* current cursor position. * current cursor position.
* *
* Bitfields for character's display attribute: * Bitfields for character's display attribute:
@ -1977,7 +1977,7 @@ ENTRY(console_gotoxy)
* %cx = count to display (???, possible side-effects!!) * %cx = count to display (???, possible side-effects!!)
*/ */
ENTRY(set_attrib) ENTRY(console_set_attrib)
push %ebp push %ebp
push %ebx push %ebx

View file

@ -3820,7 +3820,7 @@ static struct builtin builtin_setup =
}; };
#ifdef SUPPORT_SERIAL #if defined(SUPPORT_SERIAL) || defined(SUPPORT_HERCULES)
/* terminal */ /* terminal */
static int static int
terminal_func (char *arg, int flags) terminal_func (char *arg, int flags)
@ -3854,9 +3854,17 @@ terminal_func (char *arg, int flags)
if (terminal & TERMINAL_CONSOLE) if (terminal & TERMINAL_CONSOLE)
grub_printf ("console%s\n", grub_printf ("console%s\n",
terminal & TERMINAL_DUMB ? " (dumb)" : ""); terminal & TERMINAL_DUMB ? " (dumb)" : "");
#ifdef SUPPORT_HERCULES
else if (terminal & TERMINAL_HERCULES)
grub_printf ("hercules%s\n",
terminal & TERMINAL_DUMB ? " (dumb)" : "");
#endif /* SUPPORT_HERCULES */
#ifdef SUPPORT_SERIAL
else if (terminal & TERMINAL_SERIAL) else if (terminal & TERMINAL_SERIAL)
grub_printf ("serial%s\n", grub_printf ("serial%s\n",
terminal & TERMINAL_DUMB ? " (dumb)" : " (vt100)"); terminal & TERMINAL_DUMB ? " (dumb)" : " (vt100)");
#endif /* SUPPORT_SERIAL */
return 0; return 0;
} }
@ -3871,12 +3879,22 @@ terminal_func (char *arg, int flags)
if (! default_terminal) if (! default_terminal)
default_terminal = TERMINAL_CONSOLE; default_terminal = TERMINAL_CONSOLE;
} }
#ifdef SUPPORT_HERCULES
else if (grub_memcmp (arg, "hercules", sizeof ("hercules") - 1) == 0)
{
terminal |= TERMINAL_HERCULES;
if (! default_terminal)
default_terminal = TERMINAL_HERCULES;
}
#endif /* SUPPORT_HERCULES */
#ifdef SUPPORT_SERIAL
else if (grub_memcmp (arg, "serial", sizeof ("serial") - 1) == 0) else if (grub_memcmp (arg, "serial", sizeof ("serial") - 1) == 0)
{ {
terminal |= TERMINAL_SERIAL; terminal |= TERMINAL_SERIAL;
if (! default_terminal) if (! default_terminal)
default_terminal = TERMINAL_SERIAL; default_terminal = TERMINAL_SERIAL;
} }
#endif /* SUPPORT_SERIAL */
else else
{ {
terminal = saved_terminal; terminal = saved_terminal;
@ -3949,7 +3967,7 @@ static struct builtin builtin_terminal =
" If --timeout is present, this command will wait at most for SECS" " If --timeout is present, this command will wait at most for SECS"
" seconds." " seconds."
}; };
#endif /* SUPPORT_SERIAL */ #endif /* SUPPORT_SERIAL || SUPPORT_HERCULES */
/* testload */ /* testload */
@ -4448,9 +4466,9 @@ struct builtin *builtin_table[] =
#endif /* SUPPORT_SERIAL */ #endif /* SUPPORT_SERIAL */
&builtin_setkey, &builtin_setkey,
&builtin_setup, &builtin_setup,
#ifdef SUPPORT_SERIAL #if defined(SUPPORT_SERIAL) || defined(SUPPORT_HERCULES)
&builtin_terminal, &builtin_terminal,
#endif /* SUPPORT_SERIAL */ #endif /* SUPPORT_SERIAL || SUPPORT_HERCULES */
&builtin_testload, &builtin_testload,
&builtin_testvbe, &builtin_testvbe,
#ifdef SUPPORT_NETBOOT #ifdef SUPPORT_NETBOOT

View file

@ -2,7 +2,7 @@
/* /*
* GRUB -- GRand Unified Bootloader * GRUB -- GRand Unified Bootloader
* Copyright (C) 1996 Erich Boleyn <erich@uruk.org> * Copyright (C) 1996 Erich Boleyn <erich@uruk.org>
* Copyright (C) 1999, 2000 Free Software Foundation, Inc. * Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -21,6 +21,10 @@
#include <shared.h> #include <shared.h>
#ifdef SUPPORT_HERCULES
# include <hercules.h>
#endif
#ifdef SUPPORT_SERIAL #ifdef SUPPORT_SERIAL
# include <serial.h> # include <serial.h>
#endif #endif
@ -302,7 +306,11 @@ get_cmdline (char *prompt, char *cmdline, int maxlen,
{ {
xpos -= count; xpos -= count;
if (terminal & TERMINAL_CONSOLE) if ((terminal & TERMINAL_CONSOLE)
# ifdef SUPPORT_HERCULES
|| (terminal & TERMINAL_HERCULES)
# endif /* SUPPORT_HERCULES */
)
{ {
int y = getxy () & 0xFF; int y = getxy () & 0xFF;
@ -336,7 +344,11 @@ get_cmdline (char *prompt, char *cmdline, int maxlen,
{ {
xpos += count; xpos += count;
if (terminal & TERMINAL_CONSOLE) if ((terminal & TERMINAL_CONSOLE)
# ifdef SUPPORT_HERCULES
|| (terminal & TERMINAL_HERCULES)
# endif /* SUPPORT_HERCULES */
)
{ {
int y = getxy () & 0xFF; int y = getxy () & 0xFF;
@ -458,7 +470,11 @@ get_cmdline (char *prompt, char *cmdline, int maxlen,
} }
/* Back to XPOS. */ /* Back to XPOS. */
if (terminal & TERMINAL_CONSOLE) if ((terminal & TERMINAL_CONSOLE)
# ifdef SUPPORT_HERCULES
|| (terminal & TERMINAL_HERCULES)
# endif /* SUPPORT_HERCULES */
)
{ {
int y = getxy () & 0xFF; int y = getxy () & 0xFF;
@ -1022,7 +1038,11 @@ getkey (void)
{ {
int c = -1; int c = -1;
if (terminal & TERMINAL_CONSOLE) if ((terminal & TERMINAL_CONSOLE)
#ifdef SUPPORT_HERCULES
|| (terminal & TERMINAL_HERCULES)
#endif /* SUPPORT_HERCULES */
)
c = console_getkey (); c = console_getkey ();
#ifdef SUPPORT_SERIAL #ifdef SUPPORT_SERIAL
else if (terminal & TERMINAL_SERIAL) else if (terminal & TERMINAL_SERIAL)
@ -1038,9 +1058,13 @@ checkkey (void)
{ {
int c = -1; int c = -1;
if (terminal & TERMINAL_CONSOLE) if ((terminal & TERMINAL_CONSOLE)
#ifdef SUPPORT_HERCULES
|| (terminal & TERMINAL_HERCULES)
#endif /* SUPPORT_HERCULES */
)
c = console_checkkey (); c = console_checkkey ();
#ifdef SUPPORT_SERIAL #ifdef SUPPORT_SERIAL
if (terminal & TERMINAL_SERIAL) if (terminal & TERMINAL_SERIAL)
c = serial_checkkey (); c = serial_checkkey ();
@ -1090,6 +1114,11 @@ grub_putchar (int c)
if (terminal & TERMINAL_CONSOLE) if (terminal & TERMINAL_CONSOLE)
console_putchar (c); console_putchar (c);
# ifdef SUPPORT_HERCULES
if (terminal & TERMINAL_HERCULES)
herc_putchar (c);
# endif /* SUPPORT_HERCULES */
# ifdef SUPPORT_SERIAL # ifdef SUPPORT_SERIAL
if (terminal & TERMINAL_SERIAL) if (terminal & TERMINAL_SERIAL)
serial_putchar (c); serial_putchar (c);
@ -1104,10 +1133,14 @@ gotoxy (int x, int y)
{ {
if (terminal & TERMINAL_CONSOLE) if (terminal & TERMINAL_CONSOLE)
console_gotoxy (x, y); console_gotoxy (x, y);
#ifdef SUPPORT_HERCULES
else if (terminal & TERMINAL_HERCULES)
herc_gotoxy (x, y);
#endif /* SUPPORT_HERCULES */
#ifdef SUPPORT_SERIAL #ifdef SUPPORT_SERIAL
else if (terminal & TERMINAL_SERIAL) else if (terminal & TERMINAL_SERIAL)
serial_gotoxy (x, y); serial_gotoxy (x, y);
#endif #endif /* SUPPORT_SERIAL */
} }
#ifdef SUPPORT_SERIAL #ifdef SUPPORT_SERIAL
@ -1126,10 +1159,14 @@ getxy (void)
if (terminal & TERMINAL_CONSOLE) if (terminal & TERMINAL_CONSOLE)
ret = console_getxy (); ret = console_getxy ();
#ifdef SUPPORT_HERCULES
else if (terminal & TERMINAL_HERCULES)
ret = herc_getxy ();
#endif /* SUPPORT_HERCULES */
#ifdef SUPPORT_SERIAL #ifdef SUPPORT_SERIAL
else if (terminal & TERMINAL_SERIAL) else if (terminal & TERMINAL_SERIAL)
ret = serial_getxy (); ret = serial_getxy ();
#endif #endif /* SUPPORT_SERIAL */
return ret; return ret;
} }
@ -1225,10 +1262,14 @@ cls (void)
{ {
if (terminal & TERMINAL_CONSOLE) if (terminal & TERMINAL_CONSOLE)
console_cls (); console_cls ();
#ifdef SUPPORT_HERCULES
else if (terminal & TERMINAL_HERCULES)
herc_cls ();
#endif /* SUPPORT_HERCULES */
#ifdef SUPPORT_SERIAL #ifdef SUPPORT_SERIAL
else if (terminal & TERMINAL_SERIAL) else if (terminal & TERMINAL_SERIAL)
serial_cls (); serial_cls ();
#endif #endif /* SUPPORT_SERIAL */
} }
#ifdef SUPPORT_SERIAL #ifdef SUPPORT_SERIAL
@ -1243,6 +1284,17 @@ serial_cls (void)
grub_printf ("\e[H\e[J"); grub_printf ("\e[H\e[J");
} }
#endif /* SUPPORT_SERIAL */ #endif /* SUPPORT_SERIAL */
void
set_attrib (int attr)
{
#ifdef SUPPORT_HERCULES
if (terminal & TERMINAL_HERCULES)
herc_set_attrib (attr);
else
#endif /* SUPPORT_HERCULES */
console_set_attrib (attr);
}
#endif /* ! STAGE1_5 */ #endif /* ! STAGE1_5 */
int int

143
stage2/hercules.c Normal file
View file

@ -0,0 +1,143 @@
/* hercules.c - hercules console interface */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifdef SUPPORT_HERCULES
#include <shared.h>
#include <hercules.h>
/* The position of the cursor. */
static unsigned hercx, hercy;
/* Write a byte to a port. */
static inline void
outb (unsigned short port, unsigned char value)
{
asm volatile ("outb %b0, %w1" : : "a" (value), "Nd" (port));
}
static void
herc_set_cursor (void)
{
unsigned offset = hercy * HERCULES_WIDTH + hercx;
outb (HERCULES_INDEX_REG, 0x0f);
outb (0x80, 0x0f);
outb (HERCULES_DATA_REG, offset & 0xFF);
outb (0x80, offset & 0xFF);
outb (HERCULES_INDEX_REG, 0x0e);
outb (0x80, 0x0e);
outb (HERCULES_DATA_REG, offset >> 8);
outb (0x80, offset >> 8);
}
void
herc_putchar (int c)
{
switch (c)
{
case '\b':
if (hercx)
hercx--;
break;
case '\n':
hercy++;
break;
case '\r':
hercx = 0;
break;
default:
{
volatile unsigned short *video
= (unsigned short *) HERCULES_VIDEO_ADDR;
video[hercy * HERCULES_WIDTH + hercx] = 0x0700 | c;
hercx++;
if (hercx >= HERCULES_WIDTH)
{
hercx = 0;
hercy++;
}
}
break;
}
if (hercy >= HERCULES_HEIGHT)
{
int i;
volatile unsigned long *video = (unsigned long *) HERCULES_VIDEO_ADDR;
hercy = HERCULES_HEIGHT - 1;
grub_memmove ((char *) HERCULES_VIDEO_ADDR,
(char *) HERCULES_VIDEO_ADDR + HERCULES_WIDTH * 2,
HERCULES_WIDTH * (HERCULES_HEIGHT - 1) * 2);
for (i = HERCULES_WIDTH * (HERCULES_HEIGHT - 1) / 2;
i < HERCULES_WIDTH * HERCULES_HEIGHT / 2;
i++)
video[i] = 0x07200720;
}
}
void
herc_cls (void)
{
int i;
volatile unsigned long *video = (unsigned long *) HERCULES_VIDEO_ADDR;
for (i = 0; i < HERCULES_WIDTH * HERCULES_HEIGHT / 2; i++)
video[i] = 0x07200720;
hercx = hercy = 0;
herc_set_cursor ();
}
int
herc_getxy (void)
{
return (hercx << 8) | hercy;
}
void
herc_gotoxy (int x, int y)
{
hercx = x;
hercy = y;
herc_set_cursor ();
}
void
herc_set_attrib (int attr)
{
volatile unsigned char *video = (unsigned char *) HERCULES_VIDEO_ADDR;
if (attr & 0xF0)
attr = 0x70;
else
attr = 0x07;
video[((hercy * HERCULES_WIDTH + hercx) << 1) + 1] = attr;
}
#endif /* SUPPORT_HERCULES */

38
stage2/hercules.h Normal file
View file

@ -0,0 +1,38 @@
/* hercules.h - hercules console interface */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2001 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#ifndef GRUB_HERCULES_HEADER
#define GRUB_HERCULES_HEADER 1
/* Macros. */
#define HERCULES_VIDEO_ADDR RAW_ADDR (0xB0000)
#define HERCULES_WIDTH 80
#define HERCULES_HEIGHT 25
#define HERCULES_INDEX_REG 0x3b4
#define HERCULES_DATA_REG 0x3b5
/* Functions. */
void herc_putchar (int c);
void herc_cls (void);
int herc_getxy (void);
void herc_gotoxy (int x, int y);
void herc_set_attrib (int attr);
#endif /* ! GRUB_HERCULES_HEADER */

View file

@ -808,6 +808,9 @@ int console_checkkey (void);
constants defined above. */ constants defined above. */
void set_attrib (int attr); void set_attrib (int attr);
/* The console part of set_attrib. */
void console_set_attrib (int attr);
/* Low-level disk I/O */ /* Low-level disk I/O */
int get_diskinfo (int drive, struct geometry *geometry); int get_diskinfo (int drive, struct geometry *geometry);
int biosdisk (int subfunc, int drive, struct geometry *geometry, int biosdisk (int subfunc, int drive, struct geometry *geometry,
@ -867,6 +870,7 @@ extern int terminal;
#define TERMINAL_CONSOLE (1 << 0) /* keyboard and screen */ #define TERMINAL_CONSOLE (1 << 0) /* keyboard and screen */
#define TERMINAL_SERIAL (1 << 1) /* serial console */ #define TERMINAL_SERIAL (1 << 1) /* serial console */
#define TERMINAL_HERCULES (1 << 2) /* hercules */
#define TERMINAL_DUMB (1 << 16) /* dumb terminal */ #define TERMINAL_DUMB (1 << 16) /* dumb terminal */

View file

@ -1,7 +1,7 @@
/* /*
* GRUB -- GRand Unified Bootloader * GRUB -- GRand Unified Bootloader
* Copyright (C) 1996 Erich Boleyn <erich@uruk.org> * Copyright (C) 1996 Erich Boleyn <erich@uruk.org>
* Copyright (C) 2000 Free Software Foundation, Inc. * Copyright (C) 2000, 2001 Free Software Foundation, Inc.
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -164,7 +164,11 @@ print_border (int y, int size)
#ifndef GRUB_UTIL #ifndef GRUB_UTIL
/* Color the menu. The menu is 75 * 14 characters. */ /* Color the menu. The menu is 75 * 14 characters. */
# ifdef SUPPORT_SERIAL # ifdef SUPPORT_SERIAL
if (terminal & TERMINAL_CONSOLE) if ((terminal & TERMINAL_CONSOLE)
# ifdef SUPPORT_HERCULES
|| (terminal & TERMINAL_HERCULES)
# endif
)
# endif # endif
{ {
for (i = 0; i < 14; i++) for (i = 0; i < 14; i++)
@ -387,7 +391,11 @@ restart:
disp_down = ACS_DARROW; disp_down = ACS_DARROW;
#else /* ! GRUB_UTIL */ #else /* ! GRUB_UTIL */
# ifdef SUPPORT_SERIAL # ifdef SUPPORT_SERIAL
if (terminal & TERMINAL_CONSOLE) if ((terminal & TERMINAL_CONSOLE)
# ifdef SUPPORT_HERCULES
|| (terminal & TERMINAL_HERCULES)
# endif /* SUPPORT_HERCULES */
)
{ {
disp_up = DISP_UP; disp_up = DISP_UP;
disp_down = DISP_DOWN; disp_down = DISP_DOWN;