1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
|
INSTALLATION
============
First of all, remember to remove the old man pages in section 1!
They are (usually) stored in the /usr/man/man1 directory.
The new man pages for the utilities are now located in section 8:
depmod.8 genksyms.8 insmod.8 kerneld.8
ksyms.8 lsmod.8 modinfo.8 modprobe.8
rmmod.8
The next step is to run the configure script by entering the command:
./configure
The build process uses the configure script to figure out a few things
about your system before actually compiling anything. Configure takes
several command line options which can modify the installation
paths. Try './configure --help' for more information. (Minor note:
--exec-prefix defaults to / not /usr if not specified.)
Cross compilation and unusual compilation requirements
------------------------------------------------------
You can compile modutils on one system to run on another. The Makefiles
generated by configure contain several variables which can be tweaked for
unusual compilation environments, including cross compilation. Do not edit the
generated Makefiles, set the variables the environment before invoking
configure. The default is to compile for the current system type using standard
utilities and flags. If you change any of these values after running configure,
you should erase config.cache before running configure again.
CC C compiler for target system, default "gcc".
CFLAGS C flags for target system, default "-O2 -Wall".
HOSTCC C compiler for host system, default $(CC). Some of the modutils
programs are run on the host system so they must be compiled
iwth the host compiler and flags.
HOSTCFLAGS C flags for host system, default $(CFLAGS).
LDFLAGS Linker flags for target system, default "".
AR ar program for target system, default "ar".
RANLIB ranlib program for target system, default "ranlib".
INSTALL install program for target system, default "install".
PARSERCFLAGS The parser programs generated by lex and yacc have spurious
warnings about uninitialized variables when the default -Wall is
used. This option is included on the compilation of those
programs to suppress the warnings, default is
"-Wno-uninitialized".
configure takes ten modutils specific options, as well as the standard
configure options.
--enable-combined Create insmod and rmmod/modprobe/lsmod/ksyms as
one executable. Default is one combined module,
if you --disable-combined you can still combine
individual modules into insmod with
--enable-combined-X.
--enable-combined-rmmod Create insmod and rmmod as one executable,
default is taken from --enable-combined.
--enable-combined-modprobe Create insmod and modprobe as one executable,
default is taken from --enable-combined.
--enable-combined-lsmod Create insmod and lsmod as one executable,
default is taken from --enable-combined.
--enable-combined-ksyms Create insmod and ksyms as one executable,
default is taken from --enable-combined.
--enable-compat-2-0 Create utilities runnable on a Linux 2.0 system,
default is yes.
--enable-kerneld The default is to compile kerneld, even though
this utility has not been used since kernel
2.1.91, the option exists for backwards
compatibility. Distributions can use
--disable-kerneld to remove the crud.
--enable-common-sparc Make all the utilities work on both sparc32 and
sparc64 as one executable. Default is yes for
sparc, no for other architectures.
--disable-insmod-static The default is not to build insmod.static. You
probably only need this if you are building your
own initrd boot system.
--enable-strip Are binaries to be stripped during install?
Default is yes.
To disable any of these, specify --disable-<option>.
Example: To compile with all the default values for the current system.
./configure
make
Example: To compile on the current system using gcc with a target of alpha using
gcc_beta, ar, ranlib and test_install, without kernel 2.0 compatibility and
installing into the /target/alpha hierarchy.
HOSTCC=gcc CC=gcc_beta INSTALL=test_install \
./configure \
--target=alpha \
--disable-compat-2-0 \
--exec_prefix=/target/alpha \
--prefix=/target/alpha/usr
make
Compiling in a different directory
----------------------------------
modutils supports the VPATH option of make. This lets you have the source in
one directory and the generated files in another, you can even compile from read
only media.
mkdir /var/tmp/modutils
cd /var/tmp/modutils
/path/to/master/modutils/configure
make
Install
-------
The second step is to actually install the utilities. Do 'make install'
in this directory to get the following tools:
insmod/
insmod install a loadable module
rmmod remove module(s)
ksyms show symbols
lsmod show modules
modinfo display information about module
modprobe load (a stack of) modules, controlled by a "makefile"
and a configuration file.
insmod_ksymoops_clean a shell script be run daily to clean out older
saved ksyms and lsmod data. man insmod for details.
genksyms/
genksyms version generator for module symbols,
to be run automatically during kernel make
if CONFIG_MODVERSIONS was selected in "make config"
depmod/
depmod generate dependencies for modprobe.
kerneld/
kerneld A "user level kernel extension" that allows
the kernel to perform some tasks in user space.
Suitable tasks are e.g. loading of modules.
Obsolete since kernel 2.1.91 but included to support
kernel 2.0.
Keith Owens <kaos@ocs.com.au>
Richard Henderson <rth@cygnus.com>
Bjrn Ekwall <bj0rn@blox.se>
|