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