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