summaryrefslogtreecommitdiffstats
path: root/man/depmod.8.xml
blob: fce2a4a67a89d8d1c31ec4b19f034b3502c5beb4 (plain)
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<?xml version='1.0'?>
<!--*-nxml-*-->
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
        "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<refentry id="depmod">
  <refentryinfo>
    <title>depmod</title>
    <productname>kmod</productname>

    <authorgroup>
      <author>
        <contrib>Developer</contrib>
        <firstname>Jon</firstname>
        <surname>Masters</surname>
        <email>jcm@jonmasters.org</email>
      </author>
      <author>
        <contrib>Developer</contrib>
        <firstname>Robby</firstname>
        <surname>Workman</surname>
        <email>rworkman@slackware.com</email>
      </author>
      <author>
        <contrib>Developer</contrib>
        <firstname>Lucas</firstname>
        <surname>De Marchi</surname>
        <email>lucas.de.marchi@gmail.com</email>
      </author>
    </authorgroup>
  </refentryinfo>

  <refmeta>
    <refentrytitle>depmod</refentrytitle>
    <manvolnum>8</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>depmod</refname>
    <refpurpose>
      Generate <filename>modules.dep</filename> and map files.
    </refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <cmdsynopsis>
      <command>depmod</command>
      <arg><option>-b <replaceable>basedir</replaceable></option></arg>
      <arg><option>-o <replaceable>outdir</replaceable></option></arg>
      <arg><option>-e</option></arg>
      <arg><option>-E <replaceable>Module.symvers</replaceable></option></arg>
      <arg><option>-F <replaceable>System.map</replaceable></option></arg>
      <arg><option>-n</option></arg>
      <arg><option>-v</option></arg>
      <arg><option>-A</option></arg>
      <arg><option>-P <replaceable>prefix</replaceable></option></arg>
      <arg><option>-w</option></arg>
      <arg><option><replaceable>version</replaceable></option></arg>
    </cmdsynopsis>

    <cmdsynopsis>
      <command>depmod</command>
      <arg><option>-e</option></arg>
      <arg><option>-E <replaceable>Module.symvers</replaceable></option></arg>
      <arg><option>-F <replaceable>System.map</replaceable></option></arg>
      <arg><option>-n</option></arg>
      <arg><option>-v</option></arg>
      <arg><option>-P <replaceable>prefix</replaceable></option></arg>
      <arg><option>-w</option></arg>
      <arg><option><replaceable>version</replaceable></option></arg>
      <arg rep='repeat'><option><replaceable>filename</replaceable></option></arg>
    </cmdsynopsis>
  </refsynopsisdiv>

  <refsect1><title>DESCRIPTION</title>
    <para>
      Linux kernel modules can provide services (called "symbols") for other
      modules to use (using one of the EXPORT_SYMBOL variants in the code).  If
      a second module uses this symbol, that second module clearly depends on
      the first module.  These dependencies can get quite complex.
    </para>
    <para> <command>depmod</command> creates a list of module dependencies by
      reading each module under
      <filename>@MODULE_DIRECTORY@/</filename><replaceable>version</replaceable> and
      determining what symbols it exports and what symbols it needs.  By
      default, this list is written to <filename>modules.dep</filename>, and a
      binary hashed version named <filename>modules.dep.bin</filename>, in the
      same directory.  If filenames are given on the command line, only those
      modules are examined (which is rarely useful unless all modules are
      listed).  <command>depmod</command> also creates a list of symbols
      provided by modules in the file named
      <filename>modules.symbols</filename> and its binary hashed version,
      <filename>modules.symbols.bin</filename>.  Finally,
      <command>depmod</command> will output a file named
      <filename>modules.devname</filename> if modules supply special device
      names (devname) that should be populated in /dev on boot (by a utility
      such as systemd-tmpfiles).
    </para>
    <para> If a <replaceable>version</replaceable> is provided, then that kernel
      version's module directory is used rather than the current kernel version
      (as returned by <command>uname -r</command>).
    </para>
  </refsect1>
  <refsect1><title>OPTIONS</title>
    <variablelist>
      <varlistentry>
        <term>
          <option>-a</option>
        </term>
        <term>
          <option>--all</option>
        </term>
        <listitem>
          <para>
            Probe all modules. This option is enabled by default if no
            file names are given in the command-line.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-A</option>
        </term>
        <term>
          <option>--quick</option>
        </term>
        <listitem>
          <para>
            This option scans to see if any modules are newer than the
            <filename>modules.dep</filename> file before any work is done:
            if not, it silently exits rather than regenerating the files.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-b <replaceable>basedir</replaceable></option>
        </term>
        <term>
          <option>--basedir <replaceable>basedir</replaceable></option>
        </term>
        <listitem>
          <para>
            If your modules are not currently in the (normal) directory
            <filename>@MODULE_DIRECTORY@/</filename><replaceable>version</replaceable>,
            but in a staging area, you can specify a
            <replaceable>basedir</replaceable> which is prepended to the
            directory name.  This <replaceable>basedir</replaceable> is
            stripped from the resulting <filename>modules.dep</filename> file,
            so it is ready to be moved into the normal location. Use this
            option if you are a distribution vendor who needs to pre-generate
            the meta-data files rather than running depmod again later.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-o <replaceable>outdir</replaceable></option>
        </term>
        <term>
          <option>--outdir <replaceable>outdir</replaceable></option>
        </term>
        <listitem>
          <para>
            Set the output directory where depmod will store any generated file.
            <replaceable>outdir</replaceable> serves as a root to that location,
            similar to how <replaceable>basedir</replaceable> is used. Also this
            setting takes precedence and if used together with
            <replaceable>basedir</replaceable> it will result in the input being
            that directory, but the output being the one set by
            <replaceable>outdir</replaceable>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-C</option>
        </term>
        <term>
          <option>--config <replaceable>file or directory</replaceable></option>
        </term>
        <listitem>
          <para>
            This option overrides the default configuration directory at
            <filename>/etc/depmod.d/</filename>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-e</option>
        </term>
        <term>
          <option>--errsyms</option>
        </term>
        <listitem>
          <para>
            When combined with the <option>-F</option> option, this reports any
            symbols which a module needs which are not supplied by other
            modules or the kernel.  Normally, any symbols not provided by
            modules are assumed to be provided by the kernel (which should be
            true in a perfect world), but this assumption can break especially
            when additionally updated third party drivers are not correctly
            installed or were built incorrectly.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-E</option>
        </term>
        <term>
          <option>--symvers</option>
        </term>
          <listitem>
            <para>
              When combined with the <option>-e</option> option, this
              reports any symbol versions supplied by modules that do
              not match with the symbol versions provided by the
              kernel in its <filename>Module.symvers</filename>.
              This option is mutually incompatible with <option>-F</option>.
            </para>
          </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-F</option>
        </term>
        <term>
          <option>--filesyms <replaceable>System.map</replaceable></option>
        </term>
        <listitem>
          <para>
            Supplied with the <filename>System.map</filename> produced when the
            kernel was built, this allows the <option>-e</option> option to
            report unresolved symbols.  This option is mutually incompatible
            with <option>-E</option>.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-h</option>
        </term>
        <term>
          <option>--help</option>
        </term>
        <listitem>
          <para>
            Print the help message and exit.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-n</option>
        </term>
        <term>
          <option>--show</option>
        </term>
        <term>
          <option>--dry-run</option>
        </term>
        <listitem>
          <para>
            This sends the resulting modules.dep and the various map files to
            standard output rather than writing them into the module directory.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-P</option>
        </term>
        <listitem>
          <para>
            Some architectures prefix symbols with an extraneous character.
            This specifies a prefix character (for example '_') to ignore.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-v</option>
        </term>
        <term>
          <option>--verbose</option>
        </term>
        <listitem>
          <para>
            In verbose mode, <command>depmod</command> will print (to stdout)
            all the symbols each module depends on and the module's file name
            which provides that symbol.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-V</option>
        </term>
        <term>
          <option>--version</option>
        </term>
        <listitem>
          <para>
            Show version of program and exit. See below for caveats when
            run on older kernels.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term>
          <option>-w</option>
        </term>
        <listitem>
          <para>
            Warn on duplicate dependencies, aliases, symbol versions, etc.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1><title>COPYRIGHT</title>
    <para>
      This manual page originally Copyright 2002, Rusty Russell,
      IBM Corporation. Portions Copyright Jon Masters, and others.
    </para>
  </refsect1>

  <refsect1><title>SEE ALSO</title>
    <para>
      <citerefentry>
        <refentrytitle>depmod.d</refentrytitle><manvolnum>5</manvolnum>
      </citerefentry>,
      <citerefentry>
        <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>,
      <citerefentry>
        <refentrytitle>modules.dep</refentrytitle><manvolnum>5</manvolnum>
      </citerefentry>
    </para>
  </refsect1>
</refentry>