3 This is the GRUB. Welcome.
5 This file contains instructions for compiling and installing the GRUB.
10 GRUB depends on some software packages installed into your system. If
11 you don't have any of them, please obtain and install them before
16 Probably every recent GCC should work, but we recommend GCC 2.95 and
17 later, since you can create smaller binary images. See the web page
18 <http://gcc.gnu.org/>.
22 For now, the Makefiles produced by Automake depends on GNU Make. See
23 the web page <http://www.gnu.org/software/make/make.html>.
25 * GNU binutils 2.9.1.0.23 or later
27 Binutils has changed the behavior of 16bit assembler between 2.9.1
28 and 2.9.1.0.x, and we support only 2.9.1.0.x and higher. In
29 particular, we recommend using binutils 2.10, since it is the only
30 public release that supports real 16bit mode. Please take a look at
31 the web page <http://sourceware.cygnus.com/binutils/>, for more
32 information. Note that you don't have to install it into any system
33 directory. See the section "Operation Controls", if you want to
34 install binutils into your own directory.
36 If you'd like to develop GRUB, these below are also required. Don't
37 forget to specify the option `--enable-maintainer-mode' when running the
40 * Texinfo 4.0 or later
42 We use some new macros in the documents, so you need a recent
43 Texinfo release. See the web page
44 <http://www.gnu.org/software/texinfo/texinfo.html>.
46 * Developers: GNU Autoconf 2.5x and GNU Automake 1.7 or later
48 You should not need Automake just to compile GRUB, but you will need
49 it if you edit any of the build files (Makefile.am, configure.in,
50 etc). We use the new "per-executable flags" feature found in the
51 latest release of automake. See the web page
52 <http://www.gnu.org/software/automake/automake.html>.
58 The `configure' shell script attempts to guess correct values for
59 various system-dependent variables used during compilation. It uses
60 those values to create a `Makefile' in each directory of the package.
61 It may also create one or more `.h' files containing system-dependent
62 definitions. Finally, it creates a shell script `config.status' that
63 you can run in the future to recreate the current configuration, a
64 file `config.cache' that saves the results of its tests to speed up
65 reconfiguring, and a file `config.log' containing compiler output
66 (useful mainly for debugging `configure').
68 If you need to do unusual things to compile the package, please try to
69 figure out how `configure' could check whether to do them, and mail
70 diffs or instructions to the address given in the `README' so they can
71 be considered for the next release. If at some point `config.cache'
72 contains results you don't want to keep, you may remove or edit it.
74 The file `configure.in' is used to create `configure' by a program
75 called `autoconf'. You only need `configure.in' if you want to change
76 it or regenerate `configure' using a newer version of `autoconf'.
82 The simplest way to compile this package is:
84 1. `cd' to the directory containing the package's source code and
85 type `./configure' to configure the package for your system. If
86 you're using `csh' on an old version of System V, you might need
87 to type `sh ./configure' instead to prevent `csh' from trying to
88 execute `configure' itself.
90 Running `configure' takes awhile. While running, it prints some
91 messages telling which features it is checking for.
93 2. Type `make' to compile the package.
95 3. Optionally, type `make check' to run any self-tests that come with
98 4. Type `make install' to install the programs and any data files and
101 5. You can remove the program binaries and object files from the
102 source code directory by typing `make clean'. To also remove the
103 files that `configure' created (so you can compile the package for
104 a different kind of computer), type `make distclean'. There is
105 also a `make maintainer-clean' target, but that is intended mainly
106 for the package's developers. If you use it, you may have to get
107 all sorts of other programs in order to regenerate files that came
108 with the distribution.
111 Compiling For Multiple Architectures
112 ====================================
114 You can compile the package for more than one kind of computer at the
115 same time, by placing the object files for each architecture in their
116 own directory. `cd' to the directory where you want the object files
117 and executables to go and run the `configure' script. `configure'
118 automatically checks for the source code in the directory that
119 `configure' is in and in `..'.
125 By default, `make install' will install the package's files in
126 `/usr/local/bin', `/usr/local/man', etc. You can specify an
127 installation prefix by giving `configure' the option `--prefix=PATH'.
129 You can specify separate installation prefixes for
130 architecture-specific files and architecture-independent files. If
131 you give `configure' the option `--exec-prefix=PATH', the package will
132 use PATH as the prefix for installing programs and libraries.
133 Documentation and other data files will still use the regular prefix.
135 In addition, if you use an unusual directory layout you can give
136 options like `--bindir=PATH' to specify different values for
137 particular kinds of files. Run `configure --help' for a list of the
138 directories you can set and what kinds of files go in them.
140 If the package supports it, you can cause programs to be installed
141 with an extra prefix or suffix on their names by giving `configure'
142 the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
144 Please note, however, that the GRUB knows where it is located in the
145 filesystem. If you have installed it in an unusual location, the
146 system might not work properly, or at all. The chief utility of these
147 options for the GRUB is to allow you to "install" in some alternate
148 location, and then copy these to the actual root filesystem later.
154 If you want to set default values for `configure' scripts to share,
155 you can create a site shell script called `config.site' that gives
156 default values for variables like `CC', `cache_file', and `prefix'.
157 `configure' looks for `PREFIX/share/config.site' if it exists, then
158 `PREFIX/etc/config.site' if it exists. Or, you can set the
159 `CONFIG_SITE' environment variable to the location of the site script.
160 A warning: not all `configure' scripts look for a site script.
166 `configure' recognizes the following options to control how it
170 Use and save the results of the tests in FILE instead of
171 `./config.cache'. Set FILE to `/dev/null' to disable caching, for
172 debugging `configure'.
175 Print a summary of the options to `configure', and exit.
180 Do not print messages saying which checks are being made.
183 Look for the package's source code in directory DIR. Usually
184 `configure' can determine that directory automatically.
187 Print the version of Autoconf used to generate the `configure'
190 `--enable-maintainer-mode'
191 Enable make rules and dependencies not useful (and sometimes
192 confusing) to the casual installer. If you are a GRUB developer,
193 it is a good idea to specify this option.
196 Omit the ext2fs support in Stage 2.
199 Omit the FAT support in Stage 2.
202 Omit the FFS support in Stage 2.
205 Omit the Minix fs support in Stage 2.
208 Omit the ReiserFS support in Stage 2.
211 Omit the VSTa filesystem support in Stage 2.
214 Omit the JFS support in Stage 2.
217 Omit the XFS support in Stage 2.
220 Omit the UFS2 support in Stage 2.
223 Omit the ISO9660 support in Stage 2.
226 Omit the decompression support in Stage 2.
228 `--disable-md5-password'
229 Omit the MD5 password support in Stage2.
231 `--with-binutils=PATH'
232 Search the path PATH to find binutils. If you have installed your
233 binutils executables into an unusual location where GCC doesn't
234 search by default, use this option.
237 Don't use the curses library.
240 Omit the hercules console support in Stage 2.
243 Omit the serial terminal support in Stage 2.
245 `--enable-serial-speed-simulation'
246 Simulate the slowness of a serial device in the grub shell. This
247 option is useful for GRUB developers, as you can test the
248 performance of a terminal emulation even on pseudo terminals.
250 `--enable-preset-menu=FILE'
251 Preset a menu file FILE in Stage 2. This is useful, if you cannot
252 put a configuration file on a filesystem for some reason (e.g. when
253 you need to set the default terminal to a serial terminal in an
256 `--enable-example-kernel'
257 Build the example Multiboot kernel in the directory "docs". You
258 will be able to boot the image "kernel" with GRUB.
260 `--disable-auto-linux-mem-opt'
261 Don't pass the "mem=" option automatically, when booting Linux.
262 You can also disable the feature at run time.
265 `configure' also accepts several options for the network support. See
266 the file `netboot/README.netboot', for more information.