]> git.ipfire.org Git - thirdparty/kmod.git/blob - README.md
Fix return value doc for kmod_module_get_info()
[thirdparty/kmod.git] / README.md
1 ## kmod - Linux kernel module handling
2
3 [![Coverity Scan Status](https://scan.coverity.com/projects/2096/badge.svg)](https://scan.coverity.com/projects/2096)
4
5
6 Information
7 ===========
8
9 Mailing list:
10 linux-modules@vger.kernel.org (no subscription needed)
11 https://lore.kernel.org/linux-modules/
12
13 Signed packages:
14 http://www.kernel.org/pub/linux/utils/kernel/kmod/
15
16 Git:
17 git://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
18 http://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
19 https://git.kernel.org/pub/scm/utils/kernel/kmod/kmod.git
20
21 Gitweb:
22 http://git.kernel.org/?p=utils/kernel/kmod/kmod.git
23 https://github.com/kmod-project/kmod
24
25 Irc:
26 #kmod on irc.freenode.org
27
28 License:
29 LGPLv2.1+ for libkmod, testsuite and helper libraries
30 GPLv2+ for tools/*
31
32
33 OVERVIEW
34 ========
35
36 kmod is a set of tools to handle common tasks with Linux kernel modules like
37 insert, remove, list, check properties, resolve dependencies and aliases.
38
39 These tools are designed on top of libkmod, a library that is shipped with
40 kmod. See libkmod/README for more details on this library and how to use it.
41 The aim is to be compatible with tools, configurations and indexes from
42 module-init-tools project.
43
44 Compilation and installation
45 ============================
46
47 In order to compiler the source code you need following software packages:
48 - GCC compiler
49 - GNU C library
50
51 Optional dependencies:
52 - ZLIB library
53 - LZMA library
54
55 Typical configuration:
56 ./configure CFLAGS="-g -O2" --prefix=/usr \
57 --sysconfdir=/etc --libdir=/usr/lib
58
59 Configure automatically searches for all required components and packages.
60
61 To compile and install run:
62 make && make install
63
64 Hacking
65 =======
66
67 Run 'autogen.sh' script before configure. If you want to accept the recommended
68 flags, you just need to run 'autogen.sh c'. Note that the recommended
69 flags require cython be installed to compile successfully.
70
71 Make sure to read the CODING-STYLE file and the other READMEs: libkmod/README
72 and testsuite/README.
73
74 Compatibility with module-init-tools
75 ====================================
76
77 kmod replaces module-init-tools, which is end-of-life. Most of its tools are
78 rewritten on top of libkmod so it can be used as a drop in replacements.
79 Somethings however were changed. Reasons vary from "the feature was already
80 long deprecated on module-init-tools" to "it would be too much trouble to
81 support it".
82
83 There are several features that are being added in kmod, but we don't
84 keep track of them here.
85
86 modprobe
87 --------
88
89 * 'modprobe -l' was marked as deprecated and does not exist anymore
90
91 * 'modprobe -t' is gone, together with 'modprobe -l'
92
93 * modprobe doesn't parse configuration files with names not ending in
94 '.alias' or '.conf'. modprobe used to warn about these files.
95
96 * modprobe doesn't parse 'config' and 'include' commands in configuration
97 files.
98
99 * modprobe from m-i-t does not honour softdeps for install commands. E.g.:
100 config:
101
102 install bli "echo bli"
103 install bla "echo bla"
104 softdep bla pre: bli
105
106 With m-i-t, the output of 'modprobe --show-depends bla' will be:
107 install "echo bla"
108
109 While with kmod:
110 install "echo bli"
111 install "echo bla"
112
113 * kmod doesn't dump the configuration as is in the config files. Instead it
114 dumps the configuration as it was parsed. Therefore, comments and file names
115 are not dumped, but on the good side we know what the exact configuration
116 kmod is using. We did this because if we only want to know the entire content
117 of configuration files, it's enough to use find(1) in modprobe.d directories
118
119 depmod
120 ------
121
122 * there's no 'depmod -m' option: legacy modules.*map files are gone
123
124 lsmod
125 -----
126
127 * module-init-tools used /proc/modules to parse module info. kmod uses
128 /sys/module/*, but there's a fallback to /proc/modules if the latter isn't
129 available