From 84f224a0d7f8196439fac397286a770a047a40e9 Mon Sep 17 00:00:00 2001 From: okuji Date: Fri, 5 May 2000 11:31:43 +0000 Subject: [PATCH] fix a bug in init_bios_info. --- ChangeLog | 7 ++ aclocal.m4 | 67 ++++++++++++------- configure | 169 +++++++++++++++++++++++------------------------- netboot/compile | 12 ++-- stage2/common.c | 6 +- stage2/compile | 12 ++-- 6 files changed, 147 insertions(+), 126 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2d934c727..b2da87e00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-05-05 OKUJI Yoshinori + + * stage2/common.c (init_bios_info) [!STAGE1_5]: When the memory + map is present, search the maximum for MEMTMP in bytes instead + of kilobytes and set EXTENDED_MEMORY to MEMTMP minus 1MB in + kilobytes. + 2000-05-05 OKUJI Yoshinori Ignore any memory holes when passing the maximum memory address diff --git a/aclocal.m4 b/aclocal.m4 index 0224301ad..e46577074 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -300,29 +300,46 @@ AC_MSG_RESULT([$grub_cv_check_uscore_end_symbol]) # some checks are only needed if your package does certain things. # But this isn't really a big deal. -# serial 1 +# serial 2 -dnl Usage: -dnl AM_INIT_AUTOMAKE(package,version, [no-define]) +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED. +# The purpose of this macro is to provide the user with a means to +# check macros which are provided without letting her know how the +# information is coded. +# If this macro is not defined by Autoconf, define it here. +ifdef([AC_PROVIDE_IFELSE], + [], + [define([AC_PROVIDE_IFELSE], + [ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + +# AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE]) +# ---------------------------------------------- AC_DEFUN(AM_INIT_AUTOMAKE, -[AC_REQUIRE([AC_PROG_INSTALL]) -dnl We require 2.13 because we rely on SHELL being computed by configure. -AC_PREREQ([2.13]) -PACKAGE=[$1] -AC_SUBST(PACKAGE) -VERSION=[$2] -AC_SUBST(VERSION) -dnl test to see if srcdir already configured +[dnl We require 2.13 because we rely on SHELL being computed by configure. +AC_PREREQ([2.13])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +# test to see if srcdir already configured if test "`CDPATH=: && cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi + +# Define the identity of the package. +PACKAGE=$1 +AC_SUBST(PACKAGE)dnl +VERSION=$2 +AC_SUBST(VERSION)dnl ifelse([$3],, -AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) -AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) -AC_REQUIRE([AM_SANITY_CHECK]) -AC_REQUIRE([AC_ARG_PROGRAM]) +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])]) + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake) @@ -332,14 +349,18 @@ AM_MISSING_PROG(AMTAR, tar) AM_MISSING_INSTALL_SH dnl We need awk for the "check" target. The system "awk" is bad on dnl some platforms. -AC_REQUIRE([AC_PROG_AWK]) -AC_REQUIRE([AC_PROG_MAKE_SET]) -AC_REQUIRE([AM_DEP_TRACK]) -AC_REQUIRE([AM_SET_DEPDIR]) -ifdef([AC_PROVIDE_AC_PROG_CC], [AM_DEPENDENCIES(CC)], [ - define([AC_PROG_CC], defn([AC_PROG_CC])[AM_DEPENDENCIES(CC)])]) -ifdef([AC_PROVIDE_AC_PROG_CXX], [AM_DEPENDENCIES(CXX)], [ - define([AC_PROG_CXX], defn([AC_PROG_CXX])[AM_DEPENDENCIES(CXX)])]) +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl +AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_PROVIDE_IFELSE([AC_PROG_CC], + [AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[AM_DEPENDENCIES(CXX)])])dnl ]) # diff --git a/configure b/configure index cb87b99b1..fb7034a83 100644 --- a/configure +++ b/configure @@ -866,16 +866,15 @@ else fi - - -PACKAGE=grub - -VERSION=0.5.95 - +# test to see if srcdir already configured if test "`CDPATH=: && cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } fi + +# Define the identity of the package. +PACKAGE=grub +VERSION=0.5.95 cat >> confdefs.h <> confdefs.h <&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:944: checking host system type" >&5 +echo "configure:935: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -974,7 +965,7 @@ esac # echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 -echo "configure:978: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo "configure:969: 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" @@ -1000,7 +991,7 @@ if test "x$enable_maintainer_mode" = xyes; then # 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:1004: checking for $ac_word" >&5 +echo "configure:995: 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 @@ -1047,7 +1038,7 @@ fi # echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:1051: checking build system type" >&5 +echo "configure:1042: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -1073,7 +1064,7 @@ fi # 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:1077: checking for $ac_word" >&5 +echo "configure:1068: 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 @@ -1105,7 +1096,7 @@ fi # 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:1109: checking for $ac_word" >&5 +echo "configure:1100: 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 @@ -1135,7 +1126,7 @@ if test -z "$CC"; then # 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:1139: checking for $ac_word" >&5 +echo "configure:1130: 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 @@ -1186,7 +1177,7 @@ fi # 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:1190: checking for $ac_word" >&5 +echo "configure:1181: 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 @@ -1218,7 +1209,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1222: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1213: 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. @@ -1229,12 +1220,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1233 "configure" +#line 1224 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1229: \"$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 @@ -1260,12 +1251,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; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1264: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1255: 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:1269: checking whether we are using GNU C" >&5 +echo "configure:1260: 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 @@ -1274,7 +1265,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1278: \"$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:1269: \"$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 @@ -1293,7 +1284,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1297: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1288: 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 @@ -1326,7 +1317,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1330: checking how to run the C preprocessor" >&5 +echo "configure:1321: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1341,13 +1332,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1342: \"$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 : @@ -1358,13 +1349,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1368: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1359: \"$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 : @@ -1375,13 +1366,13 @@ else rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1376: \"$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 : @@ -1414,7 +1405,7 @@ echo "$ac_t""$CPP" 1>&6 depcc="$CC" depcpp="$CPP" echo $ac_n "checking dependency style of $depcc""... $ac_c" 1>&6 -echo "configure:1418: checking dependency style of $depcc" >&5 +echo "configure:1409: 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 @@ -1470,7 +1461,7 @@ if test "x$with_binutils" != x; then # 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:1474: checking for $ac_word" >&5 +echo "configure:1465: 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 @@ -1507,7 +1498,7 @@ else # 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:1511: checking for $ac_word" >&5 +echo "configure:1502: 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 @@ -1547,7 +1538,7 @@ if test "x$ac_cv_prog_gcc" = xyes; then STAGE1_CFLAGS="-O2" GRUB_CFLAGS="-O2" echo $ac_n "checking whether optimization for size works""... $ac_c" 1>&6 -echo "configure:1551: checking whether optimization for size works" >&5 +echo "configure:1542: 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 @@ -1555,14 +1546,14 @@ else saved_CFLAGS=$CFLAGS CFLAGS="-Os -g" cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* size_flag=yes else @@ -1596,7 +1587,7 @@ if test "x$with_binutils" != x; then # 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:1600: checking for $ac_word" >&5 +echo "configure:1591: 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 @@ -1632,7 +1623,7 @@ else # 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:1636: checking for $ac_word" >&5 +echo "configure:1627: 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 @@ -1666,7 +1657,7 @@ fi # Defined in acinclude.m4. echo $ac_n "checking if C symbols get an underscore after compilation""... $ac_c" 1>&6 -echo "configure:1670: checking if C symbols get an underscore after compilation" >&5 +echo "configure:1661: 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 @@ -1679,7 +1670,7 @@ func (int *list) } EOF -if { ac_try='${CC-cc} ${CFLAGS} -S conftest.c'; { (eval echo configure:1683: \"$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:1674: \"$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; } @@ -1705,7 +1696,7 @@ fi 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:1709: checking whether ${OBJCOPY} works for absolute addresses" >&5 +echo "configure:1700: 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 @@ -1717,21 +1708,21 @@ cmain (void) } EOF -if { (eval echo configure:1721: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then : +if { (eval echo configure:1712: \"$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:1727: \"$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:1718: \"$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:1731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then : + if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1722: \"$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:1735: \"$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:1726: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then mv -f conftest conftest.old else grub_cv_prog_objcopy_absolute=no @@ -1748,7 +1739,7 @@ fi echo $ac_n "checking whether addr32 must be in the same line as the instruction""... $ac_c" 1>&6 -echo "configure:1752: checking whether addr32 must be in the same line as the instruction" >&5 +echo "configure:1743: 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 @@ -1757,7 +1748,7 @@ else l1: addr32 movb %al, l1 EOF -if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1761: \"$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:1752: \"$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 @@ -1789,7 +1780,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 "configure:1793: checking for .code16 addr32 assembler support" >&5 +echo "configure:1784: 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 @@ -1804,7 +1795,7 @@ else sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s fi -if { ac_try='${CC-cc} ${CFLAGS} -c conftest.s'; { (eval echo configure:1808: \"$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:1799: \"$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 @@ -1821,19 +1812,19 @@ fi echo $ac_n "checking if start is defined by the compiler""... $ac_c" 1>&6 -echo "configure:1825: checking if start is defined by the compiler" >&5 +echo "configure:1816: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1828: \"$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 @@ -1857,19 +1848,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 "configure:1861: checking if _start is defined by the compiler" >&5 +echo "configure:1852: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1864: \"$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 @@ -1898,19 +1889,19 @@ fi echo $ac_n "checking if __bss_start is defined by the compiler""... $ac_c" 1>&6 -echo "configure:1902: checking if __bss_start is defined by the compiler" >&5 +echo "configure:1893: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1905: \"$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 @@ -1934,19 +1925,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 "configure:1938: checking if _edata is defined by the compiler" >&5 +echo "configure:1929: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1941: \"$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 @@ -1970,19 +1961,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 "configure:1974: checking if edata is defined by the compiler" >&5 +echo "configure:1965: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1977: \"$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 @@ -2012,19 +2003,19 @@ fi echo $ac_n "checking if end is defined by the compiler""... $ac_c" 1>&6 -echo "configure:2016: checking if end is defined by the compiler" >&5 +echo "configure:2007: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2019: \"$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 @@ -2048,19 +2039,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 "configure:2052: checking if _end is defined by the compiler" >&5 +echo "configure:2043: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2055: \"$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 @@ -2098,7 +2089,7 @@ fi # 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:2102: checking for opendisk in -lutil" >&5 +echo "configure:2093: 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 @@ -2106,7 +2097,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lutil $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2112: \"$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 @@ -2145,7 +2136,7 @@ fi # 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:2149: checking for wgetch in -lncurses" >&5 +echo "configure:2140: 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 @@ -2153,7 +2144,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lncurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2159: \"$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 @@ -2187,7 +2178,7 @@ EOF else echo "$ac_t""no" 1>&6 echo $ac_n "checking for wgetch in -lcurses""... $ac_c" 1>&6 -echo "configure:2191: checking for wgetch in -lcurses" >&5 +echo "configure:2182: 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 @@ -2195,7 +2186,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcurses $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2201: \"$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 @@ -2241,17 +2232,17 @@ for ac_hdr in string.h strings.h ncurses/curses.h ncurses.h curses.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2245: checking for $ac_hdr" >&5 +echo "configure:2236: 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 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2246: \"$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* diff --git a/netboot/compile b/netboot/compile index 7da75ce41..1a7993927 100644 --- a/netboot/compile +++ b/netboot/compile @@ -2,7 +2,7 @@ # Wrapper for compilers which do not understand `-c -o'. -# Copyright (C) 1999 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -23,7 +23,7 @@ # compile PROGRAM [ARGS]... # `-o FOO.o' is removed from the args passed to the actual compile. -prog="$1" +prog=$1 shift ofile= @@ -32,11 +32,11 @@ args= while test $# -gt 0; do case "$1" in -o) - ofile="$2" + ofile=$2 shift ;; *.c) - cfile="$1" + cfile=$1 args="$args $1" ;; *) @@ -57,10 +57,10 @@ test -z "$cfile" && { } # Name of file we expect compiler to create. -cofile="`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`" +cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. -lockdir="`echo $ofile | sed -e 's|/|_|g'`" +lockdir=`echo $ofile | sed -e 's|/|_|g'` while true; do if mkdir $lockdir > /dev/null 2>&1; then break diff --git a/stage2/common.c b/stage2/common.c index c3ab10f1d..54ff004da 100644 --- a/stage2/common.c +++ b/stage2/common.c @@ -194,9 +194,11 @@ init_bios_info (void) if (desc->BaseAddrHigh == 0 && desc->Type == MB_ARD_MEMORY - && desc->BaseAddrLow + desc->LengthLow > extended_memory) - extended_memory = desc->BaseAddrLow + desc->LengthLow; + && desc->BaseAddrLow + desc->LengthLow > memtmp) + memtmp = desc->BaseAddrLow + desc->LengthLow; } + + extended_memory = (memtmp - 0x100000) >> 10; } else if ((memtmp = get_eisamemsize ()) != -1) { diff --git a/stage2/compile b/stage2/compile index 7da75ce41..1a7993927 100644 --- a/stage2/compile +++ b/stage2/compile @@ -2,7 +2,7 @@ # Wrapper for compilers which do not understand `-c -o'. -# Copyright (C) 1999 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify @@ -23,7 +23,7 @@ # compile PROGRAM [ARGS]... # `-o FOO.o' is removed from the args passed to the actual compile. -prog="$1" +prog=$1 shift ofile= @@ -32,11 +32,11 @@ args= while test $# -gt 0; do case "$1" in -o) - ofile="$2" + ofile=$2 shift ;; *.c) - cfile="$1" + cfile=$1 args="$args $1" ;; *) @@ -57,10 +57,10 @@ test -z "$cfile" && { } # Name of file we expect compiler to create. -cofile="`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`" +cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. -lockdir="`echo $ofile | sed -e 's|/|_|g'`" +lockdir=`echo $ofile | sed -e 's|/|_|g'` while true; do if mkdir $lockdir > /dev/null 2>&1; then break