DKMS mkrpm, mkdriverdisk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Just wanted to give everyone an FYI about DKMS given some of its nice
new features in the current testing version:

http://linux.dell.com/dkms/testing/

### Making Kernel Module RPMs ###

dkms add -m <module> -v <version>
dkms build -m <module> -v <version> -k <kernel1>
dkms build -m <module> -v <version> -k <kernel2>
dkms build -m <module> -v <version> -k <kernel3>
dkms mkrpm -m <module> -v <version> -k <kernel1> -k <kernel2> -k <kernel3>

That's it!  RPM created.

This will use /etc/dkms/template-dkms-mkrpm.spec and create an RPM.  This
RPM will contain a DKMS tarball with the module source and, in this case,
precompiled binaries for the 3 kernels I specified.  When installed on
the end users system, it will load the tarball and install the prebuilts.
If it then sees that the currently running kernel does not have this module
installed, it will kick off a dkms build and dkms install to ensure
that it does. 

Alternatively, if DKMS finds a file /usr/src/<module>-<version>/<module>-dkms-mkrpm.spec,
it will use that spec file instead of the template in /etc/dkms/.  This is useful if you
need to modify the template spec to change the License, etc, etc.

### Making Red Hat Driver Disks ###

1. Download and install at least dkms-1.92 (its a testing versions, bugs may happen)

2. Get a module which has been dkms-ified (has a dkms.conf)
   For example: http://download.qlogic.com/drivers/18277/qla2x00-v6.07.02-1dkms.tgz

3. dkms add -m <module> -v <version>

4. dkms build -m <module> -v <version> -k <kernel1> -a <arch1>
   dkms build -m <module> -v <version> -k <kernel2> -a <arch1>
   dkms build -m <module> -v <version> -k <kernel2> -a <arch2>

5. dkms mkdriverdisk -d redhat2 -m <module> -v <version> --all

That's it.  It will create a driver disk image which can be used during Red Hat install
time to supercede drivers in the kernel.  If you want to stick with the old RH driver
disk format, just specify -d redhat1.  Or, you can specify -d redhat and it will pick
which one to use (with prejudice to the old format) depending on whether you have 
specified multiple different architectures.

Gary Lerhaupt
Dell Linux Development
http://linux.dell.com


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux