]>
Commit | Line | Data |
---|---|---|
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> | |
2726da57 | 27 | <email>lucas.de.marchi@gmail.com</email> |
6d960563 LDM |
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> | |
e3366d46 DR |
104 | <term> |
105 | <option>-a</option> | |
106 | </term> | |
107 | <term> | |
108 | <option>--all</option> | |
6d960563 LDM |
109 | </term> |
110 | <listitem> | |
111 | <para> | |
112 | Probe all modules. This option is enabled by default if no | |
113 | file names are given in the command-line. | |
114 | </para> | |
115 | </listitem> | |
116 | </varlistentry> | |
117 | <varlistentry> | |
e3366d46 DR |
118 | <term> |
119 | <option>-A</option> | |
120 | </term> | |
121 | <term> | |
122 | <option>--quick</option> | |
6d960563 LDM |
123 | </term> |
124 | <listitem> | |
125 | <para> | |
126 | This option scans to see if any modules are newer than the | |
127 | <filename>modules.dep</filename> file before any work is done: | |
128 | if not, it silently exits rather than regenerating the files. | |
129 | </para> | |
130 | </listitem> | |
131 | </varlistentry> | |
132 | <varlistentry> | |
133 | <term> | |
134 | <option>-b <replaceable>basedir</replaceable></option> | |
e3366d46 DR |
135 | </term> |
136 | <term> | |
6d960563 LDM |
137 | <option>--basedir <replaceable>basedir</replaceable></option> |
138 | </term> | |
139 | <listitem> | |
140 | <para> | |
141 | If your modules are not currently in the (normal) directory | |
142 | <filename>/lib/modules/</filename><replaceable>version</replaceable>, | |
143 | but in a staging area, you can specify a | |
144 | <replaceable>basedir</replaceable> which is prepended to the | |
145 | directory name. This <replaceable>basedir</replaceable> is | |
146 | stripped from the resulting <filename>modules.dep</filename> file, | |
147 | so it is ready to be moved into the normal location. Use this | |
148 | option if you are a distribution vendor who needs to pre-generate | |
149 | the meta-data files rather than running depmod again later. | |
150 | </para> | |
151 | </listitem> | |
152 | </varlistentry> | |
153 | <varlistentry> | |
e3366d46 DR |
154 | <term> |
155 | <option>-C</option> | |
156 | </term> | |
157 | <term> | |
158 | <option>--config <replaceable>file or directory</replaceable></option> | |
6d960563 LDM |
159 | </term> |
160 | <listitem> | |
161 | <para> | |
162 | This option overrides the default configuration directory at | |
163 | <filename>/etc/depmod.d/</filename>. | |
164 | </para> | |
165 | </listitem> | |
166 | </varlistentry> | |
167 | <varlistentry> | |
e3366d46 DR |
168 | <term> |
169 | <option>-e</option> | |
170 | </term> | |
171 | <term> | |
172 | <option>--errsyms</option> | |
6d960563 LDM |
173 | </term> |
174 | <listitem> | |
175 | <para> | |
176 | When combined with the <option>-F</option> option, this reports any | |
177 | symbols which a module needs which are not supplied by other | |
178 | modules or the kernel. Normally, any symbols not provided by | |
179 | modules are assumed to be provided by the kernel (which should be | |
9be0162f | 180 | true in a perfect world), but this assumption can break especially |
6d960563 LDM |
181 | when additionally updated third party drivers are not correctly |
182 | installed or were built incorrectly. | |
183 | </para> | |
184 | </listitem> | |
185 | </varlistentry> | |
186 | <varlistentry> | |
e3366d46 DR |
187 | <term> |
188 | <option>-E</option> | |
189 | </term> | |
190 | <term> | |
191 | <option>--symvers</option> | |
6d960563 LDM |
192 | </term> |
193 | <listitem> | |
194 | <para> | |
195 | When combined with the <option>-e</option> option, this | |
196 | reports any symbol versions supplied by modules that do | |
197 | not match with the symbol versions provided by the | |
198 | kernel in its <filename>Module.symvers</filename>. | |
199 | This option is mutually incompatible with <option>-F</option>. | |
200 | </para> | |
201 | </listitem> | |
202 | </varlistentry> | |
203 | <varlistentry> | |
e3366d46 DR |
204 | <term> |
205 | <option>-F</option> | |
206 | </term> | |
207 | <term> | |
208 | <option>--filesyms <replaceable>System.map</replaceable></option> | |
6d960563 LDM |
209 | </term> |
210 | <listitem> | |
211 | <para> | |
212 | Supplied with the <filename>System.map</filename> produced when the | |
213 | kernel was built, this allows the <option>-e</option> option to | |
214 | report unresolved symbols. This option is mutually incompatible | |
215 | with <option>-E</option>. | |
216 | </para> | |
217 | </listitem> | |
218 | </varlistentry> | |
219 | <varlistentry> | |
e3366d46 DR |
220 | <term> |
221 | <option>-h</option> | |
222 | </term> | |
223 | <term> | |
224 | <option>--help</option> | |
6d960563 LDM |
225 | </term> |
226 | <listitem> | |
227 | <para> | |
228 | Print the help message and exit. | |
229 | </para> | |
230 | </listitem> | |
231 | </varlistentry> | |
232 | <varlistentry> | |
e3366d46 DR |
233 | <term> |
234 | <option>-n</option> | |
235 | </term> | |
236 | <term> | |
237 | <option>--dry-run</option> | |
6d960563 LDM |
238 | </term> |
239 | <listitem> | |
240 | <para> | |
241 | This sends the resulting modules.dep and the various map files to | |
242 | standard output rather than writing them into the module directory. | |
243 | </para> | |
244 | </listitem> | |
245 | </varlistentry> | |
246 | <varlistentry> | |
e3366d46 DR |
247 | <term> |
248 | <option>-P</option> | |
6d960563 LDM |
249 | </term> |
250 | <listitem> | |
251 | <para> | |
252 | Some architectures prefix symbols with an extraneous character. | |
253 | This specifies a prefix character (for example '_') to ignore. | |
254 | </para> | |
255 | </listitem> | |
256 | </varlistentry> | |
257 | <varlistentry> | |
e3366d46 DR |
258 | <term> |
259 | <option>-v</option> | |
260 | </term> | |
261 | <term> | |
262 | <option>--verbose</option> | |
6d960563 LDM |
263 | </term> |
264 | <listitem> | |
265 | <para> | |
266 | In verbose mode, <command>depmod</command> will print (to stdout) | |
267 | all the symbols each module depends on and the module's file name | |
268 | which provides that symbol. | |
269 | </para> | |
270 | </listitem> | |
271 | </varlistentry> | |
272 | <varlistentry> | |
e3366d46 DR |
273 | <term> |
274 | <option>-V</option> | |
275 | </term> | |
276 | <term> | |
277 | <option>--version</option> | |
6d960563 LDM |
278 | </term> |
279 | <listitem> | |
280 | <para> | |
281 | Show version of program and exit. See below for caveats when | |
282 | run on older kernels. | |
283 | </para> | |
284 | </listitem> | |
285 | </varlistentry> | |
286 | <varlistentry> | |
e3366d46 DR |
287 | <term> |
288 | <option>-w</option> | |
6d960563 LDM |
289 | </term> |
290 | <listitem> | |
291 | <para> | |
292 | Warn on duplicate dependencies, aliases, symbol versions, etc. | |
293 | </para> | |
294 | </listitem> | |
295 | </varlistentry> | |
296 | </variablelist> | |
297 | </refsect1> | |
298 | ||
299 | <refsect1><title>COPYRIGHT</title> | |
300 | <para> | |
301 | This manual page originally Copyright 2002, Rusty Russell, | |
302 | IBM Corporation. Portions Copyright Jon Masters, and others. | |
303 | </para> | |
304 | </refsect1> | |
305 | ||
306 | <refsect1><title>SEE ALSO</title> | |
307 | <para> | |
308 | <citerefentry> | |
309 | <refentrytitle>depmod.d</refentrytitle><manvolnum>5</manvolnum> | |
310 | </citerefentry>, | |
311 | <citerefentry> | |
312 | <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum> | |
313 | </citerefentry>, | |
314 | <citerefentry> | |
315 | <refentrytitle>modules.dep</refentrytitle><manvolnum>5</manvolnum> | |
316 | </citerefentry> | |
317 | </para> | |
318 | </refsect1> | |
319 | </refentry> |