Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 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> |
| 27 | <email>lucas.demarchi@profusion.mobi</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 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> |
Dave Reisner | e3366d4 | 2012-07-25 19:49:00 -0400 | [diff] [blame^] | 104 | <term> |
| 105 | <option>-a</option> |
| 106 | </term> |
| 107 | <term> |
| 108 | <option>--all</option> |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 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> |
Dave Reisner | e3366d4 | 2012-07-25 19:49:00 -0400 | [diff] [blame^] | 118 | <term> |
| 119 | <option>-A</option> |
| 120 | </term> |
| 121 | <term> |
| 122 | <option>--quick</option> |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 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> |
Dave Reisner | e3366d4 | 2012-07-25 19:49:00 -0400 | [diff] [blame^] | 135 | </term> |
| 136 | <term> |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 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> |
Dave Reisner | e3366d4 | 2012-07-25 19:49:00 -0400 | [diff] [blame^] | 154 | <term> |
| 155 | <option>-C</option> |
| 156 | </term> |
| 157 | <term> |
| 158 | <option>--config <replaceable>file or directory</replaceable></option> |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 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> |
Dave Reisner | e3366d4 | 2012-07-25 19:49:00 -0400 | [diff] [blame^] | 168 | <term> |
| 169 | <option>-e</option> |
| 170 | </term> |
| 171 | <term> |
| 172 | <option>--errsyms</option> |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 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 |
Miklos Vajna | 9be0162 | 2012-01-17 01:48:11 +0100 | [diff] [blame] | 180 | true in a perfect world), but this assumption can break especially |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 181 | when additionally updated third party drivers are not correctly |
| 182 | installed or were built incorrectly. |
| 183 | </para> |
| 184 | </listitem> |
| 185 | </varlistentry> |
| 186 | <varlistentry> |
Dave Reisner | e3366d4 | 2012-07-25 19:49:00 -0400 | [diff] [blame^] | 187 | <term> |
| 188 | <option>-E</option> |
| 189 | </term> |
| 190 | <term> |
| 191 | <option>--symvers</option> |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 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> |
Dave Reisner | e3366d4 | 2012-07-25 19:49:00 -0400 | [diff] [blame^] | 204 | <term> |
| 205 | <option>-F</option> |
| 206 | </term> |
| 207 | <term> |
| 208 | <option>--filesyms <replaceable>System.map</replaceable></option> |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 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> |
Dave Reisner | e3366d4 | 2012-07-25 19:49:00 -0400 | [diff] [blame^] | 220 | <term> |
| 221 | <option>-h</option> |
| 222 | </term> |
| 223 | <term> |
| 224 | <option>--help</option> |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 225 | </term> |
| 226 | <listitem> |
| 227 | <para> |
| 228 | Print the help message and exit. |
| 229 | </para> |
| 230 | </listitem> |
| 231 | </varlistentry> |
| 232 | <varlistentry> |
Dave Reisner | e3366d4 | 2012-07-25 19:49:00 -0400 | [diff] [blame^] | 233 | <term> |
| 234 | <option>-n</option> |
| 235 | </term> |
| 236 | <term> |
| 237 | <option>--dry-run</option> |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 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> |
Dave Reisner | e3366d4 | 2012-07-25 19:49:00 -0400 | [diff] [blame^] | 247 | <term> |
| 248 | <option>-P</option> |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 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> |
Dave Reisner | e3366d4 | 2012-07-25 19:49:00 -0400 | [diff] [blame^] | 258 | <term> |
| 259 | <option>-v</option> |
| 260 | </term> |
| 261 | <term> |
| 262 | <option>--verbose</option> |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 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> |
Dave Reisner | e3366d4 | 2012-07-25 19:49:00 -0400 | [diff] [blame^] | 273 | <term> |
| 274 | <option>-V</option> |
| 275 | </term> |
| 276 | <term> |
| 277 | <option>--version</option> |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 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> |
Dave Reisner | e3366d4 | 2012-07-25 19:49:00 -0400 | [diff] [blame^] | 287 | <term> |
| 288 | <option>-w</option> |
Lucas De Marchi | 6d96056 | 2012-01-12 13:47:21 -0200 | [diff] [blame] | 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> |