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>[email protected]</email> 16 </author> 17 <author> 18 <contrib>Developer</contrib> 19 <firstname>Robby</firstname> 20 <surname>Workman</surname> 21 <email>[email protected]</email> 22 </author> 23 <author> 24 <contrib>Developer</contrib> 25 <firstname>Lucas</firstname> 26 <surname>De Marchi</surname> 27 <email>[email protected]</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>-o <replaceable>outdir</replaceable></option></arg> 49 <arg><option>-e</option></arg> 50 <arg><option>-E <replaceable>Module.symvers</replaceable></option></arg> 51 <arg><option>-F <replaceable>System.map</replaceable></option></arg> 52 <arg><option>-n</option></arg> 53 <arg><option>-v</option></arg> 54 <arg><option>-A</option></arg> 55 <arg><option>-P <replaceable>prefix</replaceable></option></arg> 56 <arg><option>-w</option></arg> 57 <arg><option><replaceable>version</replaceable></option></arg> 58 </cmdsynopsis> 59 60 <cmdsynopsis> 61 <command>depmod</command> 62 <arg><option>-e</option></arg> 63 <arg><option>-E <replaceable>Module.symvers</replaceable></option></arg> 64 <arg><option>-F <replaceable>System.map</replaceable></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>@MODULE_DIRECTORY@/</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>@MODULE_DIRECTORY@/</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>-o <replaceable>outdir</replaceable></option> 158 </term> 159 <term> 160 <option>--outdir <replaceable>outdir</replaceable></option> 161 </term> 162 <listitem> 163 <para> 164 Set the output directory where depmod will store any generated file. 165 <replaceable>outdir</replaceable> serves as a root to that location, 166 similar to how <replaceable>basedir</replaceable> is used. Also this 167 setting takes precedence and if used together with 168 <replaceable>basedir</replaceable> it will result in the input being 169 that directory, but the output being the one set by 170 <replaceable>outdir</replaceable>. 171 </para> 172 </listitem> 173 </varlistentry> 174 <varlistentry> 175 <term> 176 <option>-C</option> 177 </term> 178 <term> 179 <option>--config <replaceable>file or directory</replaceable></option> 180 </term> 181 <listitem> 182 <para> 183 This option overrides the default configuration directory at 184 <filename>/etc/depmod.d/</filename>. 185 </para> 186 </listitem> 187 </varlistentry> 188 <varlistentry> 189 <term> 190 <option>-e</option> 191 </term> 192 <term> 193 <option>--errsyms</option> 194 </term> 195 <listitem> 196 <para> 197 When combined with the <option>-F</option> option, this reports any 198 symbols which a module needs which are not supplied by other 199 modules or the kernel. Normally, any symbols not provided by 200 modules are assumed to be provided by the kernel (which should be 201 true in a perfect world), but this assumption can break especially 202 when additionally updated third party drivers are not correctly 203 installed or were built incorrectly. 204 </para> 205 </listitem> 206 </varlistentry> 207 <varlistentry> 208 <term> 209 <option>-E</option> 210 </term> 211 <term> 212 <option>--symvers</option> 213 </term> 214 <listitem> 215 <para> 216 When combined with the <option>-e</option> option, this 217 reports any symbol versions supplied by modules that do 218 not match with the symbol versions provided by the 219 kernel in its <filename>Module.symvers</filename>. 220 This option is mutually incompatible with <option>-F</option>. 221 </para> 222 </listitem> 223 </varlistentry> 224 <varlistentry> 225 <term> 226 <option>-F</option> 227 </term> 228 <term> 229 <option>--filesyms <replaceable>System.map</replaceable></option> 230 </term> 231 <listitem> 232 <para> 233 Supplied with the <filename>System.map</filename> produced when the 234 kernel was built, this allows the <option>-e</option> option to 235 report unresolved symbols. This option is mutually incompatible 236 with <option>-E</option>. 237 </para> 238 </listitem> 239 </varlistentry> 240 <varlistentry> 241 <term> 242 <option>-h</option> 243 </term> 244 <term> 245 <option>--help</option> 246 </term> 247 <listitem> 248 <para> 249 Print the help message and exit. 250 </para> 251 </listitem> 252 </varlistentry> 253 <varlistentry> 254 <term> 255 <option>-n</option> 256 </term> 257 <term> 258 <option>--show</option> 259 </term> 260 <term> 261 <option>--dry-run</option> 262 </term> 263 <listitem> 264 <para> 265 This sends the resulting modules.dep and the various map files to 266 standard output rather than writing them into the module directory. 267 </para> 268 </listitem> 269 </varlistentry> 270 <varlistentry> 271 <term> 272 <option>-P</option> 273 </term> 274 <listitem> 275 <para> 276 Some architectures prefix symbols with an extraneous character. 277 This specifies a prefix character (for example '_') to ignore. 278 </para> 279 </listitem> 280 </varlistentry> 281 <varlistentry> 282 <term> 283 <option>-v</option> 284 </term> 285 <term> 286 <option>--verbose</option> 287 </term> 288 <listitem> 289 <para> 290 In verbose mode, <command>depmod</command> will print (to stdout) 291 all the symbols each module depends on and the module's file name 292 which provides that symbol. 293 </para> 294 </listitem> 295 </varlistentry> 296 <varlistentry> 297 <term> 298 <option>-V</option> 299 </term> 300 <term> 301 <option>--version</option> 302 </term> 303 <listitem> 304 <para> 305 Show version of program and exit. See below for caveats when 306 run on older kernels. 307 </para> 308 </listitem> 309 </varlistentry> 310 <varlistentry> 311 <term> 312 <option>-w</option> 313 </term> 314 <listitem> 315 <para> 316 Warn on duplicate dependencies, aliases, symbol versions, etc. 317 </para> 318 </listitem> 319 </varlistentry> 320 </variablelist> 321 </refsect1> 322 323 <refsect1><title>COPYRIGHT</title> 324 <para> 325 This manual page originally Copyright 2002, Rusty Russell, 326 IBM Corporation. Portions Copyright Jon Masters, and others. 327 </para> 328 </refsect1> 329 330 <refsect1><title>SEE ALSO</title> 331 <para> 332 <citerefentry> 333 <refentrytitle>depmod.d</refentrytitle><manvolnum>5</manvolnum> 334 </citerefentry>, 335 <citerefentry> 336 <refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum> 337 </citerefentry>, 338 <citerefentry> 339 <refentrytitle>modules.dep</refentrytitle><manvolnum>5</manvolnum> 340 </citerefentry> 341 </para> 342 </refsect1> 343</refentry> 344