mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-22 23:32:39 +00:00
Merge multiboot into mbvid-spec
This commit is contained in:
commit
b711494093
16 files changed
+402
-446
No files matched your search
+14
-9
@@ -1,3 +1,6 @@
|
|||||||
|
gendocs.sh
|
||||||
|
lib
|
||||||
|
m4
|
||||||
.deps
|
.deps
|
||||||
Makefile
|
Makefile
|
||||||
autom4te.cache
|
autom4te.cache
|
||||||
@@ -7,9 +10,17 @@ config.log
|
|||||||
config.status
|
config.status
|
||||||
stamp-h
|
stamp-h
|
||||||
stamp-h1
|
stamp-h1
|
||||||
docs/Makefile
|
doc/Makefile
|
||||||
docs/*.info*
|
doc/*.info*
|
||||||
docs/.deps
|
doc/.deps
|
||||||
|
doc/gendocs_template
|
||||||
|
doc/mdate-sh
|
||||||
|
doc/Makefile.in
|
||||||
|
doc/boot.S.texi
|
||||||
|
doc/kernel
|
||||||
|
doc/kernel.c.texi
|
||||||
|
doc/multiboot.h.texi
|
||||||
|
doc/texinfo.tex
|
||||||
Makefile.in
|
Makefile.in
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
config.h.in
|
config.h.in
|
||||||
@@ -17,9 +28,3 @@ configure
|
|||||||
depcomp
|
depcomp
|
||||||
install-sh
|
install-sh
|
||||||
missing
|
missing
|
||||||
docs/Makefile.in
|
|
||||||
docs/boot.S.texi
|
|
||||||
docs/kernel
|
|
||||||
docs/kernel.c.texi
|
|
||||||
docs/multiboot.h.texi
|
|
||||||
docs/texinfo.tex
|
|
||||||
@@ -1,3 +1,94 @@
|
|||||||
|
2010-01-01 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* autogen.sh: Use `gnulib-tool' to install gendocs.sh.
|
||||||
|
* Makefile.am (web-manual): New target. Builds a web manual using
|
||||||
|
gendocs.sh.
|
||||||
|
* configure.ac (AC_PREREQ): Require Autoconf 2.59 or later.
|
||||||
|
|
||||||
|
2010-01-01 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
Use more standard `doc' directory.
|
||||||
|
|
||||||
|
* docs: Rename to ...
|
||||||
|
* doc: ... this. Update all users.
|
||||||
|
|
||||||
|
* doc/multiboot.texi: Fix an obsolete reference to `docs' directory
|
||||||
|
in GRUB distribution.
|
||||||
|
|
||||||
|
2010-01-01 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
Make ia32 libc unnecessary on amd64.
|
||||||
|
|
||||||
|
* configure.ac (CFLAGS): Move down after the basic gcc tests are
|
||||||
|
done. Add `-nostdlib'.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* configure.ac: Bump version to 0.6.96.
|
||||||
|
* docs/multiboot.texi: Include `version.texi' instead of hardcoding
|
||||||
|
version number.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* docs/Makefile.am (EXTRA_DIST): Remove `menu.lst'.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* autogen.sh: Workaround Automake requirement for NEWS and README.
|
||||||
|
We really should have them, but in practice we never had. This
|
||||||
|
ought not be considered a regression.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* BUGS: Remove.
|
||||||
|
* INSTALL: Remove.
|
||||||
|
* NEWS: Remove.
|
||||||
|
* README: Remove.
|
||||||
|
* autogen.sh: Adjust automake flags to add generic files such
|
||||||
|
as `INSTALL', `depcomp', `install-sh' and `missing'.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* docs/multiboot.texi: Bump version number to 0.6.96.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* docs/multiboot.texi: Misc editorial changes:
|
||||||
|
|
||||||
|
Avoid using `commercial' as a synonym for `non-free'
|
||||||
|
(see http://www.gnu.org/philosophy/words-to-avoid.html#Commercial).
|
||||||
|
|
||||||
|
Make a clear distinction between kernels and Operating Systems
|
||||||
|
(Linux is a kernel, FreeBSD and NetBSD are Operating Systems, Mach
|
||||||
|
is a microkernel, VSTa is something in-between).
|
||||||
|
|
||||||
|
Use 64-bit types to describe 64-bit datum (instead of splitting in
|
||||||
|
two 32-bit fields). Little endianess assumption applies (as per
|
||||||
|
Terminology section).
|
||||||
|
|
||||||
|
Update status of GNU GRUB relative to version 2.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* docs/multiboot.h: Replace with include/multiboot.h from GRUB 2 Bazaar
|
||||||
|
trunk.
|
||||||
|
* docs/kernel.c (cmain): Update name references for new multiboot.h
|
||||||
|
header.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* docs/multiboot.h (MULTIBOOT_HEADER_FLAGS): Moved from here ...
|
||||||
|
* docs/boot.S (MULTIBOOT_HEADER_FLAGS): ... to here.
|
||||||
|
|
||||||
|
2009-12-24 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
|
* docs/boot.S (ASM): Rename to ...
|
||||||
|
(ASM_FILE): ... this.
|
||||||
|
* docs/multiboot.h: Check for `ASM_FILE' instead of `ASM'.
|
||||||
|
|
||||||
|
* docs/multiboot.h (EXT_C, STACK_SIZE): Moved from here ...
|
||||||
|
* docs/boot.S (EXT_C, STACK_SIZE): ... to here.
|
||||||
|
|
||||||
2009-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
2009-12-13 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* docs/fdl.texi: Remove. It's not used.
|
* docs/fdl.texi: Remove. It's not used.
|
||||||
|
|||||||
@@ -1,266 +0,0 @@
|
|||||||
-*- Text -*-
|
|
||||||
|
|
||||||
This is the GRUB. Welcome.
|
|
||||||
|
|
||||||
This file contains instructions for compiling and installing the GRUB.
|
|
||||||
|
|
||||||
The Requirements
|
|
||||||
================
|
|
||||||
|
|
||||||
GRUB depends on some software packages installed into your system. If
|
|
||||||
you don't have any of them, please obtain and install them before
|
|
||||||
configuring the GRUB.
|
|
||||||
|
|
||||||
* GCC
|
|
||||||
|
|
||||||
Probably every recent GCC should work, but we recommend GCC 2.95 and
|
|
||||||
later, since you can create smaller binary images. See the web page
|
|
||||||
<http://gcc.gnu.org/>.
|
|
||||||
|
|
||||||
* GNU Make
|
|
||||||
|
|
||||||
For now, the Makefiles produced by Automake depends on GNU Make. See
|
|
||||||
the web page <http://www.gnu.org/software/make/make.html>.
|
|
||||||
|
|
||||||
* GNU binutils 2.9.1.0.23 or later
|
|
||||||
|
|
||||||
Binutils has changed the behavior of 16bit assembler between 2.9.1
|
|
||||||
and 2.9.1.0.x, and we support only 2.9.1.0.x and higher. In
|
|
||||||
particular, we recommend using binutils 2.10, since it is the only
|
|
||||||
public release that supports real 16bit mode. Please take a look at
|
|
||||||
the web page <http://sourceware.cygnus.com/binutils/>, for more
|
|
||||||
information. Note that you don't have to install it into any system
|
|
||||||
directory. See the section "Operation Controls", if you want to
|
|
||||||
install binutils into your own directory.
|
|
||||||
|
|
||||||
If you'd like to develop GRUB, these below are also required. Don't
|
|
||||||
forget to specify the option `--enable-maintainer-mode' when running the
|
|
||||||
configure script.
|
|
||||||
|
|
||||||
* Texinfo 4.0 or later
|
|
||||||
|
|
||||||
We use some new macros in the documents, so you need a recent
|
|
||||||
Texinfo release. See the web page
|
|
||||||
<http://www.gnu.org/software/texinfo/texinfo.html>.
|
|
||||||
|
|
||||||
* Developers: GNU Autoconf 2.5x and GNU Automake 1.7 or later
|
|
||||||
|
|
||||||
You should not need Automake just to compile GRUB, but you will need
|
|
||||||
it if you edit any of the build files (Makefile.am, configure.in,
|
|
||||||
etc). We use the new "per-executable flags" feature found in the
|
|
||||||
latest release of automake. See the web page
|
|
||||||
<http://www.gnu.org/software/automake/automake.html>.
|
|
||||||
|
|
||||||
|
|
||||||
Configuring the GRUB
|
|
||||||
====================
|
|
||||||
|
|
||||||
The `configure' shell script attempts to guess correct values for
|
|
||||||
various system-dependent variables used during compilation. It uses
|
|
||||||
those values to create a `Makefile' in each directory of the package.
|
|
||||||
It may also create one or more `.h' files containing system-dependent
|
|
||||||
definitions. Finally, it creates a shell script `config.status' that
|
|
||||||
you can run in the future to recreate the current configuration, a
|
|
||||||
file `config.cache' that saves the results of its tests to speed up
|
|
||||||
reconfiguring, and a file `config.log' containing compiler output
|
|
||||||
(useful mainly for debugging `configure').
|
|
||||||
|
|
||||||
If you need to do unusual things to compile the package, please try to
|
|
||||||
figure out how `configure' could check whether to do them, and mail
|
|
||||||
diffs or instructions to the address given in the `README' so they can
|
|
||||||
be considered for the next release. If at some point `config.cache'
|
|
||||||
contains results you don't want to keep, you may remove or edit it.
|
|
||||||
|
|
||||||
The file `configure.in' is used to create `configure' by a program
|
|
||||||
called `autoconf'. You only need `configure.in' if you want to change
|
|
||||||
it or regenerate `configure' using a newer version of `autoconf'.
|
|
||||||
|
|
||||||
|
|
||||||
Building the GRUB
|
|
||||||
=================
|
|
||||||
|
|
||||||
The simplest way to compile this package is:
|
|
||||||
|
|
||||||
1. `cd' to the directory containing the package's source code and
|
|
||||||
type `./configure' to configure the package for your system. If
|
|
||||||
you're using `csh' on an old version of System V, you might need
|
|
||||||
to type `sh ./configure' instead to prevent `csh' from trying to
|
|
||||||
execute `configure' itself.
|
|
||||||
|
|
||||||
Running `configure' takes awhile. While running, it prints some
|
|
||||||
messages telling which features it is checking for.
|
|
||||||
|
|
||||||
2. Type `make' to compile the package.
|
|
||||||
|
|
||||||
3. Optionally, type `make check' to run any self-tests that come with
|
|
||||||
the package.
|
|
||||||
|
|
||||||
4. Type `make install' to install the programs and any data files and
|
|
||||||
documentation.
|
|
||||||
|
|
||||||
5. You can remove the program binaries and object files from the
|
|
||||||
source code directory by typing `make clean'. To also remove the
|
|
||||||
files that `configure' created (so you can compile the package for
|
|
||||||
a different kind of computer), type `make distclean'. There is
|
|
||||||
also a `make maintainer-clean' target, but that is intended mainly
|
|
||||||
for the package's developers. If you use it, you may have to get
|
|
||||||
all sorts of other programs in order to regenerate files that came
|
|
||||||
with the distribution.
|
|
||||||
|
|
||||||
|
|
||||||
Compiling For Multiple Architectures
|
|
||||||
====================================
|
|
||||||
|
|
||||||
You can compile the package for more than one kind of computer at the
|
|
||||||
same time, by placing the object files for each architecture in their
|
|
||||||
own directory. `cd' to the directory where you want the object files
|
|
||||||
and executables to go and run the `configure' script. `configure'
|
|
||||||
automatically checks for the source code in the directory that
|
|
||||||
`configure' is in and in `..'.
|
|
||||||
|
|
||||||
|
|
||||||
Installation Names
|
|
||||||
==================
|
|
||||||
|
|
||||||
By default, `make install' will install the package's files in
|
|
||||||
`/usr/local/bin', `/usr/local/man', etc. You can specify an
|
|
||||||
installation prefix by giving `configure' the option `--prefix=PATH'.
|
|
||||||
|
|
||||||
You can specify separate installation prefixes for
|
|
||||||
architecture-specific files and architecture-independent files. If
|
|
||||||
you give `configure' the option `--exec-prefix=PATH', the package will
|
|
||||||
use PATH as the prefix for installing programs and libraries.
|
|
||||||
Documentation and other data files will still use the regular prefix.
|
|
||||||
|
|
||||||
In addition, if you use an unusual directory layout you can give
|
|
||||||
options like `--bindir=PATH' to specify different values for
|
|
||||||
particular kinds of files. Run `configure --help' for a list of the
|
|
||||||
directories you can set and what kinds of files go in them.
|
|
||||||
|
|
||||||
If the package supports it, you can cause programs to be installed
|
|
||||||
with an extra prefix or suffix on their names by giving `configure'
|
|
||||||
the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
|
||||||
|
|
||||||
Please note, however, that the GRUB knows where it is located in the
|
|
||||||
filesystem. If you have installed it in an unusual location, the
|
|
||||||
system might not work properly, or at all. The chief utility of these
|
|
||||||
options for the GRUB is to allow you to "install" in some alternate
|
|
||||||
location, and then copy these to the actual root filesystem later.
|
|
||||||
|
|
||||||
|
|
||||||
Sharing Defaults
|
|
||||||
================
|
|
||||||
|
|
||||||
If you want to set default values for `configure' scripts to share,
|
|
||||||
you can create a site shell script called `config.site' that gives
|
|
||||||
default values for variables like `CC', `cache_file', and `prefix'.
|
|
||||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
|
||||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
|
||||||
`CONFIG_SITE' environment variable to the location of the site script.
|
|
||||||
A warning: not all `configure' scripts look for a site script.
|
|
||||||
|
|
||||||
|
|
||||||
Operation Controls
|
|
||||||
==================
|
|
||||||
|
|
||||||
`configure' recognizes the following options to control how it
|
|
||||||
operates.
|
|
||||||
|
|
||||||
`--cache-file=FILE'
|
|
||||||
Use and save the results of the tests in FILE instead of
|
|
||||||
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
|
|
||||||
debugging `configure'.
|
|
||||||
|
|
||||||
`--help'
|
|
||||||
Print a summary of the options to `configure', and exit.
|
|
||||||
|
|
||||||
`--quiet'
|
|
||||||
`--silent'
|
|
||||||
`-q'
|
|
||||||
Do not print messages saying which checks are being made.
|
|
||||||
|
|
||||||
`--srcdir=DIR'
|
|
||||||
Look for the package's source code in directory DIR. Usually
|
|
||||||
`configure' can determine that directory automatically.
|
|
||||||
|
|
||||||
`--version'
|
|
||||||
Print the version of Autoconf used to generate the `configure'
|
|
||||||
script, and exit.
|
|
||||||
|
|
||||||
`--enable-maintainer-mode'
|
|
||||||
Enable make rules and dependencies not useful (and sometimes
|
|
||||||
confusing) to the casual installer. If you are a GRUB developer,
|
|
||||||
it is a good idea to specify this option.
|
|
||||||
|
|
||||||
`--disable-ext2fs'
|
|
||||||
Omit the ext2fs support in Stage 2.
|
|
||||||
|
|
||||||
`--disable-fat'
|
|
||||||
Omit the FAT support in Stage 2.
|
|
||||||
|
|
||||||
`--disable-ffs'
|
|
||||||
Omit the FFS support in Stage 2.
|
|
||||||
|
|
||||||
`--disable-minix'
|
|
||||||
Omit the Minix fs support in Stage 2.
|
|
||||||
|
|
||||||
`--disable-reiserfs'
|
|
||||||
Omit the ReiserFS support in Stage 2.
|
|
||||||
|
|
||||||
`--disable-vstafs'
|
|
||||||
Omit the VSTa filesystem support in Stage 2.
|
|
||||||
|
|
||||||
`--disable-jfs'
|
|
||||||
Omit the JFS support in Stage 2.
|
|
||||||
|
|
||||||
`--disable-xfs'
|
|
||||||
Omit the XFS support in Stage 2.
|
|
||||||
|
|
||||||
`--disable-ufs2'
|
|
||||||
Omit the UFS2 support in Stage 2.
|
|
||||||
|
|
||||||
`--disable-iso9660'
|
|
||||||
Omit the ISO9660 support in Stage 2.
|
|
||||||
|
|
||||||
`--disable-gunzip'
|
|
||||||
Omit the decompression support in Stage 2.
|
|
||||||
|
|
||||||
`--disable-md5-password'
|
|
||||||
Omit the MD5 password support in Stage2.
|
|
||||||
|
|
||||||
`--with-binutils=PATH'
|
|
||||||
Search the path PATH to find binutils. If you have installed your
|
|
||||||
binutils executables into an unusual location where GCC doesn't
|
|
||||||
search by default, use this option.
|
|
||||||
|
|
||||||
`--without-curses'
|
|
||||||
Don't use the curses library.
|
|
||||||
|
|
||||||
`--disable-hercules'
|
|
||||||
Omit the hercules console support in Stage 2.
|
|
||||||
|
|
||||||
`--disable-serial'
|
|
||||||
Omit the serial terminal support in Stage 2.
|
|
||||||
|
|
||||||
`--enable-serial-speed-simulation'
|
|
||||||
Simulate the slowness of a serial device in the grub shell. This
|
|
||||||
option is useful for GRUB developers, as you can test the
|
|
||||||
performance of a terminal emulation even on pseudo terminals.
|
|
||||||
|
|
||||||
`--enable-preset-menu=FILE'
|
|
||||||
Preset a menu file FILE in Stage 2. This is useful, if you cannot
|
|
||||||
put a configuration file on a filesystem for some reason (e.g. when
|
|
||||||
you need to set the default terminal to a serial terminal in an
|
|
||||||
embedded system).
|
|
||||||
|
|
||||||
`--enable-example-kernel'
|
|
||||||
Build the example Multiboot kernel in the directory "docs". You
|
|
||||||
will be able to boot the image "kernel" with GRUB.
|
|
||||||
|
|
||||||
`--disable-auto-linux-mem-opt'
|
|
||||||
Don't pass the "mem=" option automatically, when booting Linux.
|
|
||||||
You can also disable the feature at run time.
|
|
||||||
|
|
||||||
|
|
||||||
`configure' also accepts several options for the network support. See
|
|
||||||
the file `netboot/README.netboot', for more information.
|
|
||||||
+9
-1
@@ -1,3 +1,11 @@
|
|||||||
# Do not change this order if you don't know what you are doing.
|
# Do not change this order if you don't know what you are doing.
|
||||||
AUTOMAKE_OPTIONS = 1.7 gnu
|
AUTOMAKE_OPTIONS = 1.7 gnu
|
||||||
SUBDIRS = docs
|
SUBDIRS = doc
|
||||||
|
|
||||||
|
.PHONY: web-manual
|
||||||
|
web-manual:
|
||||||
|
@cd '$(srcdir)/doc' ; \
|
||||||
|
$(SHELL) ../gendocs.sh -o '$(abs_builddir)/doc/manual' \
|
||||||
|
--email $(PACKAGE_BUGREPORT) $(PACKAGE) \
|
||||||
|
"$(PACKAGE_NAME) - $(manual_title)"
|
||||||
|
@echo " *** Upload the doc/manual directory to web-cvs."
|
||||||
+6
-1
@@ -2,9 +2,14 @@
|
|||||||
|
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
|
gnulib-tool --import gendocs
|
||||||
aclocal
|
aclocal
|
||||||
autoheader
|
autoheader
|
||||||
automake --add-missing
|
|
||||||
|
# Automake is unhappy without NEWS and README, but we don't have any
|
||||||
|
touch NEWS README
|
||||||
|
automake -a -c -f
|
||||||
|
|
||||||
autoconf
|
autoconf
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
+6
-7
@@ -1,5 +1,5 @@
|
|||||||
dnl Configure script for GRUB.
|
dnl Configure script for GRUB.
|
||||||
dnl Copyright 1999,2000,2001,2002,2003,2004,2005,2008,2009 Free Software Foundation, Inc.
|
dnl Copyright 1999,2000,2001,2002,2003,2004,2005,2008,2009,2010 Free Software Foundation, Inc.
|
||||||
|
|
||||||
dnl Permission to use, copy, modify and distribute this software and its
|
dnl Permission to use, copy, modify and distribute this software and its
|
||||||
dnl documentation is hereby granted, provided that both the copyright
|
dnl documentation is hereby granted, provided that both the copyright
|
||||||
@@ -12,14 +12,12 @@ dnl "AS IS" CONDITION. THE FREE SOFTWARE FOUNDATION DISCLAIMS ANY
|
|||||||
dnl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
|
dnl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE
|
||||||
dnl USE OF THIS SOFTWARE.
|
dnl USE OF THIS SOFTWARE.
|
||||||
|
|
||||||
AC_PREREQ(2.57)
|
AC_PREREQ(2.59)
|
||||||
AC_INIT([Multiboot], [0.6.95], [bug-grub@gnu.org])
|
AC_INIT([Multiboot], [0.6.96], [bug-grub@gnu.org])
|
||||||
AC_CONFIG_SRCDIR([docs/multiboot.texi])
|
AC_CONFIG_SRCDIR([doc/multiboot.texi])
|
||||||
AC_CONFIG_HEADER([config.h])
|
AC_CONFIG_HEADER([config.h])
|
||||||
AM_INIT_AUTOMAKE
|
AM_INIT_AUTOMAKE
|
||||||
|
|
||||||
CFLAGS="-m32 $CFLAGS"
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Programs
|
# Programs
|
||||||
#
|
#
|
||||||
@@ -44,7 +42,8 @@ dnl Because recent automake complains about CCASFLAGS, set it here.
|
|||||||
CCASFLAGS='$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)'
|
CCASFLAGS='$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)'
|
||||||
AC_SUBST(CCASFLAGS)
|
AC_SUBST(CCASFLAGS)
|
||||||
|
|
||||||
|
CFLAGS="-m32 -nostdlib $CFLAGS"
|
||||||
|
|
||||||
dnl Output.
|
dnl Output.
|
||||||
AC_CONFIG_FILES([Makefile docs/Makefile])
|
AC_CONFIG_FILES([Makefile doc/Makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
@@ -16,7 +16,7 @@ kernel_LDFLAGS = -nostdlib -Wl,-N -Wl,-Ttext -Wl,100000 -Wl,--build-id=none
|
|||||||
boot.o: multiboot.h
|
boot.o: multiboot.h
|
||||||
endif
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = menu.lst $(man_MANS) $(noinst_SCRIPTS) \
|
EXTRA_DIST = $(man_MANS) $(noinst_SCRIPTS) \
|
||||||
$(EXAMPLES) $(multiboot_TEXINFOS)
|
$(EXAMPLES) $(multiboot_TEXINFOS)
|
||||||
CLEANFILES = $(noinst_PROGRAMS)
|
CLEANFILES = $(noinst_PROGRAMS)
|
||||||
|
|
||||||
@@ -15,8 +15,25 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||||
|
|
||||||
#define ASM 1
|
#define ASM_FILE 1
|
||||||
#include <multiboot.h>
|
#include <multiboot.h>
|
||||||
|
|
||||||
|
/* C symbol format. HAVE_ASM_USCORE is defined by configure. */
|
||||||
|
#ifdef HAVE_ASM_USCORE
|
||||||
|
# define EXT_C(sym) _ ## sym
|
||||||
|
#else
|
||||||
|
# define EXT_C(sym) sym
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* The size of our stack (16KB). */
|
||||||
|
#define STACK_SIZE 0x4000
|
||||||
|
|
||||||
|
/* The flags for the Multiboot header. */
|
||||||
|
#ifdef __ELF__
|
||||||
|
# define MULTIBOOT_HEADER_FLAGS 0x00000003
|
||||||
|
#else
|
||||||
|
# define MULTIBOOT_HEADER_FLAGS 0x00010003
|
||||||
|
#endif
|
||||||
|
|
||||||
.text
|
.text
|
||||||
|
|
||||||
@@ -86,18 +86,18 @@ cmain (unsigned long magic, unsigned long addr)
|
|||||||
/* Are mods_* valid? */
|
/* Are mods_* valid? */
|
||||||
if (CHECK_FLAG (mbi->flags, 3))
|
if (CHECK_FLAG (mbi->flags, 3))
|
||||||
{
|
{
|
||||||
module_t *mod;
|
multiboot_module_t *mod;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
printf ("mods_count = %d, mods_addr = 0x%x\n",
|
printf ("mods_count = %d, mods_addr = 0x%x\n",
|
||||||
(int) mbi->mods_count, (int) mbi->mods_addr);
|
(int) mbi->mods_count, (int) mbi->mods_addr);
|
||||||
for (i = 0, mod = (module_t *) mbi->mods_addr;
|
for (i = 0, mod = (multiboot_module_t *) mbi->mods_addr;
|
||||||
i < mbi->mods_count;
|
i < mbi->mods_count;
|
||||||
i++, mod++)
|
i++, mod++)
|
||||||
printf (" mod_start = 0x%x, mod_end = 0x%x, string = %s\n",
|
printf (" mod_start = 0x%x, mod_end = 0x%x, cmdline = %s\n",
|
||||||
(unsigned) mod->mod_start,
|
(unsigned) mod->mod_start,
|
||||||
(unsigned) mod->mod_end,
|
(unsigned) mod->mod_end,
|
||||||
(char *) mod->string);
|
(char *) mod->cmdline);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Bits 4 and 5 are mutually exclusive! */
|
/* Bits 4 and 5 are mutually exclusive! */
|
||||||
@@ -110,44 +110,44 @@ cmain (unsigned long magic, unsigned long addr)
|
|||||||
/* Is the symbol table of a.out valid? */
|
/* Is the symbol table of a.out valid? */
|
||||||
if (CHECK_FLAG (mbi->flags, 4))
|
if (CHECK_FLAG (mbi->flags, 4))
|
||||||
{
|
{
|
||||||
aout_symbol_table_t *aout_sym = &(mbi->u.aout_sym);
|
multiboot_aout_symbol_table_t *multiboot_aout_sym = &(mbi->u.aout_sym);
|
||||||
|
|
||||||
printf ("aout_symbol_table: tabsize = 0x%0x, "
|
printf ("multiboot_aout_symbol_table: tabsize = 0x%0x, "
|
||||||
"strsize = 0x%x, addr = 0x%x\n",
|
"strsize = 0x%x, addr = 0x%x\n",
|
||||||
(unsigned) aout_sym->tabsize,
|
(unsigned) multiboot_aout_sym->tabsize,
|
||||||
(unsigned) aout_sym->strsize,
|
(unsigned) multiboot_aout_sym->strsize,
|
||||||
(unsigned) aout_sym->addr);
|
(unsigned) multiboot_aout_sym->addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Is the section header table of ELF valid? */
|
/* Is the section header table of ELF valid? */
|
||||||
if (CHECK_FLAG (mbi->flags, 5))
|
if (CHECK_FLAG (mbi->flags, 5))
|
||||||
{
|
{
|
||||||
elf_section_header_table_t *elf_sec = &(mbi->u.elf_sec);
|
multiboot_elf_section_header_table_t *multiboot_elf_sec = &(mbi->u.elf_sec);
|
||||||
|
|
||||||
printf ("elf_sec: num = %u, size = 0x%x,"
|
printf ("multiboot_elf_sec: num = %u, size = 0x%x,"
|
||||||
" addr = 0x%x, shndx = 0x%x\n",
|
" addr = 0x%x, shndx = 0x%x\n",
|
||||||
(unsigned) elf_sec->num, (unsigned) elf_sec->size,
|
(unsigned) multiboot_elf_sec->num, (unsigned) multiboot_elf_sec->size,
|
||||||
(unsigned) elf_sec->addr, (unsigned) elf_sec->shndx);
|
(unsigned) multiboot_elf_sec->addr, (unsigned) multiboot_elf_sec->shndx);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Are mmap_* valid? */
|
/* Are mmap_* valid? */
|
||||||
if (CHECK_FLAG (mbi->flags, 6))
|
if (CHECK_FLAG (mbi->flags, 6))
|
||||||
{
|
{
|
||||||
memory_map_t *mmap;
|
multiboot_memory_map_t *mmap;
|
||||||
|
|
||||||
printf ("mmap_addr = 0x%x, mmap_length = 0x%x\n",
|
printf ("mmap_addr = 0x%x, mmap_length = 0x%x\n",
|
||||||
(unsigned) mbi->mmap_addr, (unsigned) mbi->mmap_length);
|
(unsigned) mbi->mmap_addr, (unsigned) mbi->mmap_length);
|
||||||
for (mmap = (memory_map_t *) mbi->mmap_addr;
|
for (mmap = (multiboot_memory_map_t *) mbi->mmap_addr;
|
||||||
(unsigned long) mmap < mbi->mmap_addr + mbi->mmap_length;
|
(unsigned long) mmap < mbi->mmap_addr + mbi->mmap_length;
|
||||||
mmap = (memory_map_t *) ((unsigned long) mmap
|
mmap = (multiboot_memory_map_t *) ((unsigned long) mmap
|
||||||
+ mmap->size + sizeof (mmap->size)))
|
+ mmap->size + sizeof (mmap->size)))
|
||||||
printf (" size = 0x%x, base_addr = 0x%x%x,"
|
printf (" size = 0x%x, base_addr = 0x%x%x,"
|
||||||
" length = 0x%x%x, type = 0x%x\n",
|
" length = 0x%x%x, type = 0x%x\n",
|
||||||
(unsigned) mmap->size,
|
(unsigned) mmap->size,
|
||||||
(unsigned) mmap->base_addr_high,
|
mmap->addr >> 32,
|
||||||
(unsigned) mmap->base_addr_low,
|
mmap->addr & 0xffffffff,
|
||||||
(unsigned) mmap->length_high,
|
mmap->len >> 32,
|
||||||
(unsigned) mmap->length_low,
|
mmap->len & 0xffffffff,
|
||||||
(unsigned) mmap->type);
|
(unsigned) mmap->type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+223
@@ -0,0 +1,223 @@
|
|||||||
|
/* multiboot.h - Multiboot header file. */
|
||||||
|
/* Copyright (C) 1999,2003,2007,2008,2009 Free Software Foundation, Inc.
|
||||||
|
*
|
||||||
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
* of this software and associated documentation files (the "Software"), to
|
||||||
|
* deal in the Software without restriction, including without limitation the
|
||||||
|
* rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
* sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
* furnished to do so, subject to the following conditions:
|
||||||
|
*
|
||||||
|
* The above copyright notice and this permission notice shall be included in
|
||||||
|
* all copies or substantial portions of the Software.
|
||||||
|
*
|
||||||
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ANY
|
||||||
|
* DEVELOPER OR DISTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
|
||||||
|
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MULTIBOOT_HEADER
|
||||||
|
#define MULTIBOOT_HEADER 1
|
||||||
|
|
||||||
|
/* How many bytes from the start of the file we search for the header. */
|
||||||
|
#define MULTIBOOT_SEARCH 8192
|
||||||
|
|
||||||
|
/* The magic field should contain this. */
|
||||||
|
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002
|
||||||
|
|
||||||
|
/* This should be in %eax. */
|
||||||
|
#define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
|
||||||
|
|
||||||
|
/* The bits in the required part of flags field we don't support. */
|
||||||
|
#define MULTIBOOT_UNSUPPORTED 0x0000fffc
|
||||||
|
|
||||||
|
/* Alignment of multiboot modules. */
|
||||||
|
#define MULTIBOOT_MOD_ALIGN 0x00001000
|
||||||
|
|
||||||
|
/* Alignment of the multiboot info structure. */
|
||||||
|
#define MULTIBOOT_INFO_ALIGN 0x00000004
|
||||||
|
|
||||||
|
/* Flags set in the 'flags' member of the multiboot header. */
|
||||||
|
|
||||||
|
/* Align all boot modules on i386 page (4KB) boundaries. */
|
||||||
|
#define MULTIBOOT_PAGE_ALIGN 0x00000001
|
||||||
|
|
||||||
|
/* Must pass memory information to OS. */
|
||||||
|
#define MULTIBOOT_MEMORY_INFO 0x00000002
|
||||||
|
|
||||||
|
/* Must pass video information to OS. */
|
||||||
|
#define MULTIBOOT_VIDEO_MODE 0x00000004
|
||||||
|
|
||||||
|
/* This flag indicates the use of the address fields in the header. */
|
||||||
|
#define MULTIBOOT_AOUT_KLUDGE 0x00010000
|
||||||
|
|
||||||
|
/* Flags to be set in the 'flags' member of the multiboot info structure. */
|
||||||
|
|
||||||
|
/* is there basic lower/upper memory information? */
|
||||||
|
#define MULTIBOOT_INFO_MEMORY 0x00000001
|
||||||
|
/* is there a boot device set? */
|
||||||
|
#define MULTIBOOT_INFO_BOOTDEV 0x00000002
|
||||||
|
/* is the command-line defined? */
|
||||||
|
#define MULTIBOOT_INFO_CMDLINE 0x00000004
|
||||||
|
/* are there modules to do something with? */
|
||||||
|
#define MULTIBOOT_INFO_MODS 0x00000008
|
||||||
|
|
||||||
|
/* These next two are mutually exclusive */
|
||||||
|
|
||||||
|
/* is there a symbol table loaded? */
|
||||||
|
#define MULTIBOOT_INFO_AOUT_SYMS 0x00000010
|
||||||
|
/* is there an ELF section header table? */
|
||||||
|
#define MULTIBOOT_INFO_ELF_SHDR 0X00000020
|
||||||
|
|
||||||
|
/* is there a full memory map? */
|
||||||
|
#define MULTIBOOT_INFO_MEM_MAP 0x00000040
|
||||||
|
|
||||||
|
/* Is there drive info? */
|
||||||
|
#define MULTIBOOT_INFO_DRIVE_INFO 0x00000080
|
||||||
|
|
||||||
|
/* Is there a config table? */
|
||||||
|
#define MULTIBOOT_INFO_CONFIG_TABLE 0x00000100
|
||||||
|
|
||||||
|
/* Is there a boot loader name? */
|
||||||
|
#define MULTIBOOT_INFO_BOOT_LOADER_NAME 0x00000200
|
||||||
|
|
||||||
|
/* Is there a APM table? */
|
||||||
|
#define MULTIBOOT_INFO_APM_TABLE 0x00000400
|
||||||
|
|
||||||
|
/* Is there video information? */
|
||||||
|
#define MULTIBOOT_INFO_VIDEO_INFO 0x00000800
|
||||||
|
|
||||||
|
#ifndef ASM_FILE
|
||||||
|
|
||||||
|
typedef unsigned short multiboot_uint16_t;
|
||||||
|
typedef unsigned int multiboot_uint32_t;
|
||||||
|
typedef unsigned long long multiboot_uint64_t;
|
||||||
|
|
||||||
|
struct multiboot_header
|
||||||
|
{
|
||||||
|
/* Must be MULTIBOOT_MAGIC - see above. */
|
||||||
|
multiboot_uint32_t magic;
|
||||||
|
|
||||||
|
/* Feature flags. */
|
||||||
|
multiboot_uint32_t flags;
|
||||||
|
|
||||||
|
/* The above fields plus this one must equal 0 mod 2^32. */
|
||||||
|
multiboot_uint32_t checksum;
|
||||||
|
|
||||||
|
/* These are only valid if MULTIBOOT_AOUT_KLUDGE is set. */
|
||||||
|
multiboot_uint32_t header_addr;
|
||||||
|
multiboot_uint32_t load_addr;
|
||||||
|
multiboot_uint32_t load_end_addr;
|
||||||
|
multiboot_uint32_t bss_end_addr;
|
||||||
|
multiboot_uint32_t entry_addr;
|
||||||
|
|
||||||
|
/* These are only valid if MULTIBOOT_VIDEO_MODE is set. */
|
||||||
|
multiboot_uint32_t mode_type;
|
||||||
|
multiboot_uint32_t width;
|
||||||
|
multiboot_uint32_t height;
|
||||||
|
multiboot_uint32_t depth;
|
||||||
|
};
|
||||||
|
|
||||||
|
/* The symbol table for a.out. */
|
||||||
|
struct multiboot_aout_symbol_table
|
||||||
|
{
|
||||||
|
multiboot_uint32_t tabsize;
|
||||||
|
multiboot_uint32_t strsize;
|
||||||
|
multiboot_uint32_t addr;
|
||||||
|
multiboot_uint32_t reserved;
|
||||||
|
};
|
||||||
|
typedef struct multiboot_aout_symbol_table multiboot_aout_symbol_table_t;
|
||||||
|
|
||||||
|
/* The section header table for ELF. */
|
||||||
|
struct multiboot_elf_section_header_table
|
||||||
|
{
|
||||||
|
multiboot_uint32_t num;
|
||||||
|
multiboot_uint32_t size;
|
||||||
|
multiboot_uint32_t addr;
|
||||||
|
multiboot_uint32_t shndx;
|
||||||
|
};
|
||||||
|
typedef struct multiboot_elf_section_header_table multiboot_elf_section_header_table_t;
|
||||||
|
|
||||||
|
struct multiboot_info
|
||||||
|
{
|
||||||
|
/* Multiboot info version number */
|
||||||
|
multiboot_uint32_t flags;
|
||||||
|
|
||||||
|
/* Available memory from BIOS */
|
||||||
|
multiboot_uint32_t mem_lower;
|
||||||
|
multiboot_uint32_t mem_upper;
|
||||||
|
|
||||||
|
/* "root" partition */
|
||||||
|
multiboot_uint32_t boot_device;
|
||||||
|
|
||||||
|
/* Kernel command line */
|
||||||
|
multiboot_uint32_t cmdline;
|
||||||
|
|
||||||
|
/* Boot-Module list */
|
||||||
|
multiboot_uint32_t mods_count;
|
||||||
|
multiboot_uint32_t mods_addr;
|
||||||
|
|
||||||
|
union
|
||||||
|
{
|
||||||
|
multiboot_aout_symbol_table_t aout_sym;
|
||||||
|
multiboot_elf_section_header_table_t elf_sec;
|
||||||
|
} u;
|
||||||
|
|
||||||
|
/* Memory Mapping buffer */
|
||||||
|
multiboot_uint32_t mmap_length;
|
||||||
|
multiboot_uint32_t mmap_addr;
|
||||||
|
|
||||||
|
/* Drive Info buffer */
|
||||||
|
multiboot_uint32_t drives_length;
|
||||||
|
multiboot_uint32_t drives_addr;
|
||||||
|
|
||||||
|
/* ROM configuration table */
|
||||||
|
multiboot_uint32_t config_table;
|
||||||
|
|
||||||
|
/* Boot Loader Name */
|
||||||
|
multiboot_uint32_t boot_loader_name;
|
||||||
|
|
||||||
|
/* APM table */
|
||||||
|
multiboot_uint32_t apm_table;
|
||||||
|
|
||||||
|
/* Video */
|
||||||
|
multiboot_uint32_t vbe_control_info;
|
||||||
|
multiboot_uint32_t vbe_mode_info;
|
||||||
|
multiboot_uint16_t vbe_mode;
|
||||||
|
multiboot_uint16_t vbe_interface_seg;
|
||||||
|
multiboot_uint16_t vbe_interface_off;
|
||||||
|
multiboot_uint16_t vbe_interface_len;
|
||||||
|
};
|
||||||
|
typedef struct multiboot_info multiboot_info_t;
|
||||||
|
|
||||||
|
struct multiboot_mmap_entry
|
||||||
|
{
|
||||||
|
multiboot_uint32_t size;
|
||||||
|
multiboot_uint64_t addr;
|
||||||
|
multiboot_uint64_t len;
|
||||||
|
#define MULTIBOOT_MEMORY_AVAILABLE 1
|
||||||
|
#define MULTIBOOT_MEMORY_RESERVED 2
|
||||||
|
multiboot_uint32_t type;
|
||||||
|
} __attribute__((packed));
|
||||||
|
typedef struct multiboot_mmap_entry multiboot_memory_map_t;
|
||||||
|
|
||||||
|
struct multiboot_mod_list
|
||||||
|
{
|
||||||
|
/* the memory used goes from bytes 'mod_start' to 'mod_end-1' inclusive */
|
||||||
|
multiboot_uint32_t mod_start;
|
||||||
|
multiboot_uint32_t mod_end;
|
||||||
|
|
||||||
|
/* Module command line */
|
||||||
|
multiboot_uint32_t cmdline;
|
||||||
|
|
||||||
|
/* padding to take it to 16 bytes (must be zero) */
|
||||||
|
multiboot_uint32_t pad;
|
||||||
|
};
|
||||||
|
typedef struct multiboot_mod_list multiboot_module_t;
|
||||||
|
|
||||||
|
#endif /* ! ASM_FILE */
|
||||||
|
|
||||||
|
#endif /* ! MULTIBOOT_HEADER */
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
\input texinfo @c -*-texinfo-*-
|
\input texinfo @c -*-texinfo-*-
|
||||||
@c %**start of header
|
@c %**start of header
|
||||||
@setfilename multiboot.info
|
@setfilename multiboot.info
|
||||||
@set VERSION 0.6.95
|
@include version.texi
|
||||||
@settitle Multiboot Specification version @value{VERSION}
|
@settitle Multiboot Specification version @value{VERSION}
|
||||||
@c Unify all our little indices for now.
|
@c Unify all our little indices for now.
|
||||||
@syncodeindex fn cp
|
@syncodeindex fn cp
|
||||||
@@ -20,7 +20,7 @@ Copyright @copyright{} 1995,96 Bryan Ford <baford@@cs.utah.edu>
|
|||||||
|
|
||||||
Copyright @copyright{} 1995,96 Erich Stefan Boleyn <erich@@uruk.org>
|
Copyright @copyright{} 1995,96 Erich Stefan Boleyn <erich@@uruk.org>
|
||||||
|
|
||||||
Copyright @copyright{} 1999,2000,2001,2002,2005,2006 Free Software Foundation, Inc.
|
Copyright @copyright{} 1999,2000,2001,2002,2005,2006,2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
@quotation
|
@quotation
|
||||||
Permission is granted to make and distribute verbatim copies of
|
Permission is granted to make and distribute verbatim copies of
|
||||||
@@ -112,7 +112,7 @@ choice of boot loaders for a particular operating system --- if the one
|
|||||||
that comes with the operating system doesn't do exactly what you want,
|
that comes with the operating system doesn't do exactly what you want,
|
||||||
or doesn't work on your machine, you're screwed.
|
or doesn't work on your machine, you're screwed.
|
||||||
|
|
||||||
While we may not be able to fix this problem in existing commercial
|
While we may not be able to fix this problem in existing proprietary
|
||||||
operating systems, it shouldn't be too difficult for a few people in the
|
operating systems, it shouldn't be too difficult for a few people in the
|
||||||
free operating system communities to put their heads together and solve
|
free operating system communities to put their heads together and solve
|
||||||
this problem for the popular free operating systems. That's what this
|
this problem for the popular free operating systems. That's what this
|
||||||
@@ -141,10 +141,10 @@ This specification is targeted toward free 32-bit operating systems
|
|||||||
that can be fairly easily modified to support the specification without
|
that can be fairly easily modified to support the specification without
|
||||||
going through lots of bureaucratic rigmarole. The particular free
|
going through lots of bureaucratic rigmarole. The particular free
|
||||||
operating systems that this specification is being primarily designed
|
operating systems that this specification is being primarily designed
|
||||||
for are Linux, FreeBSD, NetBSD, Mach, and VSTa. It is hoped that other
|
for are Linux, the kernels of FreeBSD and NetBSD, Mach, and VSTa. It is hoped that other
|
||||||
emerging free operating systems will adopt it from the start, and thus
|
emerging free operating systems will adopt it from the start, and thus
|
||||||
immediately be able to take advantage of existing boot loaders. It would
|
immediately be able to take advantage of existing boot loaders. It would
|
||||||
be nice if commercial operating system vendors eventually adopted this
|
be nice if proprietary operating system vendors eventually adopted this
|
||||||
specification as well, but that's probably a pipe dream.
|
specification as well, but that's probably a pipe dream.
|
||||||
|
|
||||||
|
|
||||||
@@ -221,7 +221,7 @@ Multiboot-compliant.
|
|||||||
@node Boot modules
|
@node Boot modules
|
||||||
@section Boot modules
|
@section Boot modules
|
||||||
|
|
||||||
Many modern operating system kernels, such as those of VSTa and Mach, do
|
Many modern operating system kernels, such as Mach and the microkernel in VSTa, do
|
||||||
not by themselves contain enough mechanism to get the system fully
|
not by themselves contain enough mechanism to get the system fully
|
||||||
operational: they require the presence of additional software modules at
|
operational: they require the presence of additional software modules at
|
||||||
boot time in order to access devices, mount file systems, etc. While
|
boot time in order to access devices, mount file systems, etc. While
|
||||||
@@ -801,22 +801,17 @@ buffer consists of one or more of the following size/structure pairs
|
|||||||
+-------------------+
|
+-------------------+
|
||||||
-4 | size |
|
-4 | size |
|
||||||
+-------------------+
|
+-------------------+
|
||||||
0 | base_addr_low |
|
0 | base_addr |
|
||||||
4 | base_addr_high |
|
8 | length |
|
||||||
8 | length_low |
|
|
||||||
12 | length_high |
|
|
||||||
16 | type |
|
16 | type |
|
||||||
+-------------------+
|
+-------------------+
|
||||||
@end group
|
@end group
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
where @samp{size} is the size of the associated structure in bytes, which
|
where @samp{size} is the size of the associated structure in bytes, which
|
||||||
can be greater than the minimum of 20 bytes. @samp{base_addr_low} is the
|
can be greater than the minimum of 20 bytes. @samp{base_addr} is the
|
||||||
lower 32 bits of the starting address, and @samp{base_addr_high} is the
|
starting address. @samp{length} is the size of the memory region in bytes.
|
||||||
upper 32 bits, for a total of a 64-bit starting address. @samp{length_low}
|
@samp{type} is the variety of address range represented, where a
|
||||||
is the lower 32 bits of the size of the memory region in bytes, and
|
|
||||||
@samp{length_high} is the upper 32 bits, for a total of a 64-bit
|
|
||||||
length. @samp{type} is the variety of address range represented, where a
|
|
||||||
value of 1 indicates available @sc{ram}, and all other values currently
|
value of 1 indicates available @sc{ram}, and all other values currently
|
||||||
indicated a reserved area.
|
indicated a reserved area.
|
||||||
|
|
||||||
@@ -1129,7 +1124,7 @@ included. The kernel just prints out the Multiboot information structure
|
|||||||
on the screen, so you can make use of the kernel to test a
|
on the screen, so you can make use of the kernel to test a
|
||||||
Multiboot-compliant boot loader and for reference to how to implement a
|
Multiboot-compliant boot loader and for reference to how to implement a
|
||||||
Multiboot kernel. The source files can be found under the directory
|
Multiboot kernel. The source files can be found under the directory
|
||||||
@file{docs} in the GRUB distribution.
|
@file{doc} in the Multiboot source distribution.
|
||||||
|
|
||||||
The kernel @file{kernel} consists of only three files: @file{boot.S},
|
The kernel @file{kernel} consists of only three files: @file{boot.S},
|
||||||
@file{kernel.c} and @file{multiboot.h}. The assembly source
|
@file{kernel.c} and @file{multiboot.h}. The assembly source
|
||||||
@@ -1199,8 +1194,8 @@ library supporting the specification.
|
|||||||
@section Example boot loader code
|
@section Example boot loader code
|
||||||
|
|
||||||
The GNU GRUB (@pxref{Top, , GRUB, grub.info, The GRUB manual}) project
|
The GNU GRUB (@pxref{Top, , GRUB, grub.info, The GRUB manual}) project
|
||||||
is a full Multiboot-compliant boot loader, supporting all required and
|
is a Multiboot-compliant boot loader, supporting all required and
|
||||||
optional features present in this specification. A public release has
|
many optional features present in this specification. A public release has
|
||||||
not been made, but the test release is available from:
|
not been made, but the test release is available from:
|
||||||
|
|
||||||
@url{ftp://alpha.gnu.org/gnu/grub}
|
@url{ftp://alpha.gnu.org/gnu/grub}
|
||||||
File renamed without changes.
@@ -1,119 +0,0 @@
|
|||||||
/* multiboot.h - the header for Multiboot */
|
|
||||||
/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation; either version 2 of the License, or
|
|
||||||
(at your option) any later version.
|
|
||||||
|
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
GNU General Public License for more details.
|
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program; if not, write to the Free Software
|
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|
||||||
|
|
||||||
/* Macros. */
|
|
||||||
|
|
||||||
/* The magic number for the Multiboot header. */
|
|
||||||
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002
|
|
||||||
|
|
||||||
/* The flags for the Multiboot header. */
|
|
||||||
#ifdef __ELF__
|
|
||||||
# define MULTIBOOT_HEADER_FLAGS 0x00000003
|
|
||||||
#else
|
|
||||||
# define MULTIBOOT_HEADER_FLAGS 0x00010003
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* The magic number passed by a Multiboot-compliant boot loader. */
|
|
||||||
#define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
|
|
||||||
|
|
||||||
/* The size of our stack (16KB). */
|
|
||||||
#define STACK_SIZE 0x4000
|
|
||||||
|
|
||||||
/* C symbol format. HAVE_ASM_USCORE is defined by configure. */
|
|
||||||
#ifdef HAVE_ASM_USCORE
|
|
||||||
# define EXT_C(sym) _ ## sym
|
|
||||||
#else
|
|
||||||
# define EXT_C(sym) sym
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef ASM
|
|
||||||
/* Do not include here in boot.S. */
|
|
||||||
|
|
||||||
/* Types. */
|
|
||||||
|
|
||||||
/* The Multiboot header. */
|
|
||||||
typedef struct multiboot_header
|
|
||||||
{
|
|
||||||
unsigned long magic;
|
|
||||||
unsigned long flags;
|
|
||||||
unsigned long checksum;
|
|
||||||
unsigned long header_addr;
|
|
||||||
unsigned long load_addr;
|
|
||||||
unsigned long load_end_addr;
|
|
||||||
unsigned long bss_end_addr;
|
|
||||||
unsigned long entry_addr;
|
|
||||||
} multiboot_header_t;
|
|
||||||
|
|
||||||
/* The symbol table for a.out. */
|
|
||||||
typedef struct aout_symbol_table
|
|
||||||
{
|
|
||||||
unsigned long tabsize;
|
|
||||||
unsigned long strsize;
|
|
||||||
unsigned long addr;
|
|
||||||
unsigned long reserved;
|
|
||||||
} aout_symbol_table_t;
|
|
||||||
|
|
||||||
/* The section header table for ELF. */
|
|
||||||
typedef struct elf_section_header_table
|
|
||||||
{
|
|
||||||
unsigned long num;
|
|
||||||
unsigned long size;
|
|
||||||
unsigned long addr;
|
|
||||||
unsigned long shndx;
|
|
||||||
} elf_section_header_table_t;
|
|
||||||
|
|
||||||
/* The Multiboot information. */
|
|
||||||
typedef struct multiboot_info
|
|
||||||
{
|
|
||||||
unsigned long flags;
|
|
||||||
unsigned long mem_lower;
|
|
||||||
unsigned long mem_upper;
|
|
||||||
unsigned long boot_device;
|
|
||||||
unsigned long cmdline;
|
|
||||||
unsigned long mods_count;
|
|
||||||
unsigned long mods_addr;
|
|
||||||
union
|
|
||||||
{
|
|
||||||
aout_symbol_table_t aout_sym;
|
|
||||||
elf_section_header_table_t elf_sec;
|
|
||||||
} u;
|
|
||||||
unsigned long mmap_length;
|
|
||||||
unsigned long mmap_addr;
|
|
||||||
} multiboot_info_t;
|
|
||||||
|
|
||||||
/* The module structure. */
|
|
||||||
typedef struct module
|
|
||||||
{
|
|
||||||
unsigned long mod_start;
|
|
||||||
unsigned long mod_end;
|
|
||||||
unsigned long string;
|
|
||||||
unsigned long reserved;
|
|
||||||
} module_t;
|
|
||||||
|
|
||||||
/* The memory map. Be careful that the offset 0 is base_addr_low
|
|
||||||
but no size. */
|
|
||||||
typedef struct memory_map
|
|
||||||
{
|
|
||||||
unsigned long size;
|
|
||||||
unsigned long base_addr_low;
|
|
||||||
unsigned long base_addr_high;
|
|
||||||
unsigned long length_low;
|
|
||||||
unsigned long length_high;
|
|
||||||
unsigned long type;
|
|
||||||
} memory_map_t;
|
|
||||||
|
|
||||||
#endif /* ! ASM */
|
|
||||||
Reference in new issue
Block a user