modprobe: pull underscores() out of do_modprobe()
[mit.git] / doc / depmod.sgml
blob606a4bbea9dec8484c209898266148a164e8cd84
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>2010-03-01</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>-F <replaceable>System.map</replaceable></option></arg>
36 <arg><option>-n</option></arg>
37 <arg><option>-v</option></arg>
38 <arg><option><replaceable>version</replaceable></option></arg>
39 <arg><option>-A</option></arg>
40 </cmdsynopsis>
41 <cmdsynopsis>
42 <command>depmod</command>
43 <arg><option>-e</option></arg>
44 <arg><option>-F<replaceable>System.map</replaceable></option></arg>
45 <arg><option>-n</option></arg>
46 <arg><option>-v</option></arg>
47 <arg><option><replaceable>version</replaceable></option></arg>
48 <arg rep='repeat'><option><replaceable>filename</replaceable></option></arg>
49 </cmdsynopsis>
50 </refsynopsisdiv>
51 <refsect1>
52 <title>DESCRIPTION</title>
53 <para>
54 Linux kernel modules can provide services (called "symbols") for
55 other modules to use (using one of the EXPORT_SYMBOL variants in the
56 code). If a second module uses this symbol, that second module clearly
57 depends on the first module. These dependencies can get quite complex.
58 </para>
59 <para>
60 <command>depmod</command> creates a list of module dependencies
61 by reading each module under
62 <filename>/lib/modules/</filename><replaceable>version</replaceable>
63 and determining what symbols it exports and what symbols it
64 needs. By default, this list is written to
65 <filename>modules.dep</filename>, and a binary hashed version named
66 <filename>modules.dep.bin</filename>, in the same directory. If
67 filenames are given on the command line, only those modules are
68 examined (which is rarely useful unless all modules are listed).
69 <command>depmod</command> also creates a list of symbols provided
70 by modules in the file named <filename>modules.symbols</filename>
71 and its binary hashed version, <filename>modules.symbols.bin</filename>.
72 </para>
73 <para>
74 If a <replaceable>version</replaceable> is provided, then that
75 kernel version's module directory is used rather than the
76 current kernel version (as returned by <command>uname -r</command>).
77 </para>
78 <para>
79 <command>depmod</command> will also generate various legacy map
80 files in the output directory for use by the older hotplug
81 infrastructure. These map files are largely deprecated.
82 </para>
83 </refsect1>
84 <refsect1>
85 <title>OPTIONS</title>
86 <variablelist>
87 <varlistentry>
88 <term><option>-a</option> <option>--all</option>
89 </term>
90 <listitem>
91 <para>
92 Probe all modules. This option is enabled by default if no
93 file names are given in the command-line.
94 </para>
95 </listitem>
96 </varlistentry>
97 <varlistentry>
98 <term><option>-A</option> <option>--quick</option>
99 </term>
100 <listitem>
101 <para>
102 This option scans to see if any modules are newer than the
103 <filename>modules.dep</filename> file before any work is done:
104 if not, it silently exits rather than regenerating the files.
105 </para>
106 </listitem>
107 </varlistentry>
108 <varlistentry>
109 <term><option>-b <replaceable>basedir</replaceable></option> <option>--basedir <replaceable>basedir</replaceable></option>
110 </term>
111 <listitem>
112 <para>
113 If your modules are not currently in the (normal)
114 directory
115 <filename>/lib/modules/</filename><replaceable>version</replaceable>,
116 but in a staging area, you can specify a
117 <replaceable>basedir</replaceable> which is prepended to
118 the directory name. This
119 <replaceable>basedir</replaceable> is stripped from the
120 resulting <filename>modules.dep</filename> file, so it
121 is ready to be moved into the normal location. Use this option
122 if you are a distribution vendor who needs to pre-generate the
123 meta-data files rather than running depmod again later.
124 </para>
125 </listitem>
126 </varlistentry>
127 <varlistentry>
128 <term><option>-C</option> <option>--config <replaceable>file or directory</replaceable></option>
129 </term>
130 <listitem>
131 <para>
132 This option overrides the default configuration file at
133 <filename>/etc/depmod.conf</filename> (or the
134 <filename>/etc/depmod.d/</filename> directory if that is not found).
135 </para>
136 </listitem>
137 </varlistentry>
138 <varlistentry>
139 <term><option>-e</option> <option>--errsyms</option>
140 </term>
141 <listitem>
142 <para>
143 When combined with the <option>-F</option> option, this
144 reports any symbols which a module needs which are not
145 supplied by other modules or the kernel. Normally, any
146 symbols not provided by modules are assumed to be
147 provided by the kernel (which should be true in a
148 perfect world), but this assumption can break espencially
149 when additionally updated third party drivers are not
150 correctly installed or were built incorrectly.
151 </para>
152 </listitem>
153 </varlistentry>
154 <varlistentry>
155 <term><option>-F</option> <option>--filesyms <replaceable>System.map</replaceable></option>
156 </term>
157 <listitem>
158 <para>
159 Supplied with the <filename>System.map</filename> produced
160 when the kernel was built, this allows the
161 <option>-e</option> option to report unresolved symbols.
162 </para>
163 </listitem>
164 </varlistentry>
165 <varlistentry>
166 <term><option>-h</option> <option>--help</option>
167 </term>
168 <listitem>
169 <para>
170 Print the help message and exit.
171 </para>
172 </listitem>
173 </varlistentry>
174 <varlistentry>
175 <term><option>-n</option> <option>--dry-run</option>
176 </term>
177 <listitem>
178 <para>
179 This sends the resulting modules.dep and the various
180 map files to standard output rather than writing them into
181 the module directory.
182 </para>
183 </listitem>
184 </varlistentry>
185 <varlistentry>
186 <term><option>-v</option> <option>--verbose</option>
187 </term>
188 <listitem>
189 <para>
190 In verbose mode, <command>depmod</command> will print (to stdout)
191 all the symbols each module depends on and the module's file name
192 which provides that symbol.
193 </para>
194 </listitem>
195 </varlistentry>
196 <varlistentry>
197 <term><option>-V</option> <option>--version</option>
198 </term>
199 <listitem>
200 <para>
201 Show version of program and exit. See below for caveats when
202 run on older kernels.
203 </para>
204 </listitem>
205 </varlistentry>
206 </variablelist>
207 </refsect1>
208 <refsect1>
209 <title>COPYRIGHT</title>
211 <para>
212 This manual page originally Copyright 2002, Rusty Russell,
213 IBM Corporation. Maintained by Jon Masters and others.
214 </para>
215 </refsect1>
216 <refsect1>
217 <title>SEE ALSO</title>
218 <para>
219 <citerefentry>
220 <refentrytitle>depmod.conf</refentrytitle><manvolnum>5</manvolnum>
221 </citerefentry>,
222 <citerefentry>
223 <refentrytitle>depmod.d</refentrytitle><manvolnum>5</manvolnum>
224 </citerefentry>,
225 <citerefentry>
226 <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
227 </citerefentry>,
228 <citerefentry>
229 <refentrytitle>modules.dep</refentrytitle><manvolnum>5</manvolnum>
230 </citerefentry>
231 </para>
232 </refsect1>
233 </refentry>
235 <!-- Keep this comment at the end of the file
236 Local variables:
237 mode: sgml
238 sgml-omittag:t
239 sgml-shorttag:t
240 sgml-minimize-attributes:nil
241 sgml-always-quote-attributes:t
242 sgml-indent-step:2
243 sgml-indent-data:t
244 sgml-parent-document:nil
245 sgml-default-dtd-file:nil
246 sgml-exposed-tags:nil
247 sgml-local-catalogs:nil
248 sgml-local-ecat-files:nil
249 End: