release: bump release to 3.15
[module-init-tools.git] / doc / depmod.sgml
blob4f3783e9a3495d5709733fdbcb6630791801ea3d
1 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
2 <!ENTITY debian "<productname>Debian GNU/Linux</productname>">
3 <!ENTITY docbook "<productname>DocBook</productname>">
4 <!ENTITY sgml "<abbrev>SGML</abbrev>">
5 ]>
7 <!-- Stolen from manual page for docbook-to-man, DocBook source file
8 (C) 1999 W. Borgert debacle@debian.org
10 $Id: docbook-to-man.sgml,v 1.8 2002/04/27 15:28:02 debacle Exp $ -->
12 <refentry>
13 <refentryinfo>
14 <address>
15 <email>jcm@jonmasters.org</email>
16 </address>
17 <author>
18 <firstname>Jon</firstname>
19 <surname>Masters</surname>
20 </author>
21 <date>2011-05-31</date>
22 </refentryinfo>
23 <refmeta>
24 <refentrytitle>depmod</refentrytitle>
25 <manvolnum>8</manvolnum>
26 </refmeta>
27 <refnamediv>
28 <refname>depmod</refname> <refpurpose>program to generate <filename>modules.dep</filename> and map files.</refpurpose>
29 </refnamediv>
30 <refsynopsisdiv>
31 <cmdsynopsis>
32 <command>depmod</command>
33 <arg><option>-b <replaceable>basedir</replaceable></option></arg>
34 <arg><option>-e</option></arg>
35 <arg><option>-E <replaceable>Module.symvers</replaceable></option></arg>
36 <arg><option>-F <replaceable>System.map</replaceable></option></arg>
37 <arg><option>-m</option></arg>
38 <arg><option>-n</option></arg>
39 <arg><option>-v</option></arg>
40 <arg><option>-A</option></arg>
41 <arg><option>-P <replaceable>prefix</replaceable></option></arg>
42 <arg><option>-w</option></arg>
43 <arg><option><replaceable>version</replaceable></option></arg>
44 </cmdsynopsis>
45 <cmdsynopsis>
46 <command>depmod</command>
47 <arg><option>-e</option></arg>
48 <arg><option>-E <replaceable>Module.symvers</replaceable></option></arg>
49 <arg><option>-F <replaceable>System.map</replaceable></option></arg>
50 <arg><option>-m</option></arg>
51 <arg><option>-n</option></arg>
52 <arg><option>-v</option></arg>
53 <arg><option>-P <replaceable>prefix</replaceable></option></arg>
54 <arg><option>-w</option><arg>
55 <arg><option><replaceable>version</replaceable></option></arg>
56 <arg rep='repeat'><option><replaceable>filename</replaceable></option></arg>
57 </cmdsynopsis>
58 </refsynopsisdiv>
59 <refsect1>
60 <title>DESCRIPTION</title>
61 <para>
62 Linux kernel modules can provide services (called "symbols") for
63 other modules to use (using one of the EXPORT_SYMBOL variants in the
64 code). If a second module uses this symbol, that second module clearly
65 depends on the first module. These dependencies can get quite complex.
66 </para>
67 <para>
68 <command>depmod</command> creates a list of module dependencies
69 by reading each module under
70 <filename>/lib/modules/</filename><replaceable>version</replaceable>
71 and determining what symbols it exports and what symbols it
72 needs. By default, this list is written to
73 <filename>modules.dep</filename>, and a binary hashed version named
74 <filename>modules.dep.bin</filename>, in the same directory. If
75 filenames are given on the command line, only those modules are
76 examined (which is rarely useful unless all modules are listed).
77 <command>depmod</command> also creates a list of symbols provided
78 by modules in the file named <filename>modules.symbols</filename>
79 and its binary hashed version, <filename>modules.symbols.bin</filename>.
80 Finally, <command>depmod</command> will output a file named
81 <filename>modules.devname</filename> if modules supply special
82 device names (devname) that should be populated in /dev on boot
83 (by a utility such as udev).
84 </para>
85 <para>
86 If a <replaceable>version</replaceable> is provided, then that
87 kernel version's module directory is used rather than the
88 current kernel version (as returned by <command>uname -r</command>).
89 </para>
90 <para>
91 <command>depmod</command> will also generate various legacy map
92 files in the output directory for use by the older hotplug
93 infrastructure. These map files are largely deprecated.
94 </para>
95 </refsect1>
96 <refsect1>
97 <title>OPTIONS</title>
98 <variablelist>
99 <varlistentry>
100 <term><option>-a</option> <option>--all</option>
101 </term>
102 <listitem>
103 <para>
104 Probe all modules. This option is enabled by default if no
105 file names are given in the command-line.
106 </para>
107 </listitem>
108 </varlistentry>
109 <varlistentry>
110 <term><option>-A</option> <option>--quick</option>
111 </term>
112 <listitem>
113 <para>
114 This option scans to see if any modules are newer than the
115 <filename>modules.dep</filename> file before any work is done:
116 if not, it silently exits rather than regenerating the files.
117 </para>
118 </listitem>
119 </varlistentry>
120 <varlistentry>
121 <term><option>-b <replaceable>basedir</replaceable></option> <option>--basedir <replaceable>basedir</replaceable></option>
122 </term>
123 <listitem>
124 <para>
125 If your modules are not currently in the (normal)
126 directory
127 <filename>/lib/modules/</filename><replaceable>version</replaceable>,
128 but in a staging area, you can specify a
129 <replaceable>basedir</replaceable> which is prepended to
130 the directory name. This
131 <replaceable>basedir</replaceable> is stripped from the
132 resulting <filename>modules.dep</filename> file, so it
133 is ready to be moved into the normal location. Use this option
134 if you are a distribution vendor who needs to pre-generate the
135 meta-data files rather than running depmod again later.
136 </para>
137 </listitem>
138 </varlistentry>
139 <varlistentry>
140 <term><option>-C</option> <option>--config <replaceable>file or directory</replaceable></option>
141 </term>
142 <listitem>
143 <para>
144 This option overrides the default configuration file at
145 <filename>/etc/depmod.conf</filename> (or the
146 <filename>/etc/depmod.d/</filename> directory if that is not found).
147 </para>
148 </listitem>
149 </varlistentry>
150 <varlistentry>
151 <term><option>-e</option> <option>--errsyms</option>
152 </term>
153 <listitem>
154 <para>
155 When combined with the <option>-F</option> option, this
156 reports any symbols which a module needs which are not
157 supplied by other modules or the kernel. Normally, any
158 symbols not provided by modules are assumed to be
159 provided by the kernel (which should be true in a
160 perfect world), but this assumption can break espencially
161 when additionally updated third party drivers are not
162 correctly installed or were built incorrectly.
163 </para>
164 </listitem>
165 </varlistentry>
166 <varlistentry>
167 <term><option>-E</option> <option>--symvers</option>
168 </term>
169 <listitem>
170 <para>
171 When combined with the <option>-e</option> option, this
172 reports any symbol versions supplied by modules that do
173 not match with the symbol versions provided by the
174 kernel in its <filename>Module.symvers</filename>.
175 This option is mutually incompatible with <option>-F</option>.
176 </para>
177 </listitem>
178 </varlistentry>
179 <varlistentry>
180 <term><option>-F</option> <option>--filesyms <replaceable>System.map</replaceable></option>
181 </term>
182 <listitem>
183 <para>
184 Supplied with the <filename>System.map</filename> produced
185 when the kernel was built, this allows the
186 <option>-e</option> option to report unresolved symbols.
187 This option is mutually incompatible with <option>-E</option>.
188 </para>
189 </listitem>
190 </varlistentry>
191 <varlistentry>
192 <term><option>-h</option> <option>--help</option>
193 </term>
194 <listitem>
195 <para>
196 Print the help message and exit.
197 </para>
198 </listitem>
199 </varlistentry>
200 <varlistentry>
201 <term><option>-m</option>
202 </term>
203 <listitem>
204 <para>
205 This overrides any possible configuration file setting of
206 <option>make_map_files</option> and forces the generation
207 of legacy map files, such as <filename>modules.pcimap</filename>.
208 </para>
209 </listitem>
210 </varlistentry>
211 <varlistentry>
212 <term><option>-n</option> <option>--dry-run</option>
213 </term>
214 <listitem>
215 <para>
216 This sends the resulting modules.dep and the various
217 map files to standard output rather than writing them into
218 the module directory.
219 </para>
220 </listitem>
221 </varlistentry>
222 <varlistentry>
223 <term><option>-P</option>
224 </term>
225 <listitem>
226 <para>
227 Some architectures prefix symbols with an extraneous character.
228 This specifies a prefix character (for example '_') to ignore.
229 </para>
230 </listitem>
231 </varlistentry>
232 <varlistentry>
233 <term><option>-v</option> <option>--verbose</option>
234 </term>
235 <listitem>
236 <para>
237 In verbose mode, <command>depmod</command> will print (to stdout)
238 all the symbols each module depends on and the module's file name
239 which provides that symbol.
240 </para>
241 </listitem>
242 </varlistentry>
243 <varlistentry>
244 <term><option>-V</option> <option>--version</option>
245 </term>
246 <listitem>
247 <para>
248 Show version of program and exit. See below for caveats when
249 run on older kernels.
250 </para>
251 </listitem>
252 </varlistentry>
253 <varlistentry>
254 <term><option>-w</option>
255 </term>
256 <listitem>
257 <para>
258 Warn on duplicate dependencies, aliases, symbol versions, etc.
259 </para>
260 </listitem>
261 </varlistentry>
262 </variablelist>
263 </refsect1>
264 <refsect1>
265 <title>COPYRIGHT</title>
267 <para>
268 This manual page originally Copyright 2002, Rusty Russell,
269 IBM Corporation. Portions Copyright Jon Masters, and others.
270 </para>
271 </refsect1>
272 <refsect1>
273 <title>SEE ALSO</title>
274 <para>
275 <citerefentry>
276 <refentrytitle>depmod.conf</refentrytitle><manvolnum>5</manvolnum>
277 </citerefentry>,
278 <citerefentry>
279 <refentrytitle>depmod.d</refentrytitle><manvolnum>5</manvolnum>
280 </citerefentry>,
281 <citerefentry>
282 <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
283 </citerefentry>,
284 <citerefentry>
285 <refentrytitle>modules.dep</refentrytitle><manvolnum>5</manvolnum>
286 </citerefentry>
287 </para>
288 </refsect1>
289 </refentry>
291 <!-- Keep this comment at the end of the file
292 Local variables:
293 mode: sgml
294 sgml-omittag:t
295 sgml-shorttag:t
296 sgml-minimize-attributes:nil
297 sgml-always-quote-attributes:t
298 sgml-indent-step:2
299 sgml-indent-data:t
300 sgml-parent-document:nil
301 sgml-default-dtd-file:nil
302 sgml-exposed-tags:nil
303 sgml-local-catalogs:nil
304 sgml-local-ecat-files:nil
305 End: