blob: 48899a7fc31e49d5170adbb50eadd4c156ec9ed9 [file] [log] [blame]
<!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:
-->