
Solarflare
Server
Adapter
User
Guide
Solarflare
Adapters
on
Linux
Issue
20
©
Solarflare
Communications
2017
62
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
packages
are
not
suitable.
NOTE:
RPMs
can
be
installed
for
multiple
kernel
versions.
1
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.
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
5
Load
the
driver:
modprobe
sfc
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
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.