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