
Issue 11
© Solarflare Communications 2014
42
Solarflare Server Adapter
User Guide
DKMS RPM
Dynamic Kernel Module Support (DKMS) is a framework where device driver source can reside
outside the kernel source tree. It supports an easy method to rebuild modules when kernels are
upgraded.
Execute the command
dkms --version
to determine whether DKMS is installed.
To install the Solarflare driver DKMS package execute the following command:
rpm -i sfc-dkms-<version>.noarch.rpm
Building the Source RPM
These instructions may be used to build a source RPM package for use with Linux distributions or
kernel versions where DKMS or KMP packages are not suitable.
1
First, the kernel headers for the running kernel must be installed at
/lib/modules/
<kernel-version>/build
. On Red Hat systems, install the appropriate
kernel-smp-
devel
or
kernel-devel
package. On SUSE systems install the
kernel-source
package.
2
To build a source RPM for the running kernel version from the source RPM, enter the following
at the command-line:
rpmbuild --rebuild <package_name>
Where
package_name
is the full path to the source RPM (see the note below).
3
To build for a different kernel to the running system, enter the following command:
rpmbuild --define 'kernel <kernel version>' --rebuild <package_name>
4
Install the resulting RPM binary package, as described in
Installing Solarflare Drivers and
NOTE:
RPMs can be installed for multiple kernel versions.
NOTE:
The location of the generated RPM is dependent on the distribution and often the version
of the distribution and the RPM build tools.
The RPM build process should print out the location of the RPM towards the end of the build
process, but it can be hard to find amongst the other output.
Typically the RPM will be placed in
/usr/src/<dir>/RPMS/<arch>/
, where
<dir>
is
distribution specific. Possible folders include Red Hat,
packages
or
extra
. The RPM file will be
named using the same convention as the Solarflare provided pre-built binary RPMs.
The command:
find /usr/src -name "*sfc*.rpm”
will list the locations of all Solarflare
RPMs.