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