cleanups for low level disk I/O and a minor bug fix
This commit is contained in:
parent
08ca05f500
commit
0daef3e856
21 changed files with 6741 additions and 741 deletions
64
ChangeLog
64
ChangeLog
|
@ -1,3 +1,67 @@
|
|||
1999-04-09 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||
|
||||
* shared_src/asm.S (get_diskinfo_floppy): Correct the number of heads
|
||||
and the one of cylinders.
|
||||
|
||||
1999-04-06 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||
|
||||
* grub/asmstub.c (get_diskinfo): Compute the total number of sectors
|
||||
for DRIVE.
|
||||
|
||||
* shared_src/asm.S (get_diskinfo_standard): Clear the data segment
|
||||
after calling int 0x13. Restore the base pointer after returning
|
||||
to protected mode.
|
||||
(get_diskinfo_floppy): Likewise.
|
||||
|
||||
* shared_src/bios.c (get_diskinfo): Always set the size of DRP to
|
||||
the max size of DRP, regardless of the major version of extensions.
|
||||
|
||||
1999-04-03 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||
|
||||
* shared_src/shared.h (struct geometry): Declare total_sectors as
|
||||
unsigned long instead of unsigned long long, because GRUB represents
|
||||
a sector number by 4bytes integer, so it doesn't make sense.
|
||||
|
||||
* shared_src/bios.c (biosdisk) [!NO_INT13_FALLBACK]: Recompute
|
||||
TOTAL_SECTORS according to CHS information.
|
||||
(get_diskinfo) [DEBUG]: Print the geometry of DRIVE.
|
||||
|
||||
* shared_src/disk_io.c (real_open_partition): Set PART_LENGTH to
|
||||
BUF_GEOM.TOTAL_SECTORS.
|
||||
|
||||
1999-04-01 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||
|
||||
* docs/texinfo.tex: Copied from automake-1.4a.
|
||||
|
||||
* configure.in (SHARED_SRC_RULES): Add bios into shared sources.
|
||||
|
||||
* e2fs_stage1_5/Makefile.am (e2fs_stage1_5_exec_LDADD): Added bios.o.
|
||||
* fat_stage1_5/Makefile.am (fat_stage1_5_exec_LDADD): Likewise.
|
||||
* ffs_stage1_5/Makefile.am (ffs_stage1_5_exec_LDADD): Likewise.
|
||||
* stage2/Makefile.am (stage2_exec_LDADD): Likewise.
|
||||
* stage2_debug/Makefile.am (stage2_debug_exec_LDADD): Likewise.
|
||||
|
||||
* shared_src/Makefile.am (EXTRA_DIST): Added bios.c.
|
||||
|
||||
* shared_src/asm.S (biosdisk): Deleted. Now defined in bios.c.
|
||||
(get_diskinfo): Likewise.
|
||||
(biosdisk_int13_extensions): New function.
|
||||
(biosdisk_standard): Likewise.
|
||||
(check_int13_extensions): Likewise.
|
||||
(get_diskinfo_int13_extensions): Likewise.
|
||||
(get_diskinfo_standard): Likewise.
|
||||
(get_diskinfo_floppy): Likewise.
|
||||
|
||||
* shared_src/bios.c: New file.
|
||||
|
||||
* shared_src/shared.h (struct geometry): Added new member,
|
||||
total_sectors.
|
||||
|
||||
1999-03-28 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
|
||||
|
||||
* shared_src/stage2.c (print_entries): Correctly assign MENU_ENTRIES
|
||||
the entries starting from FIRST.
|
||||
|
||||
1999-03-27 Gordon Matzigkeit <gord@trick.fig.org>
|
||||
|
||||
* Change everything to use memset and memmove instead of bzero and
|
||||
|
|
36
aclocal.m4
vendored
36
aclocal.m4
vendored
|
@ -1,7 +1,7 @@
|
|||
dnl aclocal.m4 generated automatically by aclocal 1.3
|
||||
dnl aclocal.m4 generated automatically by aclocal 1.4a
|
||||
|
||||
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
dnl This Makefile.in is free software; the Free Software Foundation
|
||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
|
@ -128,7 +128,9 @@ dnl Usage:
|
|||
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
|
||||
|
||||
AC_DEFUN(AM_INIT_AUTOMAKE,
|
||||
[AC_REQUIRE([AM_PROG_INSTALL])
|
||||
[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]
|
||||
|
@ -138,8 +140,8 @@ if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
|
|||
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
|
||||
fi
|
||||
ifelse([$3],,
|
||||
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
|
||||
AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
|
||||
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])
|
||||
dnl FIXME This is truly gross.
|
||||
|
@ -149,17 +151,21 @@ AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
|
|||
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
|
||||
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
|
||||
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
|
||||
dnl We check for tar when the user configures the end package.
|
||||
dnl This is sad, since we only need this for "dist". However,
|
||||
dnl there's no other good way to do it. We prefer GNU tar if
|
||||
dnl we can find it. If we can't find a tar, it doesn't really matter.
|
||||
AC_CHECK_PROGS(TAR, gnutar gtar tar)
|
||||
AMTARFLAGS=
|
||||
if test -n "$TAR"; then
|
||||
if $SHELL -c "$TAR --version" > /dev/null 2>&1; then
|
||||
dnl We have GNU tar.
|
||||
AMTARFLAGS=o
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(AMTARFLAGS)
|
||||
AC_REQUIRE([AC_PROG_MAKE_SET])])
|
||||
|
||||
|
||||
# serial 1
|
||||
|
||||
AC_DEFUN(AM_PROG_INSTALL,
|
||||
[AC_REQUIRE([AC_PROG_INSTALL])
|
||||
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
|
||||
AC_SUBST(INSTALL_SCRIPT)dnl
|
||||
])
|
||||
|
||||
#
|
||||
# Check to make sure that the build environment is sane.
|
||||
#
|
||||
|
|
259
configure
vendored
259
configure
vendored
|
@ -1,7 +1,7 @@
|
|||
#! /bin/sh
|
||||
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated automatically using autoconf version 2.12
|
||||
# Generated automatically using autoconf version 2.13
|
||||
# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
|
||||
#
|
||||
# This configure script is free software; the Free Software Foundation
|
||||
|
@ -53,6 +53,7 @@ mandir='${prefix}/man'
|
|||
# Initialize some other variables.
|
||||
subdirs=
|
||||
MFLAGS= MAKEFLAGS=
|
||||
SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
# Maximum number of lines to put in a shell here document.
|
||||
ac_max_here_lines=12
|
||||
|
||||
|
@ -336,7 +337,7 @@ EOF
|
|||
verbose=yes ;;
|
||||
|
||||
-version | --version | --versio | --versi | --vers)
|
||||
echo "configure generated by autoconf version 2.12"
|
||||
echo "configure generated by autoconf version 2.13"
|
||||
exit 0 ;;
|
||||
|
||||
-with-* | --with-*)
|
||||
|
@ -506,9 +507,11 @@ ac_ext=c
|
|||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
||||
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
ac_exeext=
|
||||
ac_objext=o
|
||||
if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
|
||||
# Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
|
||||
if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
|
||||
|
@ -548,28 +551,30 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
|
|||
# SunOS /usr/etc/install
|
||||
# IRIX /sbin/install
|
||||
# AIX /bin/install
|
||||
# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
|
||||
# AFS /usr/afsws/bin/install, which mishandles nonexistent args
|
||||
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
|
||||
# ./install, which can be erroneously created by make from ./install.sh.
|
||||
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
|
||||
echo "configure:556: checking for a BSD compatible install" >&5
|
||||
echo "configure:560: checking for a BSD compatible install" >&5
|
||||
if test -z "$INSTALL"; then
|
||||
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
|
||||
IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
|
||||
for ac_dir in $PATH; do
|
||||
# Account for people who put trailing slashes in PATH elements.
|
||||
case "$ac_dir/" in
|
||||
/|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
|
||||
*)
|
||||
# OSF1 and SCO ODT 3.0 have their own names for install.
|
||||
for ac_prog in ginstall installbsd scoinst install; do
|
||||
# Don't use installbsd from OSF since it installs stuff as root
|
||||
# by default.
|
||||
for ac_prog in ginstall scoinst install; do
|
||||
if test -f $ac_dir/$ac_prog; then
|
||||
if test $ac_prog = install &&
|
||||
grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
|
||||
# AIX install. It has an incompatible calling convention.
|
||||
# OSF/1 installbsd also uses dspmsg, but is usable.
|
||||
:
|
||||
else
|
||||
ac_cv_path_install="$ac_dir/$ac_prog -c"
|
||||
|
@ -599,13 +604,12 @@ echo "$ac_t""$INSTALL" 1>&6
|
|||
# It thinks the first close brace ends the variable substitution.
|
||||
test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
|
||||
|
||||
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
||||
|
||||
|
||||
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
|
||||
|
||||
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
|
||||
|
||||
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
|
||||
echo "configure:609: checking whether build environment is sane" >&5
|
||||
echo "configure:613: checking whether build environment is sane" >&5
|
||||
# Just in case
|
||||
sleep 1
|
||||
echo timestamp > conftestfile
|
||||
|
@ -662,7 +666,7 @@ test "$program_suffix" != NONE &&
|
|||
test "$program_transform_name" = "" && program_transform_name="s,x,x,"
|
||||
|
||||
echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
|
||||
echo "configure:666: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
||||
echo "configure:670: checking whether ${MAKE-make} sets \${MAKE}" >&5
|
||||
set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -689,6 +693,7 @@ else
|
|||
fi
|
||||
|
||||
|
||||
|
||||
PACKAGE=grub
|
||||
|
||||
|
||||
|
@ -710,7 +715,7 @@ EOF
|
|||
|
||||
missing_dir=`cd $ac_aux_dir && pwd`
|
||||
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
|
||||
echo "configure:714: checking for working aclocal" >&5
|
||||
echo "configure:719: checking for working aclocal" >&5
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
|
@ -723,7 +728,7 @@ else
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
|
||||
echo "configure:727: checking for working autoconf" >&5
|
||||
echo "configure:732: checking for working autoconf" >&5
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
|
@ -736,7 +741,7 @@ else
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for working automake""... $ac_c" 1>&6
|
||||
echo "configure:740: checking for working automake" >&5
|
||||
echo "configure:745: checking for working automake" >&5
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
|
@ -749,7 +754,7 @@ else
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
|
||||
echo "configure:753: checking for working autoheader" >&5
|
||||
echo "configure:758: checking for working autoheader" >&5
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
|
@ -762,7 +767,7 @@ else
|
|||
fi
|
||||
|
||||
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
|
||||
echo "configure:766: checking for working makeinfo" >&5
|
||||
echo "configure:771: checking for working makeinfo" >&5
|
||||
# Run test in a subshell; some versions of sh will print an error if
|
||||
# an executable is not found, even if stderr is redirected.
|
||||
# Redirect stdin to placate older versions of autoconf. Sigh.
|
||||
|
@ -774,30 +779,71 @@ else
|
|||
echo "$ac_t""missing" 1>&6
|
||||
fi
|
||||
|
||||
for ac_prog in gnutar gtar tar
|
||||
do
|
||||
# Extract the first word of "$ac_prog", so it can be a program name with args.
|
||||
set dummy $ac_prog; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:788: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$TAR"; then
|
||||
ac_cv_prog_TAR="$TAR" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
ac_dummy="$PATH"
|
||||
for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_TAR="$ac_prog"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
fi
|
||||
fi
|
||||
TAR="$ac_cv_prog_TAR"
|
||||
if test -n "$TAR"; then
|
||||
echo "$ac_t""$TAR" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
test -n "$TAR" && break
|
||||
done
|
||||
|
||||
AMTARFLAGS=
|
||||
if test -n "$TAR"; then
|
||||
if $SHELL -c "$TAR --version" > /dev/null 2>&1; then
|
||||
AMTARFLAGS=o
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# Make sure we can run config.sub.
|
||||
if $ac_config_sub sun4 >/dev/null 2>&1; then :
|
||||
if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
|
||||
else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking host system type""... $ac_c" 1>&6
|
||||
echo "configure:787: checking host system type" >&5
|
||||
echo "configure:833: checking host system type" >&5
|
||||
|
||||
host_alias=$host
|
||||
case "$host_alias" in
|
||||
NONE)
|
||||
case $nonopt in
|
||||
NONE)
|
||||
if host_alias=`$ac_config_guess`; then :
|
||||
if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
|
||||
else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
|
||||
fi ;;
|
||||
*) host_alias=$nonopt ;;
|
||||
esac ;;
|
||||
esac
|
||||
|
||||
host=`$ac_config_sub $host_alias`
|
||||
host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
|
||||
host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
@ -838,7 +884,7 @@ fi
|
|||
#
|
||||
|
||||
echo $ac_n "checking build system type""... $ac_c" 1>&6
|
||||
echo "configure:842: checking build system type" >&5
|
||||
echo "configure:888: checking build system type" >&5
|
||||
|
||||
build_alias=$build
|
||||
case "$build_alias" in
|
||||
|
@ -849,7 +895,7 @@ NONE)
|
|||
esac ;;
|
||||
esac
|
||||
|
||||
build=`$ac_config_sub $build_alias`
|
||||
build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
|
||||
build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
|
||||
build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
|
||||
build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
|
||||
|
@ -864,15 +910,16 @@ 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:868: checking for $ac_word" >&5
|
||||
echo "configure:914: 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
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
ac_dummy="$PATH"
|
||||
for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_CC="${ac_tool_prefix}gcc"
|
||||
|
@ -895,15 +942,16 @@ 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:899: checking for $ac_word" >&5
|
||||
echo "configure:946: 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
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
ac_dummy="$PATH"
|
||||
for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_CC="gcc"
|
||||
|
@ -924,16 +972,17 @@ 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:928: checking for $ac_word" >&5
|
||||
echo "configure:976: 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
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
ac_prog_rejected=no
|
||||
for ac_dir in $PATH; do
|
||||
ac_dummy="$PATH"
|
||||
for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
|
||||
|
@ -968,25 +1017,61 @@ else
|
|||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
|
||||
if test -z "$CC"; then
|
||||
case "`uname -s`" in
|
||||
*win32* | *WIN32*)
|
||||
# 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:1027: 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
|
||||
if test -n "$CC"; then
|
||||
ac_cv_prog_CC="$CC" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
ac_dummy="$PATH"
|
||||
for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_CC="cl"
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS="$ac_save_ifs"
|
||||
fi
|
||||
fi
|
||||
CC="$ac_cv_prog_CC"
|
||||
if test -n "$CC"; then
|
||||
echo "$ac_t""$CC" 1>&6
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
|
||||
echo "configure:976: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
|
||||
echo "configure:1059: 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.
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
||||
ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 986 "configure"
|
||||
cat > conftest.$ac_ext << EOF
|
||||
|
||||
#line 1070 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
main(){return(0);}
|
||||
EOF
|
||||
if { (eval echo configure:990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1075: \"$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
|
||||
|
@ -1000,18 +1085,24 @@ else
|
|||
ac_cv_prog_cc_works=no
|
||||
fi
|
||||
rm -fr conftest*
|
||||
ac_ext=c
|
||||
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
|
||||
ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
|
||||
cross_compiling=$ac_cv_prog_cc_cross
|
||||
|
||||
echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
|
||||
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:1010: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
|
||||
echo "configure:1101: 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:1015: checking whether we are using GNU C" >&5
|
||||
echo "configure:1106: 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
|
||||
|
@ -1020,7 +1111,7 @@ else
|
|||
yes;
|
||||
#endif
|
||||
EOF
|
||||
if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1024: \"$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:1115: \"$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
|
||||
|
@ -1031,11 +1122,15 @@ echo "$ac_t""$ac_cv_prog_gcc" 1>&6
|
|||
|
||||
if test $ac_cv_prog_gcc = yes; then
|
||||
GCC=yes
|
||||
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:1039: checking whether ${CC-cc} accepts -g" >&5
|
||||
else
|
||||
GCC=
|
||||
fi
|
||||
|
||||
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:1134: 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
|
||||
|
@ -1050,16 +1145,20 @@ rm -f conftest*
|
|||
fi
|
||||
|
||||
echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
if test "$ac_test_CFLAGS" = set; then
|
||||
CFLAGS="$ac_save_CFLAGS"
|
||||
elif test $ac_cv_prog_cc_g = yes; then
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="-g -O2"
|
||||
else
|
||||
CFLAGS="-O2"
|
||||
CFLAGS="-g"
|
||||
fi
|
||||
else
|
||||
GCC=
|
||||
test "${CFLAGS+set}" = set || CFLAGS="-g"
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="-O2"
|
||||
else
|
||||
CFLAGS=
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
|
@ -1069,15 +1168,16 @@ CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused"
|
|||
# Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}ld; ac_word=$2
|
||||
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
|
||||
echo "configure:1073: checking for $ac_word" >&5
|
||||
echo "configure:1172: checking for $ac_word" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test -n "$LD"; then
|
||||
ac_cv_prog_LD="$LD" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
ac_dummy="$PATH"
|
||||
for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_LD="${ac_tool_prefix}ld"
|
||||
|
@ -1100,15 +1200,16 @@ fi
|
|||
# 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:1104: checking for $ac_word" >&5
|
||||
echo "configure:1204: 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
|
||||
if test -n "$OBJCOPY"; then
|
||||
ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
|
||||
else
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
|
||||
for ac_dir in $PATH; do
|
||||
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
|
||||
ac_dummy="$PATH"
|
||||
for ac_dir in $ac_dummy; do
|
||||
test -z "$ac_dir" && ac_dir=.
|
||||
if test -f $ac_dir/$ac_word; then
|
||||
ac_cv_prog_OBJCOPY="${ac_tool_prefix}objcopy"
|
||||
|
@ -1132,7 +1233,7 @@ fi
|
|||
# Defined in acinclude.m4.
|
||||
|
||||
echo $ac_n "checking symbol names produced by ${CC-cc}""... $ac_c" 1>&6
|
||||
echo "configure:1136: checking symbol names produced by ${CC-cc}" >&5
|
||||
echo "configure:1237: checking symbol names produced by ${CC-cc}" >&5
|
||||
if eval "test \"`echo '$''{'grub_cv_asm_ext_c'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
@ -1145,7 +1246,7 @@ func (int *list)
|
|||
}
|
||||
EOF
|
||||
|
||||
if { ac_try='${CC-cc} -S conftest.c'; { (eval echo configure:1149: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then :
|
||||
if { ac_try='${CC-cc} -S conftest.c'; { (eval echo configure:1250: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then :
|
||||
else
|
||||
{ echo "configure: error: ${CC-cc} failed to produce assembly code" 1>&2; exit 1; }
|
||||
fi
|
||||
|
@ -1173,7 +1274,7 @@ EOF
|
|||
|
||||
|
||||
echo $ac_n "checking whether ${OBJCOPY} works for absolute addresses""... $ac_c" 1>&6
|
||||
echo "configure:1177: checking whether ${OBJCOPY} works for absolute addresses" >&5
|
||||
echo "configure:1278: 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
|
||||
|
@ -1185,21 +1286,21 @@ blah (void)
|
|||
}
|
||||
EOF
|
||||
|
||||
if { (eval echo configure:1189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then :
|
||||
if { (eval echo configure:1290: \"$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='${LD-ld} -N -Ttext $link_addr conftest.o -o conftest.exec'; { (eval echo configure:1195: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
|
||||
if { ac_try='${LD-ld} -N -Ttext $link_addr conftest.o -o conftest.exec'; { (eval echo configure:1296: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
|
||||
else
|
||||
{ echo "configure: error: ${LD-ld} cannot link at address $link_addr" 1>&2; exit 1; }
|
||||
fi
|
||||
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
|
||||
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1300: \"$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:1203: \"$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:1304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
|
||||
mv -f conftest conftest.old
|
||||
else
|
||||
grub_cv_prog_objcopy_absolute=no
|
||||
|
@ -1216,7 +1317,7 @@ fi
|
|||
|
||||
|
||||
echo $ac_n "checking for .code16 addr32 assembler support""... $ac_c" 1>&6
|
||||
echo "configure:1220: checking for .code16 addr32 assembler support" >&5
|
||||
echo "configure:1321: 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
|
||||
|
@ -1226,7 +1327,7 @@ l1: addr32
|
|||
movb %al, l1
|
||||
EOF
|
||||
|
||||
if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1230: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
|
||||
if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1331: \"$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
|
||||
|
@ -1242,7 +1343,7 @@ fi
|
|||
# Check for curses libraries if we are building /sbin/grub.
|
||||
if test -n "$sbingrub"; then
|
||||
echo $ac_n "checking for getch in -lncurses""... $ac_c" 1>&6
|
||||
echo "configure:1246: checking for getch in -lncurses" >&5
|
||||
echo "configure:1347: checking for getch in -lncurses" >&5
|
||||
ac_lib_var=`echo ncurses'_'getch | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -1250,7 +1351,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lncurses $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1254 "configure"
|
||||
#line 1355 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -1261,7 +1362,7 @@ int main() {
|
|||
getch()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1366: \"$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
|
||||
|
@ -1284,7 +1385,7 @@ EOF
|
|||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
echo $ac_n "checking for getch in -lcurses""... $ac_c" 1>&6
|
||||
echo "configure:1288: checking for getch in -lcurses" >&5
|
||||
echo "configure:1389: checking for getch in -lcurses" >&5
|
||||
ac_lib_var=`echo curses'_'getch | sed 'y%./+-%__p_%'`
|
||||
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
|
@ -1292,7 +1393,7 @@ else
|
|||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lcurses $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1296 "configure"
|
||||
#line 1397 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
|
@ -1303,7 +1404,7 @@ int main() {
|
|||
getch()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:1307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
if { (eval echo configure:1408: \"$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
|
||||
|
@ -1347,7 +1448,7 @@ asm.o: \$(top_srcdir)/shared_src/asm.S
|
|||
fi
|
||||
EOF
|
||||
for f in boot common char_io cmdline disk_io gunzip fsys_ffs \
|
||||
fsys_ext2fs fsys_fat stage1_5 stage2; do
|
||||
fsys_ext2fs fsys_fat stage1_5 stage2 bios; do
|
||||
|
||||
cat >> $SHARED_SRC_RULES <<EOF
|
||||
|
||||
|
@ -1385,7 +1486,7 @@ EOF
|
|||
# Ultrix sh set writes to stderr and can't be redirected directly,
|
||||
# and sets the high bit in the cache file unless we assign to the vars.
|
||||
(set) 2>&1 |
|
||||
case `(ac_space=' '; set) 2>&1` in
|
||||
case `(ac_space=' '; set | grep ac_space) 2>&1` in
|
||||
*ac_space=\ *)
|
||||
# `set' does not quote correctly, so add quotes (double-quote substitution
|
||||
# turns \\\\ into \\, and sed turns \\ into \).
|
||||
|
@ -1429,7 +1530,7 @@ trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
|
|||
# Protect against shell expansion while executing Makefile rules.
|
||||
# Protect against Makefile macro expansion.
|
||||
cat > conftest.defs <<\EOF
|
||||
s%#define \([^ ][^ ]*\) *\(.*\)%-D\1=\2%g
|
||||
s%#define \([A-Za-z_][^ ]*\) *\(.*\)%-D\1=\2%g
|
||||
s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
|
||||
s%\[%\\&%g
|
||||
s%\]%\\&%g
|
||||
|
@ -1464,7 +1565,7 @@ do
|
|||
echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
|
||||
exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
|
||||
-version | --version | --versio | --versi | --vers | --ver | --ve | --v)
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.12"
|
||||
echo "$CONFIG_STATUS generated by autoconf version 2.13"
|
||||
exit 0 ;;
|
||||
-help | --help | --hel | --he | --h)
|
||||
echo "\$ac_cs_usage"; exit 0 ;;
|
||||
|
@ -1487,9 +1588,11 @@ sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
|
|||
s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
|
||||
$ac_vpsub
|
||||
$extrasub
|
||||
s%@SHELL@%$SHELL%g
|
||||
s%@CFLAGS@%$CFLAGS%g
|
||||
s%@CPPFLAGS@%$CPPFLAGS%g
|
||||
s%@CXXFLAGS@%$CXXFLAGS%g
|
||||
s%@FFLAGS@%$FFLAGS%g
|
||||
s%@DEFS@%$DEFS%g
|
||||
s%@LDFLAGS@%$LDFLAGS%g
|
||||
s%@LIBS@%$LIBS%g
|
||||
|
@ -1509,8 +1612,8 @@ s%@oldincludedir@%$oldincludedir%g
|
|||
s%@infodir@%$infodir%g
|
||||
s%@mandir@%$mandir%g
|
||||
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
|
||||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
|
||||
s%@INSTALL_DATA@%$INSTALL_DATA%g
|
||||
s%@PACKAGE@%$PACKAGE%g
|
||||
s%@VERSION@%$VERSION%g
|
||||
s%@ACLOCAL@%$ACLOCAL%g
|
||||
|
@ -1518,6 +1621,8 @@ s%@AUTOCONF@%$AUTOCONF%g
|
|||
s%@AUTOMAKE@%$AUTOMAKE%g
|
||||
s%@AUTOHEADER@%$AUTOHEADER%g
|
||||
s%@MAKEINFO@%$MAKEINFO%g
|
||||
s%@TAR@%$TAR%g
|
||||
s%@AMTARFLAGS@%$AMTARFLAGS%g
|
||||
s%@SET_MAKE@%$SET_MAKE%g
|
||||
s%@host@%$host%g
|
||||
s%@host_alias@%$host_alias%g
|
||||
|
|
|
@ -94,7 +94,7 @@ asm.o: \$(top_srcdir)/shared_src/asm.S
|
|||
fi
|
||||
EOF
|
||||
for f in boot common char_io cmdline disk_io gunzip fsys_ffs \
|
||||
fsys_ext2fs fsys_fat stage1_5 stage2; do
|
||||
fsys_ext2fs fsys_fat stage1_5 stage2 bios; do
|
||||
|
||||
cat >> $SHARED_SRC_RULES <<EOF
|
||||
|
||||
|
|
5484
docs/texinfo.tex
Normal file
5484
docs/texinfo.tex
Normal file
File diff suppressed because it is too large
Load diff
|
@ -14,7 +14,7 @@ INCLUDES = -I$(top_srcdir)/shared_src
|
|||
|
||||
# asm.o absolutely needs to come first!
|
||||
e2fs_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o \
|
||||
stage1_5.o fsys_ext2fs.o
|
||||
stage1_5.o fsys_ext2fs.o bios.o
|
||||
|
||||
# FIXME: Automake hackery.
|
||||
DEP_FILES = .deps/dummy.P $(wildcard .deps/*.P)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -10,8 +10,7 @@
|
|||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
@ -32,7 +31,7 @@ mandir = @mandir@
|
|||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
|
@ -44,7 +43,7 @@ AUTOMAKE = @AUTOMAKE@
|
|||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
@ -57,17 +56,20 @@ PRE_UNINSTALL = :
|
|||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMTARFLAGS = @AMTARFLAGS@
|
||||
CC = @CC@
|
||||
LD = @LD@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJCOPY = @OBJCOPY@
|
||||
PACKAGE = @PACKAGE@
|
||||
TAR = @TAR@
|
||||
VERSION = @VERSION@
|
||||
host_cpu = @host_cpu@
|
||||
host_vendor = @host_vendor@
|
||||
sbingrub = @sbingrub@
|
||||
stage2debug = @stage2debug@
|
||||
|
||||
|
||||
IMPORTANT_SIZE_LIMIT = 7168
|
||||
|
||||
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
|
||||
|
@ -76,15 +78,13 @@ CLEANFILES = $(pkgdata_DATA) $(pkgdata_DATA)T
|
|||
noinst_PROGRAMS = e2fs_stage1_5.exec
|
||||
|
||||
# We can't use builtins or standard includes.
|
||||
COMPILE = $(CC) -fno-builtin -nostdinc -DFSYS_EXT2FS=1 -DNO_DECOMPRESSION=1 \
|
||||
-DSTAGE1_5=1 -DNO_BLOCK_FILES=1 \
|
||||
-DCONFIG_FILE_ASM='.string "/boot/grub/stage2"' \
|
||||
$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
COMPILE = $(CC) -fno-builtin -nostdinc -DFSYS_EXT2FS=1 -DNO_DECOMPRESSION=1 -DSTAGE1_5=1 -DNO_BLOCK_FILES=1 -DCONFIG_FILE_ASM='.string "/boot/grub/stage2"' $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/shared_src
|
||||
|
||||
# asm.o absolutely needs to come first!
|
||||
e2fs_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o \
|
||||
stage1_5.o fsys_ext2fs.o
|
||||
e2fs_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o stage1_5.o fsys_ext2fs.o bios.o
|
||||
|
||||
|
||||
# FIXME: Automake hackery.
|
||||
DEP_FILES = .deps/dummy.P $(wildcard .deps/*.P)
|
||||
|
@ -101,22 +101,21 @@ LDFLAGS = @LDFLAGS@
|
|||
LIBS = @LIBS@
|
||||
e2fs_stage1_5_exec_OBJECTS = dummy.o
|
||||
e2fs_stage1_5_exec_DEPENDENCIES = asm.o common.o char_io.o disk_io.o \
|
||||
stage1_5.o fsys_ext2fs.o
|
||||
stage1_5.o fsys_ext2fs.o bios.o
|
||||
e2fs_stage1_5_exec_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DATA = $(pkgdata_DATA)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
DIST_COMMON = $(pkgdata_DATA) Makefile.am Makefile.in
|
||||
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(e2fs_stage1_5_exec_SOURCES)
|
||||
OBJECTS = $(e2fs_stage1_5_exec_OBJECTS)
|
||||
|
||||
all: Makefile $(PROGRAMS) $(DATA)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
|
@ -174,8 +173,12 @@ uninstall-pkgdataDATA:
|
|||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
|
@ -208,9 +211,13 @@ distdir: $(DISTFILES)
|
|||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu e2fs_stage1_5/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
@ -222,83 +229,101 @@ mostlyclean-depend:
|
|||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).P -c $<
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
|
||||
< .deps/$(*F).p > .deps/$(*F).P
|
||||
@-rm -f .deps/$(*F).p
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data: install-pkgdataDATA
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall: uninstall-pkgdataDATA
|
||||
install-data-am: install-pkgdataDATA
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-pkgdataDATA
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS) $(DATA)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DATADIR)$(pkgdatadir)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-noinstPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
||||
|
||||
clean: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
distclean: distclean-noinstPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-depend distclean-generic clean
|
||||
-rm -f config.status
|
||||
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-noinstPROGRAMS \
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-depend distclean-generic clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-depend maintainer-clean-generic \
|
||||
distclean
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
|
||||
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile uninstall-pkgdataDATA install-pkgdataDATA tags \
|
||||
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
|
||||
distdir mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info dvi installcheck install-exec install-data \
|
||||
install uninstall all installdirs mostlyclean-generic distclean-generic \
|
||||
clean-generic maintainer-clean-generic clean mostlyclean distclean \
|
||||
maintainer-clean
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
e2fs_stage1_5.exec: $(e2fs_stage1_5_exec_LDADD)
|
||||
|
|
|
@ -13,7 +13,7 @@ INCLUDES = -I$(top_srcdir)/shared_src
|
|||
|
||||
# asm.o absolutely needs to come first!
|
||||
fat_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o \
|
||||
stage1_5.o fsys_fat.o
|
||||
stage1_5.o fsys_fat.o bios.o
|
||||
|
||||
# FIXME: Automake hackery.
|
||||
DEP_FILES = .deps/dummy.P $(wildcard .deps/*.P)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -10,8 +10,7 @@
|
|||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
@ -32,7 +31,7 @@ mandir = @mandir@
|
|||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
|
@ -44,7 +43,7 @@ AUTOMAKE = @AUTOMAKE@
|
|||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
@ -57,17 +56,20 @@ PRE_UNINSTALL = :
|
|||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMTARFLAGS = @AMTARFLAGS@
|
||||
CC = @CC@
|
||||
LD = @LD@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJCOPY = @OBJCOPY@
|
||||
PACKAGE = @PACKAGE@
|
||||
TAR = @TAR@
|
||||
VERSION = @VERSION@
|
||||
host_cpu = @host_cpu@
|
||||
host_vendor = @host_vendor@
|
||||
sbingrub = @sbingrub@
|
||||
stage2debug = @stage2debug@
|
||||
|
||||
|
||||
IMPORTANT_SIZE_LIMIT = 7168
|
||||
|
||||
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
|
||||
|
@ -76,14 +78,13 @@ CLEANFILES = $(pkgdata_DATA) $(pkgdata_DATA)T
|
|||
noinst_PROGRAMS = fat_stage1_5.exec
|
||||
|
||||
# We can't use builtins or standard includes.
|
||||
COMPILE = $(CC) -fno-builtin -nostdinc -DFSYS_FAT=1 -DNO_DECOMPRESSION=1 \
|
||||
-DSTAGE1_5=1 -DCONFIG_FILE_ASM='.string "/boot/grub/stage2"' \
|
||||
$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
COMPILE = $(CC) -fno-builtin -nostdinc -DFSYS_FAT=1 -DNO_DECOMPRESSION=1 -DSTAGE1_5=1 -DCONFIG_FILE_ASM='.string "/boot/grub/stage2"' $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/shared_src
|
||||
|
||||
# asm.o absolutely needs to come first!
|
||||
fat_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o \
|
||||
stage1_5.o fsys_fat.o
|
||||
fat_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o stage1_5.o fsys_fat.o bios.o
|
||||
|
||||
|
||||
# FIXME: Automake hackery.
|
||||
DEP_FILES = .deps/dummy.P $(wildcard .deps/*.P)
|
||||
|
@ -100,22 +101,21 @@ LDFLAGS = @LDFLAGS@
|
|||
LIBS = @LIBS@
|
||||
fat_stage1_5_exec_OBJECTS = dummy.o
|
||||
fat_stage1_5_exec_DEPENDENCIES = asm.o common.o char_io.o disk_io.o \
|
||||
stage1_5.o fsys_fat.o
|
||||
stage1_5.o fsys_fat.o bios.o
|
||||
fat_stage1_5_exec_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DATA = $(pkgdata_DATA)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
DIST_COMMON = $(pkgdata_DATA) Makefile.am Makefile.in
|
||||
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(fat_stage1_5_exec_SOURCES)
|
||||
OBJECTS = $(fat_stage1_5_exec_OBJECTS)
|
||||
|
||||
all: Makefile $(PROGRAMS) $(DATA)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
|
@ -173,8 +173,12 @@ uninstall-pkgdataDATA:
|
|||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
|
@ -207,9 +211,13 @@ distdir: $(DISTFILES)
|
|||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu fat_stage1_5/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
@ -221,83 +229,101 @@ mostlyclean-depend:
|
|||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).P -c $<
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
|
||||
< .deps/$(*F).p > .deps/$(*F).P
|
||||
@-rm -f .deps/$(*F).p
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data: install-pkgdataDATA
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall: uninstall-pkgdataDATA
|
||||
install-data-am: install-pkgdataDATA
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-pkgdataDATA
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS) $(DATA)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DATADIR)$(pkgdatadir)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-noinstPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
||||
|
||||
clean: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
distclean: distclean-noinstPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-depend distclean-generic clean
|
||||
-rm -f config.status
|
||||
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-noinstPROGRAMS \
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-depend distclean-generic clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-depend maintainer-clean-generic \
|
||||
distclean
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
|
||||
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile uninstall-pkgdataDATA install-pkgdataDATA tags \
|
||||
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
|
||||
distdir mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info dvi installcheck install-exec install-data \
|
||||
install uninstall all installdirs mostlyclean-generic distclean-generic \
|
||||
clean-generic maintainer-clean-generic clean mostlyclean distclean \
|
||||
maintainer-clean
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
fat_stage1_5.exec: $(fat_stage1_5_exec_LDADD)
|
||||
|
|
|
@ -16,7 +16,7 @@ INCLUDES = -I$(top_srcdir)/shared_src
|
|||
|
||||
# asm.o absolutely needs to come first!
|
||||
ffs_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o \
|
||||
stage1_5.o fsys_ffs.o
|
||||
stage1_5.o fsys_ffs.o bios.o
|
||||
|
||||
# FIXME: Automake hackery.
|
||||
DEP_FILES = .deps/dummy.c $(wildcard .deps/*.P)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -10,11 +10,7 @@
|
|||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
# On ext2fs, we can install into EXT2_BOOT_LOADER_INO, which gives us:
|
||||
# MAX-STAGE1-BLOCK-LIST * MIN-EXT2-BLOCK-SIZE = 80 * 1024 = 81920
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
@ -35,7 +31,7 @@ mandir = @mandir@
|
|||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
|
@ -47,7 +43,7 @@ AUTOMAKE = @AUTOMAKE@
|
|||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
@ -60,17 +56,23 @@ PRE_UNINSTALL = :
|
|||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMTARFLAGS = @AMTARFLAGS@
|
||||
CC = @CC@
|
||||
LD = @LD@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJCOPY = @OBJCOPY@
|
||||
PACKAGE = @PACKAGE@
|
||||
TAR = @TAR@
|
||||
VERSION = @VERSION@
|
||||
host_cpu = @host_cpu@
|
||||
host_vendor = @host_vendor@
|
||||
sbingrub = @sbingrub@
|
||||
stage2debug = @stage2debug@
|
||||
|
||||
# On ext2fs, we can install into EXT2_BOOT_LOADER_INO, which gives us:
|
||||
# MAX-STAGE1-BLOCK-LIST * MIN-EXT2-BLOCK-SIZE = 80 * 1024 = 81920
|
||||
|
||||
|
||||
IMPORTANT_SIZE_LIMIT = 81920
|
||||
|
||||
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
|
||||
|
@ -79,15 +81,13 @@ CLEANFILES = $(pkgdata_DATA) $(pkgdata_DATA)T
|
|||
noinst_PROGRAMS = ffs_stage1_5.exec
|
||||
|
||||
# We can't use builtins or standard includes.
|
||||
COMPILE = $(CC) -fno-builtin -nostdinc -DFSYS_FFS=1 -DNO_DECOMPRESSION=1 \
|
||||
-DSTAGE1_5=1 -DNO_BLOCK_FILES=1 \
|
||||
-DCONFIG_FILE_ASM='.string "/boot/grub/stage2"' \
|
||||
$(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
COMPILE = $(CC) -fno-builtin -nostdinc -DFSYS_FFS=1 -DNO_DECOMPRESSION=1 -DSTAGE1_5=1 -DNO_BLOCK_FILES=1 -DCONFIG_FILE_ASM='.string "/boot/grub/stage2"' $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/shared_src
|
||||
|
||||
# asm.o absolutely needs to come first!
|
||||
ffs_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o \
|
||||
stage1_5.o fsys_ffs.o
|
||||
ffs_stage1_5_exec_LDADD = asm.o common.o char_io.o disk_io.o stage1_5.o fsys_ffs.o bios.o
|
||||
|
||||
|
||||
# FIXME: Automake hackery.
|
||||
DEP_FILES = .deps/dummy.c $(wildcard .deps/*.P)
|
||||
|
@ -104,22 +104,21 @@ LDFLAGS = @LDFLAGS@
|
|||
LIBS = @LIBS@
|
||||
ffs_stage1_5_exec_OBJECTS = dummy.o
|
||||
ffs_stage1_5_exec_DEPENDENCIES = asm.o common.o char_io.o disk_io.o \
|
||||
stage1_5.o fsys_ffs.o
|
||||
stage1_5.o fsys_ffs.o bios.o
|
||||
ffs_stage1_5_exec_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DATA = $(pkgdata_DATA)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
DIST_COMMON = $(pkgdata_DATA) Makefile.am Makefile.in
|
||||
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(ffs_stage1_5_exec_SOURCES)
|
||||
OBJECTS = $(ffs_stage1_5_exec_OBJECTS)
|
||||
|
||||
all: Makefile $(PROGRAMS) $(DATA)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
|
@ -177,8 +176,12 @@ uninstall-pkgdataDATA:
|
|||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
|
@ -211,9 +214,13 @@ distdir: $(DISTFILES)
|
|||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu ffs_stage1_5/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
@ -225,83 +232,101 @@ mostlyclean-depend:
|
|||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).P -c $<
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
|
||||
< .deps/$(*F).p > .deps/$(*F).P
|
||||
@-rm -f .deps/$(*F).p
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data: install-pkgdataDATA
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall: uninstall-pkgdataDATA
|
||||
install-data-am: install-pkgdataDATA
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-pkgdataDATA
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS) $(DATA)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DATADIR)$(pkgdatadir)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
-test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
|
||||
|
||||
clean-generic:
|
||||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-noinstPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
||||
|
||||
clean: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
distclean: distclean-noinstPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-depend distclean-generic clean
|
||||
-rm -f config.status
|
||||
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-noinstPROGRAMS \
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-depend distclean-generic clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-depend maintainer-clean-generic \
|
||||
distclean
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
|
||||
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile uninstall-pkgdataDATA install-pkgdataDATA tags \
|
||||
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
|
||||
distdir mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info dvi installcheck install-exec install-data \
|
||||
install uninstall all installdirs mostlyclean-generic distclean-generic \
|
||||
clean-generic maintainer-clean-generic clean mostlyclean distclean \
|
||||
maintainer-clean
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
ffs_stage1_5.exec: $(ffs_stage1_5_exec_LDADD)
|
||||
|
|
|
@ -441,6 +441,10 @@ get_diskinfo (int drive, struct geometry *geometry)
|
|||
disks[drive].cylinders = hdg.cylinders;
|
||||
disks[drive].heads = hdg.heads;
|
||||
disks[drive].sectors = hdg.sectors;
|
||||
/* FIXME: Should get the real number of sectors. */
|
||||
disks[drive].total_sectors = (hdg.cylinders
|
||||
* hdg.heads
|
||||
* hdg.sectors);
|
||||
}
|
||||
else
|
||||
/* FIXME: should have some other alternatives before using
|
||||
|
@ -453,6 +457,9 @@ get_diskinfo (int drive, struct geometry *geometry)
|
|||
disks[drive].cylinders = DEFAULT_HD_CYLINDERS;
|
||||
disks[drive].heads = DEFAULT_HD_HEADS;
|
||||
disks[drive].sectors = DEFAULT_HD_SECTORS;
|
||||
disks[drive].total_sectors = (DEFAULT_HD_CYLINDERS
|
||||
* DEFAULT_HD_HEADS
|
||||
* DEFAULT_HD_SECTORS);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -460,6 +467,9 @@ get_diskinfo (int drive, struct geometry *geometry)
|
|||
disks[drive].cylinders = DEFAULT_FD_CYLINDERS;
|
||||
disks[drive].heads = DEFAULT_FD_HEADS;
|
||||
disks[drive].sectors = DEFAULT_FD_SECTORS;
|
||||
disks[drive].total_sectors = (DEFAULT_FD_CYLINDERS
|
||||
* DEFAULT_FD_HEADS
|
||||
* DEFAULT_FD_SECTORS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
647
shared_src/asm.S
647
shared_src/asm.S
|
@ -1,6 +1,7 @@
|
|||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 1996 Erich Boleyn <erich@uruk.org>
|
||||
* Copyright (C) 1999 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
|
||||
|
@ -335,370 +336,292 @@ realcseg:
|
|||
|
||||
|
||||
/*
|
||||
* biosdisk(write, drive, geometry, sector, nsec, segment)
|
||||
* Read/write "nsec" sectors from disk to real segment "segment"
|
||||
* offset zero
|
||||
* int biosdisk_int13_extensions (int ah, int drive, void *dap)
|
||||
*
|
||||
* Will try INT 0x13 LBA (AH=0x42/0x43) or standard (AH=0x2/0x3)
|
||||
* depending on probed geometry. For addresses out of the translated
|
||||
* area, it returns BIOS_GEOMETRY_ERROR.
|
||||
* Call IBM/MS INT13 Extensions (int 13 %ah=AH) for DRIVE. DAP
|
||||
* is passed for disk address packet. If an error occurs, return
|
||||
* non-zero, otherwise zero.
|
||||
*/
|
||||
|
||||
ENTRY(biosdisk)
|
||||
push %ebp
|
||||
mov %esp, %ebp
|
||||
ENTRY(biosdisk_int13_extensions)
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
|
||||
push %ebx
|
||||
push %ecx
|
||||
push %edx
|
||||
push %esi
|
||||
push %edi
|
||||
|
||||
/* Check whether we have LBA. */
|
||||
movl 0x10(%ebp), %eax
|
||||
andb 0xc(%eax), %eax
|
||||
andl $BIOSDISK_FLAG_LBA_EXTENSION, %eax
|
||||
jz disk_compute_args /* nope. */
|
||||
|
||||
/* set up disk address packet for extended calls (LBA mode) */
|
||||
movl 0x14(%ebp), %eax /* absolute block number */
|
||||
movl %eax, dap_block
|
||||
xorl %eax, %eax
|
||||
movl %eax, dap_block + 4
|
||||
|
||||
movb 0x18(%ebp), %al /* number of sectors */
|
||||
movw %ax, dap_blocks
|
||||
|
||||
/* set up the buffer address */
|
||||
xorl %eax, %eax
|
||||
movw 0x1c(%ebp), %ax /* segment */
|
||||
shll $16, %eax
|
||||
movl %eax, dap_buffer
|
||||
pushl %ecx
|
||||
pushl %edx
|
||||
pushl %esi
|
||||
|
||||
/* compute the address of disk_address_packet */
|
||||
movl $disk_address_packet, %eax
|
||||
movl 0x10(%ebp), %eax
|
||||
movw %ax, %si
|
||||
xorw %ax, %ax
|
||||
shrl $4, %eax
|
||||
movw %ax, %cx /* save the segment to cx */
|
||||
movw %ax, %cx /* save the segment to cx */
|
||||
|
||||
xorb %bl, %bl
|
||||
movb 0x8(%ebp), %bh /* read=0, write=1 */
|
||||
addb $0x42, %bh /* convert to extended subfunction */
|
||||
/* drive */
|
||||
movb 0xc(%ebp), %dl
|
||||
/* ah */
|
||||
movb 0x8(%ebp), %dh
|
||||
/* enter real mode */
|
||||
call EXT_C(prot_to_real)
|
||||
|
||||
movb 0xc(%ebp), %dl /* drive */
|
||||
|
||||
call EXT_C(prot_to_real) /* enter real mode */
|
||||
.code16
|
||||
|
||||
movb %dh, %ah
|
||||
movw %cx, %ds
|
||||
movw %bx, %ax
|
||||
int $0x13 /* do the operation */
|
||||
|
||||
/* FIXME: force people to help test LBA support before releasing 0.6 */
|
||||
#define NO_INT13_FALLBACK 1
|
||||
#ifdef NO_INT13_FALLBACK
|
||||
/* Save return value. */
|
||||
movb %ah, %bl
|
||||
int $0x13 /* do the operation */
|
||||
movb %ah, %dl /* save return value */
|
||||
/* clear the data segment */
|
||||
xorw %ax, %ax
|
||||
movw %ax, %ds
|
||||
/* back to protected mode */
|
||||
data32
|
||||
jmp disk_exit_16
|
||||
#else
|
||||
/* set success return value */
|
||||
movb $0, %bl
|
||||
|
||||
/* did we actually succeed? */
|
||||
data32
|
||||
jnc disk_exit_16
|
||||
|
||||
data32
|
||||
call EXT_C(real_to_prot) /* back to protected mode */
|
||||
#endif
|
||||
call EXT_C(real_to_prot)
|
||||
.code32
|
||||
|
||||
/* either failed, or a floppy, so try standard BIOS calls */
|
||||
disk_compute_args:
|
||||
/*
|
||||
* GEOMETRY is a structure representing the BIOS geometry:
|
||||
* 32 bit flags (bytes 12-15)
|
||||
* 32 bit cylinders (bytes 8-11)
|
||||
* 32 bit heads (bytes 4-7)
|
||||
* 32 bit sectors (bytes 0-3)
|
||||
*/
|
||||
movb %dl, %al /* return value in %eax */
|
||||
|
||||
/* set up original sector number */
|
||||
xorl %edx, %edx
|
||||
movl 0x14(%ebp), %eax
|
||||
|
||||
/* get the pointer to GEOMETRY */
|
||||
movl 0x10(%ebp), %edi
|
||||
|
||||
/* get sector offset, place in %ecx */
|
||||
movl 0x8(%edi), %ebx
|
||||
divl %ebx
|
||||
movl %edx, %ecx
|
||||
|
||||
/* get track offset (head number) in %edx,
|
||||
and cylinder offset in %eax */
|
||||
xorl %edx, %edx
|
||||
movl 0x4(%edi), %ebx
|
||||
divl %ebx
|
||||
|
||||
/* check cylinder offset, is there a geometry problem here? */
|
||||
movl (%edi), %ebx
|
||||
cmpl %ebx, %eax
|
||||
|
||||
/* if not, go on to standard read function */
|
||||
jl disk_use_standard_bios
|
||||
|
||||
movl $BIOSDISK_ERROR_GEOMETRY, %eax
|
||||
jmp disk_exit_32
|
||||
|
||||
.align 4
|
||||
disk_address_packet:
|
||||
.byte 0x10 /* length of packet */
|
||||
.byte 0 /* reserved */
|
||||
dap_blocks:
|
||||
.word 0 /* number of blocks */
|
||||
dap_buffer:
|
||||
.long 0 /* buffer address */
|
||||
dap_block:
|
||||
.long 0 /* absolute block number */
|
||||
.long 0
|
||||
|
||||
/*
|
||||
* This portion implements the BIOS standardized
|
||||
* INT 0x13/AH=<subfunc> interface.
|
||||
*/
|
||||
disk_use_standard_bios:
|
||||
|
||||
shll $8, %edx /* get head number to %dh */
|
||||
xchgl %eax, %ecx /* cylinder to %cx, sector to %al */
|
||||
#ifdef AWARD_INT13_EXTENSIONS
|
||||
/* FIXME: cylinder; bits 10,11 of cyl are in %dh */
|
||||
#endif
|
||||
/* cylinder; bits 8,9 of cyl are in %cl */
|
||||
xchgb %ch, %cl
|
||||
shlb $6, %cl
|
||||
incb %al /* sector; sec starts from 1, not 0 */
|
||||
orb %al, %cl
|
||||
movb 0xc(%ebp), %dl /* drive */
|
||||
|
||||
/* prot_to_real will set %es to 0, so must set it ourselves
|
||||
after it is called */
|
||||
movb 0x18(%ebp), %bl /* number of sectors */
|
||||
movb 0x8(%ebp), %bh /* read=0, write=1 */
|
||||
addb $0x2, %bh /* convert to subfunction */
|
||||
shll $16, %ebx /* shift num sect. and subfunction */
|
||||
movw 0x1c(%ebp), %bx /* segment */
|
||||
|
||||
call EXT_C(prot_to_real) /* enter real mode */
|
||||
.code16
|
||||
|
||||
movw %bx, %es /* load segment */
|
||||
/*
|
||||
* Shift num sectors and subfunction back
|
||||
*/
|
||||
data32
|
||||
shrl $16, %ebx
|
||||
pushw %bx /* save num sectors */
|
||||
xorw %bx, %bx
|
||||
|
||||
movw $3, %si
|
||||
|
||||
disk_loop:
|
||||
popw %ax /* restore num sectors */
|
||||
pushw %ax /* save num sectors */
|
||||
|
||||
/* BIOS call for reading/writing */
|
||||
int $0x13
|
||||
|
||||
/* set success return value */
|
||||
movb $0, %bl
|
||||
|
||||
/* did we actually succeed? */
|
||||
data32
|
||||
jnc disk_exit_16
|
||||
|
||||
/* do we try again? */
|
||||
decw %si
|
||||
cmpw $0, %si
|
||||
|
||||
/* if this isn't the third try, go again */
|
||||
data32
|
||||
jne disk_loop
|
||||
|
||||
/* save return value */
|
||||
movb %ah, %bl
|
||||
|
||||
disk_exit_16:
|
||||
data32
|
||||
call EXT_C(real_to_prot) /* back to protected mode */
|
||||
.code32
|
||||
|
||||
movb %bl, %al /* return value in %eax */
|
||||
|
||||
disk_exit_32:
|
||||
pop %edi
|
||||
pop %esi
|
||||
pop %edx
|
||||
pop %ecx
|
||||
pop %ebx
|
||||
pop %ebp
|
||||
popl %esi
|
||||
popl %edx
|
||||
popl %ecx
|
||||
popl %ebp
|
||||
|
||||
ret
|
||||
|
||||
|
||||
/*
|
||||
* int biosdisk_standard (int ah, int drive, int coff, int hoff, int soff,
|
||||
* int nsec, int segment)
|
||||
*
|
||||
* get_diskinfo(drive, geometry): return a structure that represents the
|
||||
* max number of sectors and heads and cylinders for DRIVE in GEOMETRY.
|
||||
* If an error occures, return non-zero, otherwise return zero.
|
||||
*
|
||||
* Call standard and old INT13 (int 13 %ah=AH) for DRIVE. Read/write
|
||||
* NSEC sectors from COFF/HOFF/SOFF into SEGMENT. If an error occurs,
|
||||
* return non-zero, otherwise zero.
|
||||
*/
|
||||
|
||||
ENTRY(get_diskinfo)
|
||||
ENTRY(biosdisk_standard)
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
|
||||
pushl %ebx
|
||||
pushl %ecx
|
||||
pushl %edx
|
||||
pushl %edi
|
||||
pushl %esi
|
||||
|
||||
movw 0x8(%ebp), %dx /* diskinfo(drive #) */
|
||||
/* set up CHS information */
|
||||
movl 0x10(%ebp), %eax
|
||||
movb %al, %ch
|
||||
movb 0x18(%ebp), %al
|
||||
shlb $2, %al
|
||||
shrw $2, %ax
|
||||
movb %al, %cl
|
||||
movb 0x14(%ebp), %dh
|
||||
/* drive */
|
||||
movb 0xc(%ebp), %dl
|
||||
/* segment */
|
||||
movw 0x20(%ebp), %bx
|
||||
/* save nsec and ah to %di */
|
||||
movb 0x8(%ebp), %ah
|
||||
movb 0x1c(%ebp), %al
|
||||
movw %ax, %di
|
||||
/* enter real mode */
|
||||
call EXT_C(prot_to_real)
|
||||
|
||||
call EXT_C(prot_to_real) /* enter real mode */
|
||||
.code16
|
||||
movw %bx, %es
|
||||
xorw %bx, %bx
|
||||
movw $3, %si /* attempt at least three times */
|
||||
|
||||
movb %dl, %al
|
||||
andb $0x80, %al
|
||||
data32
|
||||
jnz hard_drive
|
||||
1:
|
||||
movw %di, %ax
|
||||
int $0x13 /* do the operation */
|
||||
jnc 2f /* check if successful */
|
||||
|
||||
/*
|
||||
* Perform floppy probe!
|
||||
*/
|
||||
|
||||
movl $probe_values-1, %esi
|
||||
|
||||
probe_loop:
|
||||
/* reset floppy controller INT 13h AH=0 */
|
||||
movb %ah, %bl /* save return value */
|
||||
/* if fail, reset the disk system */
|
||||
xorw %ax, %ax
|
||||
int $0x13
|
||||
|
||||
incw %si
|
||||
movb (%si), %cl
|
||||
|
||||
/* if number of sectors is 0, display error and die */
|
||||
cmpb $0, %cl
|
||||
|
||||
data32
|
||||
je probe_failed
|
||||
|
||||
/* perform read */
|
||||
movw $SCRATCHSEG, %ax
|
||||
movw %ax, %es
|
||||
xorw %bx, %bx
|
||||
movw $0x201, %ax
|
||||
movb $0, %ch
|
||||
movb $0, %dh
|
||||
int $0x13
|
||||
|
||||
data32
|
||||
jc probe_loop
|
||||
|
||||
/* %cl is already the correct value! */
|
||||
movb $1, %dh
|
||||
movb $79, %ch
|
||||
|
||||
xorb %bh, %bh /* no BIOS extensions */
|
||||
data32
|
||||
jmp probe_success
|
||||
|
||||
probe_values:
|
||||
.byte 36, 18, 15, 9, 0
|
||||
|
||||
hard_drive:
|
||||
/* Check for LBA. */
|
||||
movb $0x41, %ah
|
||||
movw $0x55aa, %bx
|
||||
int $0x13 /* int 13 extensions install check */
|
||||
|
||||
data32
|
||||
jc 1f /* invalid function */
|
||||
cmpw $0xaa55, %bx
|
||||
data32
|
||||
jne 1f /* failed magic */
|
||||
|
||||
andb $1, %cx
|
||||
data32
|
||||
jz 1f /* LBA not supported */
|
||||
|
||||
/* Wahoo! Got LBA! */
|
||||
movl $BIOSDISK_FLAG_LBA_EXTENSION, %edi
|
||||
/* FIXME: Should use INT 13 AH=42h */
|
||||
data32
|
||||
jmp 2f
|
||||
|
||||
1: xorl %edi, %edi /* Too bad, no LBA */
|
||||
2: movb $0x8, %ah /* ask for disk info */
|
||||
int $0x13
|
||||
|
||||
data32
|
||||
jc probe_failed
|
||||
|
||||
/* es:di = parameter table */
|
||||
/* carry = 0 */
|
||||
|
||||
probe_success:
|
||||
/*
|
||||
* Store the information for CHS and BIOS extension to registers:
|
||||
* 32 bit BIOS extension -> edi
|
||||
* 32 bit cylinder -> ebx
|
||||
* 32 bit head -> ecx
|
||||
* 32 bit sector -> edx
|
||||
*/
|
||||
#ifdef AWARD_INT13_EXTENSIONS
|
||||
movb %dh, %al /* bits 10,11 of cylinder count */
|
||||
andb $0xc0, %al
|
||||
shlw $2, %ax /* << 2 */
|
||||
#endif
|
||||
movb %cl, %al /* bits 8,9 of cylinder count */
|
||||
andb $0xc0, %al
|
||||
shlw $2, %ax /* << 2 */
|
||||
movb %ch, %al /* Lower 8 bits */
|
||||
movswl %ax, %ebx /* max cylinder */
|
||||
incl %ebx /* number of cylinders */
|
||||
shll $16, %eax /* << 16 */
|
||||
|
||||
#ifdef AWARD_INT13_EXTENSIONS
|
||||
andb $0x3f, %dh /* mask off cylinder gunk */
|
||||
#endif
|
||||
movb %dh, %al /* max head */
|
||||
|
||||
andb $0x3f, %cl /* mask off cylinder gunk */
|
||||
movsbl %cl, %edx /* max sector (and # sectors) */
|
||||
|
||||
movsbl %al, %ecx
|
||||
incl %ecx /* number of heads */
|
||||
|
||||
data32
|
||||
jmp got_drive
|
||||
|
||||
probe_failed:
|
||||
/*
|
||||
* Urk. Call failed. It is not supported for floppies by old
|
||||
* BIOSes, but it should work for all hard drives!!
|
||||
*
|
||||
* Return a 1 here... presume there is no drive present. ????
|
||||
*/
|
||||
|
||||
decw %si
|
||||
cmpw $0, %si
|
||||
je 2f
|
||||
xorb %bl, %bl
|
||||
jmp 1b /* retry */
|
||||
2:
|
||||
/* back to protected mode */
|
||||
data32
|
||||
call EXT_C(real_to_prot)
|
||||
.code32
|
||||
|
||||
movl $1, %eax
|
||||
movb %bl, %al /* return value in %eax */
|
||||
|
||||
popl %esi
|
||||
popl %edi
|
||||
popl %edx
|
||||
popl %ecx
|
||||
popl %ebx
|
||||
|
||||
ret
|
||||
|
||||
|
||||
/*
|
||||
* int check_int13_extensions (int drive)
|
||||
*
|
||||
* Check if LBA is supported for DRIVE. If it is supported, then return
|
||||
* the major version of extensions, otherwise zero.
|
||||
*/
|
||||
|
||||
ENTRY(check_int13_extensions)
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
|
||||
pushl %ebx
|
||||
pushl %ecx
|
||||
pushl %edx
|
||||
|
||||
/* drive */
|
||||
movb 0x8(%ebp), %dl
|
||||
/* enter real mode */
|
||||
call EXT_C(prot_to_real)
|
||||
|
||||
.code16
|
||||
movb $0x41, %ah
|
||||
movw $0x55aa, %bx
|
||||
int $0x13 /* do the operation */
|
||||
|
||||
/* check the result */
|
||||
jc 1f
|
||||
cmpw $0xaa55, %bx
|
||||
jne 1f
|
||||
andw $1, %cx
|
||||
jz 1f
|
||||
|
||||
movb %ah, %bl /* save the major version into %bl */
|
||||
jmp 2f
|
||||
1:
|
||||
xorb %bl, %bl
|
||||
2:
|
||||
/* back to protected mode */
|
||||
data32
|
||||
call EXT_C(real_to_prot)
|
||||
.code32
|
||||
|
||||
movb %bl, %al /* return value in %eax */
|
||||
|
||||
popl %edx
|
||||
popl %ecx
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
|
||||
ret
|
||||
|
||||
|
||||
/*
|
||||
* int get_diskinfo_int13_extensions (int drive, void *drp)
|
||||
*
|
||||
* Return the geometry of DRIVE in a drive parameters, DRP. If an error
|
||||
* occurs, then return non-zero, otherwise zero.
|
||||
*/
|
||||
|
||||
ENTRY(get_diskinfo_int13_extensions)
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
|
||||
pushl %ebx
|
||||
pushl %edx
|
||||
pushl %esi
|
||||
|
||||
/* compute the address of drive parameters */
|
||||
movl 0xc(%ebp), %eax
|
||||
movw %ax, %si
|
||||
xorw %ax, %ax
|
||||
shrl $4, %eax
|
||||
movw %ax, %bx /* save the segment into %bx */
|
||||
/* drive */
|
||||
movb 0x8(%ebp), %dl
|
||||
/* enter real mode */
|
||||
call EXT_C(prot_to_real)
|
||||
|
||||
.code16
|
||||
movb $0x48, %ah
|
||||
movw %bx, %ds
|
||||
int $0x13 /* do the operation */
|
||||
movb %ah, %bl /* save return value in %bl */
|
||||
/* clear the data segment */
|
||||
xorw %ax, %ax
|
||||
movw %ax, %ds
|
||||
/* back to protected mode */
|
||||
data32
|
||||
call EXT_C(real_to_prot)
|
||||
.code32
|
||||
|
||||
movb %bl, %al /* return value in %eax */
|
||||
|
||||
popl %esi
|
||||
popl %edx
|
||||
popl %ebx
|
||||
popl %ebp
|
||||
|
||||
ret
|
||||
|
||||
|
||||
/*
|
||||
* int get_diskinfo_standard (int drive, unsigned long *cylinders,
|
||||
* unsigned long *heads, unsigned long *sectors)
|
||||
*
|
||||
* Return the geometry of DRIVE in CYLINDERS, HEADS and SECTORS. If an
|
||||
* error occurs, then return non-zero, otherwise zero.
|
||||
*/
|
||||
|
||||
ENTRY(get_diskinfo_standard)
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
|
||||
pushl %ebx
|
||||
pushl %ecx
|
||||
pushl %edx
|
||||
pushl %edi
|
||||
|
||||
/* drive */
|
||||
movb 0x8(%ebp), %dl
|
||||
/* enter real mode */
|
||||
call EXT_C(prot_to_real)
|
||||
|
||||
.code16
|
||||
movb $0x8, %ah
|
||||
int $0x13 /* do the operation */
|
||||
movb %ah, %bl /* save return value in %bl */
|
||||
/* back to protected mode */
|
||||
data32
|
||||
call EXT_C(real_to_prot)
|
||||
.code32
|
||||
|
||||
/* restore %ebp */
|
||||
leal 0x10(%esp), %ebp
|
||||
|
||||
/* heads */
|
||||
movb %dh, %al
|
||||
incl %eax /* the number of heads is counted from zero */
|
||||
movl 0x10(%ebp), %edi
|
||||
movl %eax, (%edi)
|
||||
|
||||
/* sectors */
|
||||
xorl %eax, %eax
|
||||
movb %cl, %al
|
||||
andb $0x3f, %al
|
||||
movl 0x14(%ebp), %edi
|
||||
movl %eax, (%edi)
|
||||
|
||||
/* cylinders */
|
||||
shrb $6, %cl
|
||||
movb %cl, %ah
|
||||
movb %ch, %al
|
||||
incl %eax /* the number of cylinders is
|
||||
counted from zero */
|
||||
movl 0xc(%ebp), %edi
|
||||
movl %eax, (%edi)
|
||||
|
||||
xorl %eax, %eax
|
||||
movb %bl, %al /* return value in %eax */
|
||||
|
||||
popl %edi
|
||||
popl %edx
|
||||
popl %ecx
|
||||
|
@ -707,23 +630,89 @@ probe_failed:
|
|||
|
||||
ret
|
||||
|
||||
|
||||
/*
|
||||
* int get_diskinfo_floppy (int drive, unsigned long *cylinders,
|
||||
* unsigned long *heads, unsigned long *sectors)
|
||||
*
|
||||
* Return the geometry of DRIVE in CYLINDERS, HEADS and SECTORS. If an
|
||||
* error occurs, then return non-zero, otherwise zero.
|
||||
*/
|
||||
|
||||
ENTRY(get_diskinfo_floppy)
|
||||
pushl %ebp
|
||||
movl %esp, %ebp
|
||||
|
||||
pushl %ebx
|
||||
pushl %ecx
|
||||
pushl %edx
|
||||
pushl %esi
|
||||
|
||||
/* drive */
|
||||
movb 0x8(%ebp), %dl
|
||||
/* enter real mode */
|
||||
call EXT_C(prot_to_real)
|
||||
|
||||
.code16
|
||||
got_drive:
|
||||
/* init probe value */
|
||||
movl $probe_values-1, %esi
|
||||
1:
|
||||
xorw %ax, %ax
|
||||
int $0x13 /* reset floppy controller */
|
||||
|
||||
incw %si
|
||||
movb (%si), %cl
|
||||
cmpb $0, %cl /* probe failed if zero */
|
||||
je 2f
|
||||
|
||||
/* perform read */
|
||||
movw $SCRATCHSEG, %ax
|
||||
movw %ax, %es
|
||||
xorw %bx, %bx
|
||||
movw $0x0201, %ax
|
||||
movb $0, %ch
|
||||
movb $0, %dh
|
||||
int $0x13
|
||||
|
||||
/* FIXME: Read from floppy may fail even if the geometry is correct.
|
||||
So should retry at least three times. */
|
||||
jc 1b /* next value */
|
||||
|
||||
/* succeed */
|
||||
jmp 2f
|
||||
|
||||
probe_values:
|
||||
.byte 36, 18, 15, 9, 0
|
||||
|
||||
2:
|
||||
/* back to protected mode */
|
||||
data32
|
||||
call EXT_C(real_to_prot) /* back to protected mode */
|
||||
call EXT_C(real_to_prot)
|
||||
.code32
|
||||
|
||||
/* set up return structure */
|
||||
movl 0x0c(%ebp), %eax
|
||||
/* restore %ebp */
|
||||
leal 0x10(%esp), %ebp
|
||||
|
||||
/* cylinders */
|
||||
movl 0xc(%ebp), %eax
|
||||
movl $80, %ebx
|
||||
movl %ebx, (%eax)
|
||||
/* heads */
|
||||
movl 0x10(%ebp), %eax
|
||||
movl $2, %ebx
|
||||
movl %ebx, (%eax)
|
||||
/* sectors */
|
||||
movl 0x14(%ebp), %eax
|
||||
movzbl %cl, %ebx
|
||||
movl %ebx, (%eax)
|
||||
movl %ecx, 0x04(%eax)
|
||||
movl %edx, 0x08(%eax)
|
||||
movl %edi, 0x0c(%eax)
|
||||
|
||||
/* return value in %eax */
|
||||
xorl %eax, %eax
|
||||
|
||||
cmpb $0, %cl
|
||||
jne 3f
|
||||
incl %eax /* %eax = 1 (non-zero) */
|
||||
3:
|
||||
popl %esi
|
||||
popl %edi
|
||||
popl %edx
|
||||
popl %ecx
|
||||
popl %ebx
|
||||
|
|
205
shared_src/bios.c
Normal file
205
shared_src/bios.c
Normal file
|
@ -0,0 +1,205 @@
|
|||
/* bios.c - implement C part of low-level BIOS disk input and output */
|
||||
/*
|
||||
* GRUB -- GRand Unified Bootloader
|
||||
* Copyright (C) 1999 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.
|
||||
*/
|
||||
|
||||
#include "shared.h"
|
||||
|
||||
|
||||
/* These are defined in asm.S, and never be used elsewhere, so declare the
|
||||
prototypes here. */
|
||||
extern int biosdisk_int13_extensions (int ah, int drive, void *dap);
|
||||
extern int biosdisk_standard (int ah, int drive,
|
||||
int coff, int hoff, int soff,
|
||||
int nsec, int segment);
|
||||
extern int check_int13_extensions (int drive);
|
||||
extern int get_diskinfo_int13_extensions (int drive, void *drp);
|
||||
extern int get_diskinfo_standard (int drive,
|
||||
unsigned long *cylinders,
|
||||
unsigned long *heads,
|
||||
unsigned long *sectors);
|
||||
extern int get_diskinfo_floppy (int drive,
|
||||
unsigned long *cylinders,
|
||||
unsigned long *heads,
|
||||
unsigned long *sectors);
|
||||
|
||||
|
||||
/* Read/write NSEC sectors starting from SECTOR in DRIVE disk with GEOMETRY
|
||||
from/into SEGMENT segment. If READ is BIOSDISK_READ, then read it,
|
||||
else if READ is BIOSDISK_WRITE, then write it. If an geometry error
|
||||
occurs, return BIOSDISK_ERROR_GEOMETRY, and if other error occurs, then
|
||||
return the error number. Otherwise, return 0. */
|
||||
int
|
||||
biosdisk (int read, int drive, struct geometry *geometry,
|
||||
int sector, int nsec, int segment)
|
||||
{
|
||||
int err;
|
||||
|
||||
if (geometry->flags & BIOSDISK_FLAG_LBA_EXTENSION)
|
||||
{
|
||||
struct disk_address_packet
|
||||
{
|
||||
unsigned char length;
|
||||
unsigned char reserved;
|
||||
unsigned short blocks;
|
||||
unsigned long buffer;
|
||||
unsigned long long block;
|
||||
} dap;
|
||||
|
||||
if (sector >= geometry->total_sectors)
|
||||
return BIOSDISK_ERROR_GEOMETRY;
|
||||
|
||||
/* FIXME: sizeof (DAP) must be 0x10. Should assert that the compiler
|
||||
can't add any padding. */
|
||||
dap.length = sizeof (dap);
|
||||
dap.block = sector;
|
||||
dap.blocks = nsec;
|
||||
/* This is undocumented part. The address is formated in
|
||||
SEGMENT:ADDRESS. */
|
||||
dap.buffer = segment << 16;
|
||||
|
||||
err = biosdisk_int13_extensions (read + 0x42, drive, &dap);
|
||||
|
||||
#define NO_INT13_FALLBACK 1
|
||||
#ifndef NO_INT13_FALLBACK
|
||||
if (err)
|
||||
{
|
||||
geometry->flags &= ~BIOSDISK_FLAG_LBA_EXTENSION;
|
||||
geometry->total_sectors = (geometry->cylinders
|
||||
* geometry->heads
|
||||
* geometry->sectors);
|
||||
return biosdisk (read, drive, geometry, sector, nsec, segment);
|
||||
}
|
||||
#endif /* ! NO_INT13_FALLBACK */
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
int cylinder_offset, head_offset, sector_offset;
|
||||
int head;
|
||||
|
||||
/* SECTOR_OFFSET is counted from one, while HEAD_OFFSET and
|
||||
CYLINDER_OFFSET are counted from zero. */
|
||||
sector_offset = sector % geometry->sectors + 1;
|
||||
head = sector / geometry->sectors;
|
||||
head_offset = head % geometry->heads;
|
||||
cylinder_offset = head / geometry->heads;
|
||||
|
||||
if (cylinder_offset >= geometry->cylinders)
|
||||
return BIOSDISK_ERROR_GEOMETRY;
|
||||
|
||||
err = biosdisk_standard (read + 0x02, drive,
|
||||
cylinder_offset, head_offset, sector_offset,
|
||||
nsec, segment);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Return the geometry of DRIVE in GEOMETRY. If an error occurs, return
|
||||
non-zero, otherwise zero. */
|
||||
int
|
||||
get_diskinfo (int drive, struct geometry *geometry)
|
||||
{
|
||||
int err;
|
||||
|
||||
/* Clear GEOMETRY. */
|
||||
memset (geometry, 0, sizeof (struct geometry));
|
||||
|
||||
if (drive & 0x80)
|
||||
{
|
||||
/* hard disk */
|
||||
int version;
|
||||
unsigned long total_sectors = 0;
|
||||
|
||||
version = check_int13_extensions (drive);
|
||||
if (version)
|
||||
{
|
||||
struct drive_parameters
|
||||
{
|
||||
unsigned short size;
|
||||
unsigned short flags;
|
||||
unsigned long cylinders;
|
||||
unsigned long heads;
|
||||
unsigned long sectors;
|
||||
unsigned long long total_sectors;
|
||||
unsigned short bytes_per_sector;
|
||||
/* ver 2.0 or higher */
|
||||
unsigned long EDD_configuration_parameters;
|
||||
/* ver 3.0 or higher */
|
||||
unsigned short signature_dpi;
|
||||
unsigned char length_dpi;
|
||||
unsigned char reserved[3];
|
||||
unsigned char name_of_host_bus[4];
|
||||
unsigned char name_of_interface_type[8];
|
||||
unsigned char interface_path[8];
|
||||
unsigned char device_path[8];
|
||||
unsigned char reserved2;
|
||||
unsigned char checksum;
|
||||
} drp;
|
||||
|
||||
drp.size = sizeof (drp);
|
||||
err = get_diskinfo_int13_extensions (drive, &drp);
|
||||
if (! err)
|
||||
{
|
||||
geometry->flags = BIOSDISK_FLAG_LBA_EXTENSION;
|
||||
|
||||
/* Check if CHS information is valid. */
|
||||
if (drp.flags & 0x02)
|
||||
{
|
||||
total_sectors = (geometry->cylinders
|
||||
* geometry->heads
|
||||
* geometry->sectors);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Don't pass GEOMETRY directly, but pass each element instead,
|
||||
so that we can change the structure easily. */
|
||||
err = get_diskinfo_standard (drive,
|
||||
&geometry->cylinders,
|
||||
&geometry->heads,
|
||||
&geometry->sectors);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (! total_sectors)
|
||||
{
|
||||
total_sectors = (geometry->cylinders
|
||||
* geometry->heads
|
||||
* geometry->sectors);
|
||||
}
|
||||
geometry->total_sectors = total_sectors;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* floppy disk */
|
||||
err = get_diskinfo_floppy (drive,
|
||||
&geometry->cylinders,
|
||||
&geometry->heads,
|
||||
&geometry->sectors);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
geometry->total_sectors = (geometry->cylinders
|
||||
* geometry->heads
|
||||
* geometry->sectors);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -406,7 +406,7 @@ real_open_partition (int flags)
|
|||
bsd_evil_hack = 0;
|
||||
current_slice = 0;
|
||||
part_start = 0;
|
||||
part_length = buf_geom.sectors * buf_geom.heads * buf_geom.cylinders;
|
||||
part_length = buf_geom.total_sectors;
|
||||
|
||||
if (current_drive & 0x80)
|
||||
{
|
||||
|
|
|
@ -309,7 +309,9 @@ extern int fsys_type;
|
|||
extern int block_file;
|
||||
#endif /* NO_BLOCK_FILES */
|
||||
|
||||
/* The information for a disk geometry */
|
||||
/* The information for a disk geometry. The CHS information is only for
|
||||
DOS/Partition table compatibility, and the real number of sectors is
|
||||
stored in TOTAL_SECTORS. */
|
||||
struct geometry
|
||||
{
|
||||
/* The number of cylinders */
|
||||
|
@ -318,6 +320,8 @@ struct geometry
|
|||
unsigned long heads;
|
||||
/* The number of sectors */
|
||||
unsigned long sectors;
|
||||
/* The total number of sectors */
|
||||
unsigned long total_sectors;
|
||||
/* Flags */
|
||||
unsigned long flags;
|
||||
};
|
||||
|
|
|
@ -49,7 +49,7 @@ print_entries(int y, int size, int first, char *menu_entries)
|
|||
else
|
||||
putchar(' ');
|
||||
|
||||
get_entry(menu_entries, first, 0);
|
||||
menu_entries = get_entry (menu_entries, first, 0);
|
||||
|
||||
for (i = 1; i <= size; i++)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ INCLUDES = -I$(top_srcdir)/shared_src
|
|||
|
||||
# asm.o absolutely needs to come first!
|
||||
stage2_exec_LDADD = asm.o boot.o common.o char_io.o cmdline.o disk_io.o \
|
||||
gunzip.o fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o
|
||||
gunzip.o fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o bios.o
|
||||
|
||||
noinst_PROGRAMS = stage2.exec
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -10,8 +10,7 @@
|
|||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
@ -32,7 +31,7 @@ mandir = @mandir@
|
|||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
|
@ -44,7 +43,7 @@ AUTOMAKE = @AUTOMAKE@
|
|||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
@ -57,17 +56,20 @@ PRE_UNINSTALL = :
|
|||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMTARFLAGS = @AMTARFLAGS@
|
||||
CC = @CC@
|
||||
LD = @LD@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJCOPY = @OBJCOPY@
|
||||
PACKAGE = @PACKAGE@
|
||||
TAR = @TAR@
|
||||
VERSION = @VERSION@
|
||||
host_cpu = @host_cpu@
|
||||
host_vendor = @host_vendor@
|
||||
sbingrub = @sbingrub@
|
||||
stage2debug = @stage2debug@
|
||||
|
||||
|
||||
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
|
||||
pkgdata_DATA = stage2
|
||||
CLEANFILES = $(pkgdata_DATA)
|
||||
|
@ -78,8 +80,8 @@ COMPILE = $(CC) -fno-builtin -nostdinc $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
|||
INCLUDES = -I$(top_srcdir)/shared_src
|
||||
|
||||
# asm.o absolutely needs to come first!
|
||||
stage2_exec_LDADD = asm.o boot.o common.o char_io.o cmdline.o disk_io.o \
|
||||
gunzip.o fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o
|
||||
stage2_exec_LDADD = asm.o boot.o common.o char_io.o cmdline.o disk_io.o gunzip.o fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o bios.o
|
||||
|
||||
|
||||
noinst_PROGRAMS = stage2.exec
|
||||
|
||||
|
@ -98,22 +100,21 @@ LDFLAGS = @LDFLAGS@
|
|||
LIBS = @LIBS@
|
||||
stage2_exec_OBJECTS = dummy.o
|
||||
stage2_exec_DEPENDENCIES = asm.o boot.o common.o char_io.o cmdline.o \
|
||||
disk_io.o gunzip.o fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o
|
||||
disk_io.o gunzip.o fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o bios.o
|
||||
stage2_exec_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DATA = $(pkgdata_DATA)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
DIST_COMMON = $(pkgdata_DATA) Makefile.am Makefile.in
|
||||
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(stage2_exec_SOURCES)
|
||||
OBJECTS = $(stage2_exec_OBJECTS)
|
||||
|
||||
all: Makefile $(PROGRAMS) $(DATA)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
|
@ -171,8 +172,12 @@ uninstall-pkgdataDATA:
|
|||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
|
@ -205,9 +210,13 @@ distdir: $(DISTFILES)
|
|||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu stage2/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
@ -219,40 +228,53 @@ mostlyclean-depend:
|
|||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).P -c $<
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
|
||||
< .deps/$(*F).p > .deps/$(*F).P
|
||||
@-rm -f .deps/$(*F).p
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data: install-pkgdataDATA
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall: uninstall-pkgdataDATA
|
||||
install-data-am: install-pkgdataDATA
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-pkgdataDATA
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(PROGRAMS) $(DATA)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DATADIR)$(pkgdatadir)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
@ -262,40 +284,46 @@ clean-generic:
|
|||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-noinstPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-am: mostlyclean-noinstPROGRAMS mostlyclean-compile \
|
||||
mostlyclean-tags mostlyclean-depend mostlyclean-generic
|
||||
|
||||
clean: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
distclean: distclean-noinstPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-depend distclean-generic clean
|
||||
-rm -f config.status
|
||||
clean-am: clean-noinstPROGRAMS clean-compile clean-tags clean-depend \
|
||||
clean-generic mostlyclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-noinstPROGRAMS \
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-noinstPROGRAMS distclean-compile distclean-tags \
|
||||
distclean-depend distclean-generic clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-noinstPROGRAMS \
|
||||
maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-depend maintainer-clean-generic \
|
||||
distclean
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-noinstPROGRAMS distclean-noinstPROGRAMS \
|
||||
clean-noinstPROGRAMS maintainer-clean-noinstPROGRAMS \
|
||||
mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile uninstall-pkgdataDATA install-pkgdataDATA tags \
|
||||
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
|
||||
distdir mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info dvi installcheck install-exec install-data \
|
||||
install uninstall all installdirs mostlyclean-generic distclean-generic \
|
||||
clean-generic maintainer-clean-generic clean mostlyclean distclean \
|
||||
maintainer-clean
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
stage2.exec: $(stage2_exec_LDADD)
|
||||
|
|
|
@ -11,7 +11,7 @@ INCLUDES = -I$(top_srcdir)/shared_src
|
|||
|
||||
# asm.o absolutely needs to come first!
|
||||
stage2_debug_exec_LDADD = asm.o boot.o common.o char_io.o cmdline.o disk_io.o \
|
||||
gunzip.o fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o
|
||||
gunzip.o fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o bios.o
|
||||
|
||||
EXTRA_PROGRAMS = stage2_debug.exec
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Makefile.in generated automatically by automake 1.3 from Makefile.am
|
||||
# Makefile.in generated automatically by automake 1.4a from Makefile.am
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
@ -10,8 +10,7 @@
|
|||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
|
||||
SHELL = /bin/sh
|
||||
SHELL = @SHELL@
|
||||
|
||||
srcdir = @srcdir@
|
||||
top_srcdir = @top_srcdir@
|
||||
|
@ -32,7 +31,7 @@ mandir = @mandir@
|
|||
includedir = @includedir@
|
||||
oldincludedir = /usr/include
|
||||
|
||||
DISTDIR =
|
||||
DESTDIR =
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
|
||||
|
@ -44,7 +43,7 @@ AUTOMAKE = @AUTOMAKE@
|
|||
AUTOHEADER = @AUTOHEADER@
|
||||
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
transform = @program_transform_name@
|
||||
|
@ -57,17 +56,20 @@ PRE_UNINSTALL = :
|
|||
POST_UNINSTALL = :
|
||||
host_alias = @host_alias@
|
||||
host_triplet = @host@
|
||||
AMTARFLAGS = @AMTARFLAGS@
|
||||
CC = @CC@
|
||||
LD = @LD@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
OBJCOPY = @OBJCOPY@
|
||||
PACKAGE = @PACKAGE@
|
||||
TAR = @TAR@
|
||||
VERSION = @VERSION@
|
||||
host_cpu = @host_cpu@
|
||||
host_vendor = @host_vendor@
|
||||
sbingrub = @sbingrub@
|
||||
stage2debug = @stage2debug@
|
||||
|
||||
|
||||
pkgdatadir = $(datadir)/$(PACKAGE)/$(host_cpu)-$(host_vendor)
|
||||
pkgdata_DATA = $(stage2debug)
|
||||
EXTRA_DATA = stage2_debug
|
||||
|
@ -75,13 +77,13 @@ CLEANFILES = stage2_debug
|
|||
MOSTLYCLEANFILES = stage2_debug.exec
|
||||
|
||||
# We can't use builtins or standard includes.
|
||||
COMPILE = $(CC) -fno-builtin -nostdinc -DDEBUG=1 $(DEFS) $(INCLUDES) \
|
||||
$(CPPFLAGS) $(CFLAGS)
|
||||
COMPILE = $(CC) -fno-builtin -nostdinc -DDEBUG=1 $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/shared_src
|
||||
|
||||
# asm.o absolutely needs to come first!
|
||||
stage2_debug_exec_LDADD = asm.o boot.o common.o char_io.o cmdline.o disk_io.o \
|
||||
gunzip.o fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o
|
||||
stage2_debug_exec_LDADD = asm.o boot.o common.o char_io.o cmdline.o disk_io.o gunzip.o fsys_ffs.o fsys_ext2fs.o fsys_fat.o stage2.o bios.o
|
||||
|
||||
|
||||
EXTRA_PROGRAMS = stage2_debug.exec
|
||||
|
||||
|
@ -99,22 +101,21 @@ LIBS = @LIBS@
|
|||
stage2_debug_exec_OBJECTS = dummy.o
|
||||
stage2_debug_exec_DEPENDENCIES = asm.o boot.o common.o char_io.o \
|
||||
cmdline.o disk_io.o gunzip.o fsys_ffs.o fsys_ext2fs.o fsys_fat.o \
|
||||
stage2.o
|
||||
stage2.o bios.o
|
||||
stage2_debug_exec_LDFLAGS =
|
||||
CFLAGS = @CFLAGS@
|
||||
LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
|
||||
CCLD = $(CC)
|
||||
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
DATA = $(pkgdata_DATA)
|
||||
|
||||
DIST_COMMON = Makefile.am Makefile.in
|
||||
DIST_COMMON = $(EXTRA_DATA) $(pkgdata_DATA) Makefile.am Makefile.in
|
||||
|
||||
|
||||
TAR = tar
|
||||
GZIP = --best
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(stage2_debug_exec_SOURCES)
|
||||
OBJECTS = $(stage2_debug_exec_OBJECTS)
|
||||
|
||||
all: Makefile $(DATA)
|
||||
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
|
@ -163,8 +164,12 @@ uninstall-pkgdataDATA:
|
|||
tags: TAGS
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP)
|
||||
list='$(SOURCES) $(HEADERS)'; \
|
||||
unique=`for i in $$list; do echo $$i; done | \
|
||||
awk ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
here=`pwd` && cd $(srcdir) \
|
||||
&& mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
|
||||
&& mkid -f$$here/ID $$unique $(LISP)
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP)
|
||||
tags=; \
|
||||
|
@ -197,9 +202,13 @@ distdir: $(DISTFILES)
|
|||
&& $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --gnu stage2_debug/Makefile
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file; \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file || :; \
|
||||
fi; \
|
||||
done
|
||||
|
||||
DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
|
||||
|
@ -211,40 +220,53 @@ mostlyclean-depend:
|
|||
clean-depend:
|
||||
|
||||
distclean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
maintainer-clean-depend:
|
||||
-rm -rf .deps
|
||||
|
||||
%.o: %.c
|
||||
@echo '$(COMPILE) -c $<'; \
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).P -c $<
|
||||
$(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-cp .deps/$(*F).pp .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm .deps/$(*F).pp
|
||||
|
||||
%.lo: %.c
|
||||
@echo '$(LTCOMPILE) -c $<'; \
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
|
||||
< .deps/$(*F).p > .deps/$(*F).P
|
||||
@-rm -f .deps/$(*F).p
|
||||
info:
|
||||
dvi:
|
||||
check: all
|
||||
$(MAKE)
|
||||
installcheck:
|
||||
install-exec:
|
||||
@$(NORMAL_INSTALL)
|
||||
$(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $<
|
||||
@-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \
|
||||
< .deps/$(*F).pp > .deps/$(*F).P; \
|
||||
tr ' ' '\012' < .deps/$(*F).pp \
|
||||
| sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \
|
||||
>> .deps/$(*F).P; \
|
||||
rm -f .deps/$(*F).pp
|
||||
info-am:
|
||||
info: info-am
|
||||
dvi-am:
|
||||
dvi: dvi-am
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
installcheck-am:
|
||||
installcheck: installcheck-am
|
||||
install-exec-am:
|
||||
install-exec: install-exec-am
|
||||
|
||||
install-data: install-pkgdataDATA
|
||||
@$(NORMAL_INSTALL)
|
||||
|
||||
install: install-exec install-data all
|
||||
@:
|
||||
|
||||
uninstall: uninstall-pkgdataDATA
|
||||
install-data-am: install-pkgdataDATA
|
||||
install-data: install-data-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
install: install-am
|
||||
uninstall-am: uninstall-pkgdataDATA
|
||||
uninstall: uninstall-am
|
||||
all-am: Makefile $(DATA)
|
||||
all-redirect: all-am
|
||||
install-strip:
|
||||
$(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install
|
||||
installdirs:
|
||||
$(mkinstalldirs) $(DATADIR)$(pkgdatadir)
|
||||
$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
|
||||
|
||||
|
||||
mostlyclean-generic:
|
||||
|
@ -254,36 +276,43 @@ clean-generic:
|
|||
-test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
|
||||
|
||||
distclean-generic:
|
||||
-rm -f Makefile $(DISTCLEANFILES)
|
||||
-rm -f Makefile $(CONFIG_CLEAN_FILES)
|
||||
-rm -f config.cache config.log stamp-h stamp-h[0-9]*
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
|
||||
-test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
|
||||
mostlyclean: mostlyclean-compile mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-tags mostlyclean-depend \
|
||||
mostlyclean-generic
|
||||
|
||||
clean: clean-compile clean-tags clean-depend clean-generic mostlyclean
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
distclean: distclean-compile distclean-tags distclean-depend \
|
||||
distclean-generic clean
|
||||
-rm -f config.status
|
||||
clean-am: clean-compile clean-tags clean-depend clean-generic \
|
||||
mostlyclean-am
|
||||
|
||||
maintainer-clean: maintainer-clean-compile maintainer-clean-tags \
|
||||
clean: clean-am
|
||||
|
||||
distclean-am: distclean-compile distclean-tags distclean-depend \
|
||||
distclean-generic clean-am
|
||||
|
||||
distclean: distclean-am
|
||||
|
||||
maintainer-clean-am: maintainer-clean-compile maintainer-clean-tags \
|
||||
maintainer-clean-depend maintainer-clean-generic \
|
||||
distclean
|
||||
distclean-am
|
||||
@echo "This command is intended for maintainers to use;"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
|
||||
.PHONY: mostlyclean-compile distclean-compile clean-compile \
|
||||
maintainer-clean-compile uninstall-pkgdataDATA install-pkgdataDATA tags \
|
||||
mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \
|
||||
distdir mostlyclean-depend distclean-depend clean-depend \
|
||||
maintainer-clean-depend info dvi installcheck install-exec install-data \
|
||||
install uninstall all installdirs mostlyclean-generic distclean-generic \
|
||||
clean-generic maintainer-clean-generic clean mostlyclean distclean \
|
||||
maintainer-clean
|
||||
maintainer-clean-depend info-am info dvi-am dvi check check-am \
|
||||
installcheck-am installcheck install-exec-am install-exec \
|
||||
install-data-am install-data install-am install uninstall-am uninstall \
|
||||
all-redirect all-am all install-strip installdirs mostlyclean-generic \
|
||||
distclean-generic clean-generic maintainer-clean-generic clean \
|
||||
mostlyclean distclean maintainer-clean
|
||||
|
||||
|
||||
stage2_debug.exec: $(stage2_debug_exec_LDADD)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue