File: depmod.sgml

package info (click to toggle)
module-init-tools 3.4-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,208 kB
  • ctags: 900
  • sloc: sh: 7,980; ansic: 5,036; makefile: 204
file content (250 lines) | stat: -rw-r--r-- 8,526 bytes parent folder | download
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
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
  <!ENTITY debian  "<productname>Debian GNU/Linux</productname>">
  <!ENTITY docbook "<productname>DocBook</productname>">
  <!ENTITY sgml    "<abbrev>SGML</abbrev>">
]>

<!-- Stolen from manual page for docbook-to-man, DocBook source file
     (C) 1999 W. Borgert debacle@debian.org

     $Id: docbook-to-man.sgml,v 1.8 2002/04/27 15:28:02 debacle Exp $ -->

<refentry>
  <refentryinfo>
    <address>
      <email>rusty@rustcorp.com.au</email>
    </address>
    <author>
      <firstname>Rusty</firstname>
      <surname>Russell</surname>
    </author>
    <date>2007-03-21</date>
  </refentryinfo>
  <refmeta>
    <refentrytitle>depmod</refentrytitle>
    <manvolnum>8</manvolnum>
  </refmeta>
  <refnamediv>
    <refname>depmod</refname> <refpurpose>program to 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>-e</option></arg>
      <arg><option>-F <replaceable>System.map</replaceable></option></arg>
      <arg><option>-n</option></arg>
      <arg><option>-v</option></arg>
      <arg><option><replaceable>version</replaceable></option></arg>
      <arg><option>-A</option></arg>
    </cmdsynopsis>
    <cmdsynopsis>
      <command>depmod</command>
      <arg><option>-e</option></arg>
      <arg><option>-F<replaceable>System.map</replaceable></option></arg>
      <arg><option>-n</option></arg>
      <arg><option>-v</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 EXPORT_SYMBOL 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>/lib/modules/</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> 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).
    </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 "uname -r").
    </para>
    <para>
      <command>depmod</command> will also generate various map files
      in this directory, for use by the hotplug infrastructure.
    </para>
  </refsect1>
  <refsect1>
    <title>OPTIONS</title>
    <variablelist>
      <varlistentry>
          <term><option>-a</option> <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> <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> <option>--basedir <replaceable>basedir</replaceable></option>
	  </term>
	  <listitem>
	    <para>
	      If your modules are not currently in the (normal)
	      directory
	      <filename>/lib/modules/</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.
	    </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-C</option> <option>--config <replaceable>file or directory</replaceable></option>
        </term>
        <listitem>
          <para>
            This option overrides the default configuration file
            (/etc/depmod.conf or /etc/depmod.d/ if that is not found).
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-e</option> <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).
	    </para>
	  </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-F</option> <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.
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-h</option> <option>--help</option>
        </term>
        <listitem>
          <para>
            Print the help message, and exit.
          </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-n</option> <option>--dry-run</option>
        </term>
        <listitem>
          <para>
	    This sends the resulting modules.dep, then the various
	    map files, to standard output, rather than writing them into
	    the module directory.
	  </para>
        </listitem>
      </varlistentry>
      <varlistentry>
        <term><option>-v</option> <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> <option>--version</option>
        </term>
        <listitem>
          <para>
            Show version of program, and exit. See below for caveats when
            run on older kernels.
          </para>
        </listitem>
      </varlistentry>
    </variablelist>
  </refsect1>
  <refsect1>
    <title>BACKWARDS COMPATIBILITY</title>

    <para>
      This version of <command>depmod</command> is for kernels
      <literal>2.5.48</literal> and above.  If it detects a kernel
      with support for old-style modules, or the version specified is
      before <literal>2.5.48</literal>, it will attempt to run
      <command>depmod.old</command> in its place, so it is completely
      transparent to the user.
    </para>
  </refsect1>
  <refsect1>
    <title>COPYRIGHT</title>

    <para>
      This manual page Copyright 2002, Rusty Russell, IBM Corporation.
    </para>
  </refsect1>
  <refsect1>
    <title>SEE ALSO</title>
    <para>
      <citerefentry>
	<refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>,
      <citerefentry>
	<refentrytitle>modules.dep</refentrytitle><manvolnum>5</manvolnum>
      </citerefentry>,
      <citerefentry>
	<refentrytitle>depmod.old</refentrytitle><manvolnum>8</manvolnum>
      </citerefentry>
    </para>
  </refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->