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