1
by Matt Domsch
Import upstream version 2.0.17.4 |
1 |
README.dkms |
2 |
Version 1.1 |
|
3 |
2/4/2004 |
|
4 |
||
5 |
This intention of this README is to explain how a DKMS enabled module RPM |
|
6 |
functions and also how DKMS can be used in conjunction with tarballs which |
|
7 |
contain a dkms.conf file within them. |
|
8 |
||
9 |
The DKMS project (and any updates) can be found at: http://linux.dell.com/dkms/ |
|
10 |
||
11 |
Table of Contents |
|
12 |
0. Installation of DKMS via RPM |
|
13 |
1. Installation via RPM |
|
14 |
2. Installation via DKMS Tarballs |
|
15 |
3. Installation on Systems with no Module Source and/or Compiler |
|
16 |
4. Further Documentation |
|
17 |
||
18 |
###############################
|
|
19 |
0. Installation of DKMS via RPM |
|
20 |
###############################
|
|
21 |
||
22 |
To install DKMS itself, you simply install (or upgrade) it like any |
|
23 |
other RPM: |
|
24 |
||
25 |
rpm -Uvh dkms-<version>-<release>.noarch.rpm |
|
26 |
||
27 |
This is a prerequisite to installing DKMS-enabled module RPMs. |
|
28 |
||
29 |
||
30 |
#######################
|
|
31 |
1. Installation via RPM |
|
32 |
#######################
|
|
33 |
||
34 |
To install a DKMS enabled module RPM, you simply install it like any other |
|
35 |
RPM: |
|
36 |
||
37 |
rpm -ivh <module>-<version>-<rpmversion>.noarch.rpm |
|
38 |
||
39 |
With a DKMS enabled module RPM, most of the installation work done by the RPM |
|
40 |
is actually handed off to DKMS within the RPM. Generally it does the following: |
|
41 |
||
42 |
a. Installs module source into /usr/src/<module>-<moduleversion>/ |
|
43 |
b. Places a dkms.conf file into /usr/src/<module>-<moduleversion>/ |
|
44 |
c. Runs: dkms add -m <module> -v <version> |
|
45 |
d. Runs: dkms build -m <module> -v <version> |
|
46 |
e. Runs: dkms install -m <module> -v <version> |
|
47 |
||
48 |
Once the RPM installation is complete, you can use DKMS to understand which |
|
49 |
module and which moduleversion is installed on which kernels. This can be |
|
50 |
accomplished via the command: |
|
51 |
||
52 |
dkms status |
|
53 |
||
54 |
From here, you can then use the various DKMS commands (eg. add, build, install, |
|
55 |
uninstall) to load that module onto other kernels. |
|
56 |
||
57 |
||
58 |
##################################
|
|
59 |
2. Installation via DKMS Tarballs |
|
60 |
##################################
|
|
61 |
||
62 |
DKMS is not limited to installation via RPM only. In fact, DKMS can also |
|
63 |
install directly from the following: |
|
64 |
||
65 |
a. Generic module source tarballs which contain a dkms.conf file |
|
66 |
b. Specially created DKMS tarballs with module source, pre-built module |
|
67 |
binaries and a dkms.conf file |
|
68 |
c. Specially created DKMS tarballs with pre-built module binaries and a |
|
69 |
dkms.conf file |
|
70 |
d. Manual placement of module source and dkms.conf file into |
|
71 |
/usr/src/<module>-<moduleversion>/ directory |
|
72 |
||
73 |
In order to load any tarball into the DKMS tree, you must use the following |
|
74 |
command: |
|
75 |
||
76 |
dkms ldtarball --archive=/path/to/dkms_enabled.tar.gz |
|
77 |
||
78 |
This command will first inspect the tarball to ensure that it contains a |
|
79 |
dkms.conf configuration file for that module. If it cannot find this file |
|
80 |
anywhere within the archive, then the ldtarball will fail. |
|
81 |
||
82 |
From here, it will place the source in the tarball into /usr/src/<module>- |
|
83 |
<moduleversion>/. If source already exists in the directory, it will not |
|
84 |
overwrite it unless the --force option is specified. If the tarball is of type |
|
85 |
"c" above and does not contain source, it will only continue to load the |
|
86 |
tarball if existing module source is found in /usr/src/<module>-<moduleversion>/ |
|
87 |
or if the --force option is specified. |
|
88 |
||
89 |
Continuing on, if the tarball is of type "b" or "c" it will then load any |
|
90 |
pre-built binaries found within the tarball into the dkms tree, but will stop |
|
91 |
short of installing them. Thus, all pre-built binaries will then be of in the |
|
92 |
"built" state when checked from the `dkms status` command. You can then use the |
|
93 |
`dkms install` command to install any of these binaries. |
|
94 |
||
95 |
To create a tarball of type "a" above, you need only to take module source and a |
|
96 |
dkms.conf file for that module and create a tarball from them. Tarballs of |
|
97 |
type "b" or type "c" are created with the `dkms mktarball` command. To create |
|
98 |
a type "c" tarball, you must specify the flag --binaries-only with the |
|
99 |
mktarball. |
|
100 |
||
101 |
||
102 |
################################################################
|
|
103 |
3. Installation on Systems with no Module Source and/or Compiler |
|
104 |
################################################################
|
|
105 |
||
106 |
If you choose not to load module source on your system or if you choose not to |
|
107 |
load a compiler such as gcc onto your system, DKMS can still be used to install |
|
108 |
modules. It does this through use of DKMS binary only tarballs as explained in |
|
109 |
section 2 of this README under tarballs of type "c". |
|
110 |
||
111 |
If your system does not have module source, loading the dkms tarball will fail |
|
112 |
because of this. To avoid this, use the --force flag, as such: |
|
113 |
||
114 |
dkms ldtarball --archive=/path/to/dkms_enabled.tar.gz --force |
|
115 |
||
116 |
This will load the pre-built binaries into the dkms tree, and create the |
|
117 |
directory /usr/src/<module>-<moduleversion>/ which will only contain the |
|
118 |
module's dkms.conf configuration file. Once the tarball is loaded, you can then |
|
119 |
use `dkms install` to install any of the pre-built modules.
|
|
120 |
||
121 |
Of course, since module source will not be located in your dkms tree, you will
|
|
122 |
not be able to build any modules with DKMS for this package.
|
|
123 |
||
124 |
||
125 |
########################
|
|
126 |
4. Further Documentation
|
|
127 |
########################
|
|
128 |
||
129 |
Once DKMS is installed, you can reference its man page for further information
|
|
130 |
on different DKMS options and also to understand the formatting of a module's |
|
131 |
dkms.conf configuration file. |
|
132 |
||
133 |
You may also wish to join the dkms-devel public mailing-list at |
|
134 |
http://lists.us.dell.com/. |
|
135 |
||
136 |
The DKMS project is located at: http://linux.dell.com/dkms/ |