File: INSTALL

package info (click to toggle)
modutils 2.4.26-1.2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,724 kB
  • ctags: 1,708
  • sloc: ansic: 16,932; sh: 2,998; makefile: 549; lex: 490; yacc: 375
file content (194 lines) | stat: -rw-r--r-- 7,875 bytes parent folder | download
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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
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 in 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 host system, default "gcc".
CFLAGS          C flags for host system, default "-O2 -Wall".
BUILDCC         C compiler for build system, default $(CC).  Some of the
		modutils programs are run on the build system so they must be
		compiled with the build compiler and flags.
BUILDCFLAGS     C flags for build system, default $(CFLAGS).
LDFLAGS         Linker flags for host system, default "".
AR              ar program for host system, default "ar".
RANLIB          ranlib program for host system, default "ranlib".
INSTALL         install program for host 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".
MKDIR           The command to create a directory, including all its parents.
		Default is "mkdir -p".
TAINT_URL	The URL to read for more information about tainted modules.  The
		default is 'http://www.tux.org/lkml/\#s1-18'.  If the URL
		contains # it must be escaped with \ to get past make.  The URL
		must be enclosed in single quotes and must not contain quotes
		(' or ""), unless you want to fight your way through multiple
		layers of quoting rules.  An example,
		TAINT_URL='http://www.some_vendor.com/linux/support/\#taint'

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.
--disable-compat-2-0            Do not create utilities runnable on a Linux 2.0
				system, default is no backwards compatibility.
--disable-kerneld               The default is not to compile kerneld, this
				utility has not been used since kernel 2.1.91.
--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.
--enable-common-ppc             Make all the utilities work on both ppc32 and
				ppc64 as one executable.  Default is yes for
				ppc, no for other architectures.
--enable-common-hppa            Make all the utilities work on both hppa32 and
				hppa64 as one executable.  Default is yes for
				hppa, 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.
--disable-zlib                  Handle gzipped objects?  Default is no.
				You probably only need this if you are booting
				a small root filesystem and the filesystem is
				not compressed itself.  You need a static
				version of libz that is suitable for the host
				system in order to use --enable-zlib.
--disable-use-syscall           Use _syscall() functions?  Default is no.
				Any current libc should have definitions for the
				modutils to kernel system calls.  If you get
				missing sys_xxx functions, use --enable-use-syscall.
				Note that the glibc maintainers want to remove
				_syscall() from the library ABI.

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 host of alpha using
gcc_beta, ar, ranlib and test_install, without kernel 2.0 compatibility and
installing into the /host/alpha hierarchy.

BUILDCC=gcc CC=gcc_beta INSTALL=test_install \
	./configure \
		--build=`./config.guess` \
		--host=alpha \
		--disable-compat-2-0 \
		--exec_prefix=/host/alpha \
		--prefix=/host/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


Backwards Compatibility
-----------------------

modutils supports several options for backwards compatibility down to 2.0
kernels.  Starting with modutils 2.3.13 the default is no backwards
compatibility, you need to enable options if you really want the old code.

--enable-compat-2-0 for 2.0 compatibility.  You will probably need
--enable-use-syscall for this to work.

--enable-kerneld to get the old module kernel daemon.  The code to support this
was removed from the kernel in 2.1.91, being replaced by kmod.

--enable-use-syscall if your version of libc does not have entries for
create_module(), query_module() etc.


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> (current maintainer)
Richard Henderson <rth@cygnus.com> (previous maintainer)
Bjrn Ekwall <bj0rn@blox.se> (previous maintainer)