1DEPMOD(8) DEPMOD(8)
2
3
4
6 depmod - program to generate modules.dep and map files.
7
9 depmod [ -b basedir ] [ -e ] [ -F System.map ] [ -n ] [ -v ] [ version
10 ] [ -A ]
11
12
13 depmod [ -e ] [ -FSystem.map ] [ -n ] [ -v ] [ version ] [ filename ...
14 ]
15
16
18 Linux kernel modules can provide services (called "symbols") for other
19 modules to use (using EXPORT_SYMBOL in the code). If a second module
20 uses this symbol, that second module clearly depends on the first mod‐
21 ule. These dependencies can get quite complex.
22
23 depmod creates a list of module dependencies, by reading each module
24 under /lib/modules/version and determining what symbols it exports, and
25 what symbols it needs. By default this list is written to modules.dep
26 in the same directory. If filenames are given on the command line,
27 only those modules are examined (which is rarely useful, unless all
28 modules are listed).
29
30 If a version is provided, then that kernel version's module directory
31 is used, rather than the current kernel version (as returned by "uname
32 -r").
33
34 depmod will also generate various map files in this directory, for use
35 by the hotplug infrastructure.
36
38 -a --all
39 Probe all modules. This option is enabled by default if no file
40 names are given in the command-line.
41
42 -A --quick
43 This option scans to see if any modules are newer than the mod‐
44 ules.dep file before any work is done: if not, it silently exits
45 rather than regenerating the files.
46
47 -b basedir --basedir basedir
48 If your modules are not currently in the (normal) directory
49 /lib/modules/version, but in a staging area, you can specify a
50 basedir which is prepended to the directory name. This basedir
51 is stripped from the resulting modules.dep file, so it is ready
52 to be moved into the normal location.
53
54 -C --config file or directory
55 This option overrides the default configuration file (/etc/dep‐
56 mod.conf or /etc/depmod.d/ if that isn’t found).
57
58 -e --errsyms
59 When combined with the -F option, this reports any symbols which
60 a module needs which are not supplied by other modules or the
61 kernel. Normally, any symbols not provided by modules are
62 assumed to be provided by the kernel (which should be true in a
63 perfect world).
64
65 -F --filesyms System.map
66 Supplied with the System.map produced when the kernel was built,
67 this allows the -e option to report unresolved symbols.
68
69 -h --help
70 Print the help message, and exit.
71
72 -n --dry-run
73 This sends the resulting modules.dep, then the various map
74 files, to standard output, rather than writing them into the
75 module directory.
76
77 -v --verbose
78 In verbose mode depmod will print (to stdout) all the symbols
79 each module depends on and the module’s file name which provides
80 that symbol.
81
82 -V --version
83 Show version of program, and exit. See below for caveats when
84 run on older kernels.
85
87 This version of depmod is for kernels 2.5.48 and above. If it detects
88 a kernel with support for old-style modules, or the version specified
89 is before 2.5.48, it will attempt to run depmod.old in its place, so it
90 is completely transparent to the user.
91
93 This manual page Copyright 2002, Rusty Russell, IBM Corporation.
94
96 modprobe(8), modules.dep(5), depmod.old(8)
97
98
99
100 22 March 2007 DEPMOD(8)