IPW3945
From KernelDrivers
Intel supply a modern WiFi chipset known as the IPW3945 (supported by an externally maintained out-of-tree Linux Kernel Module known as ipw3945.ko). This article explains how to package up this example real-world driver using the kmod version of KernelModulePackages as used in Fedora and future releases of the Red Hat Enterprise Linux product.
Please contact Jon Masters with comments.
Contents |
Pre-requisities
The IPW3945 Linux Kernel Module supports a variety of features, in part with the aid of various userland components. These include the following essential packages:
- ipw3945-ucode - Binary firmware loaded at module insertion time.
- ipw3945d - A regulatory daemon to control chip operation.
To begin packaging this module for distribution, you will need:
- A recent RHEL5 or Fedora Linux system with the appropriate target kernel-devel package installed. This means the variant of the kernel that you will use this package against - for example on i686, we have variants including the default (UP/SMP) kernel, an PAE variant and one built for xen. Make sure you have the appropriate kernel-devel package installed for your target (we don't support cross-compilation at this time when building RPMs for deployment on Red Hat systems).
- The ipw3945-kmod source RPM package. This is a source RPM from which you can locate the source and RPM SPEC file used to build this example. Of course, you can just rebuild this source RPM file for testing too, if you don't really want to explore the content of the package itself.
Setting up your system
Install the IPW3945 source RPM:
[jcm@perihelion ~]$ sudo rpm -ivh ipw3945-kmod-1.0-4.7.el5.src.rpm 1:ipw3945-kmod ########################################### [100%]
NOTE: Please do ignore any errors of the form "warning: user brewbuilder does not exist - using root", these are generated because the Red Hat build system uses a non-standard user for building packages. This user will not be available by default on your own systems, but it is perfectly acceptable to use the root user or your own user account for building packages.
You can follow along with this tutorial, refering to the sources just installed in /usr/src/redhat (or other alternate location - depending on your personal RPM macros - if you override them). You will find the following files of particular importance:
- /usr/src/redhat/SOURCES/ipw3945-1.0.tar.bz2 - the IPW3945 module sources.
- /usr/src/redhat/SOURCES/kmodtool - the customized kmodtool script.
- /usr/src/redhat/SPECS/ipw3945.spec - the IPW3945 SPEC file.
NOTE: The kmodtool script is included in the systemwide RPM library, but that it is possible to override this with your own customized version. In this case, a custom version is supplied in order to manually remove the otherwise automatic creation of a "common" package dependency. IPW3945 already has a variety of support packages, and so does not require an ipw3945-common packages. In a future release of Enterprise Linux, this may well become a configurable option in the main script. For now, you can use this approach if you don't want a "common" package dependency.
IPW3945 Module Source
The source for the IPW3945 Linux Kernel Module, contained within ipw3945-1.0.tar.bz2, includes the following files:
- ipw3945.c
- ipw3945_daemon.h
- ipw3945.h
- Makefile
These are built against the kernel-devel package installed on your system during the rpmbuild.
IPW3945 SPEC file
The SPEC file supplied with the IPW3945 example kmod package defines and controls the build process. Broadly speaking, this process is split into the following stages:
- Setup module sources for building
- Build ipw3945.ko using kernel-devel package as kernel source
- Install ipw3945.ko into buildroot for packaging
- Generate RPM ABI tracking dependencies
The complete SPEC file is as follows:
###############################################################################
###############################################################################
##
## Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved.
##
## This copyrighted material is made available to anyone wishing to use,
## modify, copy, or redistribute it subject to the terms and conditions
## of the GNU General Public License v.2.
##
###############################################################################
###############################################################################
Source10: kmodtool
%define kmodtool bash %{SOURCE10}
%{!?kversion: %define kversion 2.6.18-8.el5}
%define kmod_name ipw3945
%define kverrel %(%{kmodtool} verrel %{?kversion} 2>/dev/null)
%ifarch i686 x86_64 ia64
%define xenvar xen
%endif
%define upvar ""
%{!?kvariants: %define kvariants %{?upvar} %{?xenvar}}
Name: %{kmod_name}-kmod
Version: 1.0
Release: 4.7%{?dist}
Summary: %{kmod_name} kernel module
Group: System Environment/Kernel
License: GPL
URL: http://www.intel.com/
Source0: ipw3945-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExclusiveArch: i686 x86_64
%description
ipw3945 - The Linux kernel driver module needed to enable support for this Intel WiFi chipset.
# magic hidden here:
%{expand:%(%{kmodtool} rpmtemplate_kmp %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
%prep
# to understand the magic better or to debug it, uncomment this:
#{kmodtool} rpmtemplate_kmp %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null
#sleep 5
%setup -q -c -T -a 0
for kvariant in %{kvariants} ; do
cp -a ipw3945-1.0 _kmod_build_$kvariant
done
%build
for kvariant in %{kvariants}
do
ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
pushd _kmod_build_$kvariant
make -C "${ksrc}" modules M=$PWD
popd
done
%install
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=extra/%{kmod_name}
for kvariant in %{kvariants}
do
ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
pushd _kmod_build_$kvariant
make -C "${ksrc}" modules_install M=$PWD
popd
done
%clean
rm -rf $RPM_BUILD_ROOT
%changelog
* Fri Jan 26 2007 Mike McLean <mikem@redhat.com> - 4.7
- Update to RHEL5 RC kernel 8 and check kABI.
IPW3945 RPM SPEC file annotations
The previous section showed the example IPW3945 RPM SPEC file. Let's now split this out into its component parts and take a look at each one in turn. First, preparing the sources:
Source10: kmodtool
%define kmodtool bash %{SOURCE10}
%{!?kversion: %define kversion 2.6.18-8.el5}
%define kmod_name ipw3945
%define kverrel %(%{kmodtool} verrel %{?kversion} 2>/dev/null)
%ifarch i686 x86_64 ia64
%define xenvar xen
%endif
%define upvar ""
%{!?kvariants: %define kvariants %{?upvar} %{?xenvar}}
The kmodtool script will be used to help drive the ABI dependency generation process, and requires that the kmod_name is defined as well as those kernel variants against which the source will be built - in this case for i686, x86_64 and ia64 systems, both with and without the xen kernel.
Next, let's define some package meta-data, such as the package name, version, release (NVR), and all that jazz:
Name: %{kmod_name}-kmod
Version: 1.0
Release: 4.7%{?dist}
Summary: %{kmod_name} kernel module
Group: System Environment/Kernel
License: GPL
URL: http://www.intel.com/
Source0: ipw3945-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
ExclusiveArch: i686 x86_64
%description
ipw3945 - The Linux kernel driver module needed to enable support for this Intel WiFi chipset.
Now call kmodtool to have necessary boilerplate data added to the package:
# magic hidden here:
%{expand:%(%{kmodtool} rpmtemplate_kmp %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null)}
The prep stage is used to unpack the module sources into a separate directory for each kernel variant that will be built against:
%prep
# to understand the magic better or to debug it, uncomment this:
#{kmodtool} rpmtemplate_kmp %{kmod_name} %{kverrel} %{kvariants} 2>/dev/null
#sleep 5
%setup -q -c -T -a 0
for kvariant in %{kvariants} ; do
cp -a ipw3945-1.0 _kmod_build_$kvariant
done
The build stage is used to actually build the module source, against the kernel-devel pacakge for the appropriate kernel variant:
%build
for kvariant in %{kvariants}
do
ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
pushd _kmod_build_$kvariant
make -C "${ksrc}" modules M=$PWD
popd
done
The install stage "installs" the ipw3945.ko Linux Kernel Module built against the appropriate kernel-devel variant Red Hat kernel source into the RPM build root. The module is installed into a subdirectory of the usual /lib/modules/2.6.18-8.el5 module directory, named extra on Red Hat systems.
%install
export INSTALL_MOD_PATH=$RPM_BUILD_ROOT
export INSTALL_MOD_DIR=extra/%{kmod_name}
for kvariant in %{kvariants}
do
ksrc=%{_usrsrc}/kernels/%{kverrel}${kvariant:+-$kvariant}-%{_target_cpu}
pushd _kmod_build_$kvariant
make -C "${ksrc}" modules_install M=$PWD
popd
done
Finally, the RPM build root is cleaned up to prevent the system's temporary directories filling up:
%clean rm -rf $RPM_BUILD_ROOT
Putting it all together - building the IPW3945 kmod package
You can build the example IPW3945 kmod package using the rpmbuild command (output formatted for brevity):
[jcm@londonpacket ~]$ sudo rpmbuild -ba /usr/src/redhat/SPECS/ipw3945.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.78251
+ umask 022
+ cd /usr/src/redhat/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /usr/src/redhat/BUILD
+ rm -rf ipw3945-kmod-1.0
+ /bin/mkdir -p ipw3945-kmod-1.0
+ cd ipw3945-kmod-1.0
+ /usr/bin/bzip2 -dc /usr/src/redhat/SOURCES/ipw3945-1.0.tar.bz2
+ tar -xf -
+ STATUS=0
+ '[' 0 -ne 0 ']'
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chown -Rhf root .
++ /usr/bin/id -u
+ '[' 0 = 0 ']'
+ /bin/chgrp -Rhf root .
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ for kvariant in '""' xen
+ cp -a ipw3945-1.0 _kmod_build_
+ for kvariant in '""' xen
+ cp -a ipw3945-1.0 _kmod_build_xen
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.78251
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd ipw3945-kmod-1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ for kvariant in '""' xen
+ ksrc=/usr/src/kernels/2.6.18-8.el5-x86_64
+ pushd _kmod_build_
/usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_ /usr/src/redhat/BUILD/ipw3945-kmod-1.0
+ make -C /usr/src/kernels/2.6.18-8.el5-x86_64 modules \
M=/usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_
make: Entering directory `/usr/src/kernels/2.6.18-8.el5-x86_64'
CC [M] /usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_/ipw3945.o
Building modules, stage 2.
MODPOST
CC /usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_/ipw3945.mod.o
LD [M] /usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_/ipw3945.ko
make: Leaving directory `/usr/src/kernels/2.6.18-8.el5-x86_64'
+ popd
/usr/src/redhat/BUILD/ipw3945-kmod-1.0
+ for kvariant in '""' xen
+ ksrc=/usr/src/kernels/2.6.18-8.el5-xen-x86_64
+ pushd _kmod_build_xen
/usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_xen /usr/src/redhat/BUILD/ipw3945-kmod-1.0
+ make -C /usr/src/kernels/2.6.18-8.el5-xen-x86_64 modules \
M=/usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_xen
make: Entering directory `/usr/src/kernels/2.6.18-8.el5-xen-x86_64'
CC [M] /usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_xen/ipw3945.o
Building modules, stage 2.
MODPOST
CC /usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_xen/ipw3945.mod.o
LD [M] /usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_xen/ipw3945.ko
make: Leaving directory `/usr/src/kernels/2.6.18-8.el5-xen-x86_64'
+ popd
/usr/src/redhat/BUILD/ipw3945-kmod-1.0
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.39608
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd ipw3945-kmod-1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ export INSTALL_MOD_PATH=/var/tmp/ipw3945-kmod-1.0-4.7-root-root
+ INSTALL_MOD_PATH=/var/tmp/ipw3945-kmod-1.0-4.7-root-root
+ export INSTALL_MOD_DIR=extra/ipw3945
+ INSTALL_MOD_DIR=extra/ipw3945
+ for kvariant in '""' xen
+ ksrc=/usr/src/kernels/2.6.18-8.el5-x86_64
+ pushd _kmod_build_
/usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_ /usr/src/redhat/BUILD/ipw3945-kmod-1.0
+ make -C /usr/src/kernels/2.6.18-8.el5-x86_64 modules_install \
M=/usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_
make: Entering directory `/usr/src/kernels/2.6.18-8.el5-x86_64'
INSTALL /usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_/ipw3945.ko
DEPMOD 2.6.18-8.el5
make: Leaving directory `/usr/src/kernels/2.6.18-8.el5-x86_64'
+ popd
/usr/src/redhat/BUILD/ipw3945-kmod-1.0
+ for kvariant in '""' xen
+ ksrc=/usr/src/kernels/2.6.18-8.el5-xen-x86_64
+ pushd _kmod_build_xen
/usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_xen /usr/src/redhat/BUILD/ipw3945-kmod-1.0
+ make -C /usr/src/kernels/2.6.18-8.el5-xen-x86_64 modules_install \
M=/usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_xen
make: Entering directory `/usr/src/kernels/2.6.18-8.el5-xen-x86_64'
INSTALL /usr/src/redhat/BUILD/ipw3945-kmod-1.0/_kmod_build_xen/ipw3945.ko
DEPMOD 2.6.18-8.el5xen
make: Leaving directory `/usr/src/kernels/2.6.18-8.el5-xen-x86_64'
+ popd
/usr/src/redhat/BUILD/ipw3945-kmod-1.0
+ /usr/lib/rpm/find-debuginfo.sh /usr/src/redhat/BUILD/ipw3945-kmod-1.0
0 blocks
find: /var/tmp/ipw3945-kmod-1.0-4.7-root-root/usr/lib: No such file or directory
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-python-bytecompile
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: kmod-ipw3945-1.0-4.7
Finding Provides: /usr/lib/rpm/redhat/find-provides
Finding Requires: /usr/lib/rpm/redhat/find-requires
Provides: kernel-modules = 2.6.18-8.el5 ipw3945-kmod = 1.0-4.7
Requires(interp): /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(VersionedDependencies) <= 3.0.3-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
Requires(post): /sbin/depmod /bin/sh
Requires(preun): /bin/sh
Requires(postun): /sbin/depmod /bin/sh
Requires: kernel(rhel5_net_ieee80211_ga) = 98354aea16dccf5bc05fc34673c9dc8c01fc1303
kernel(rhel5_fs_sysfs_ga) = decd3b7e952944c9da2ba45b22fd4c506ee103df
kernel(rhel5_net_core_ga) = c186a7dc043c903564c2dd9ed49d8847b7043c86
kernel(rhel5_kernel_ga) = 84d69198cf51b494e38d9d0a54e52607c8a507e2
kernel(rhel5_drivers_pci_ga) = 88a9a7f6575f2f00a7ca4ac83a9f3a2c81641290
kernel(rhel5_lib_ga) = ff25b583d6d314edd98f7c9533c5867194b3d30d
kernel(rhel5_arch_x86_64_mm_ga) = ca7f91963b9397351659241974f92dc85546f8ca
kernel(rhel5_mm_ga) = d5edc1b3d2a4f2bf8ce28d7f4dbeab27cfeb19bd
kernel(rhel5_kernel_irq_ga) = b26b8899fe5a26f79915c27d493dd911b2bde668
kernel(rhel5_drivers_base_ga) = 61dc730b8ca5e74017f2df5b55ecda8b7df7f9c2
kernel(rhel5_arch_x86_64_kernel_ga) = 880dbfce5086d666f5bab6ad642c0323fcdabd90
kernel(rhel5_drivers_char_ga) = f226911057872ff1aec3f38ff138e7004af9345d
kernel(rhel5_vmlinux_ga) = 78f928da689a93ecf2e044fc0ced6b3eaedf5c19
kernel(rhel5_net_sched_ga) = f59ed7ca1ff4a5999cc750181083f8e6dd78c491
kernel(rhel5_kernel_module_ga) = a74a9d2bf87d13d6b9412698dc2728248ca92523
Processing files: kmod-ipw3945-xen-1.0-4.7
Finding Provides: /usr/lib/rpm/redhat/find-provides
Finding Requires: /usr/lib/rpm/redhat/find-requires
Provides: kernel-modules = 2.6.18-8.el5xen ipw3945-kmod = 1.0-4.7
Requires(interp): /bin/sh /bin/sh /bin/sh
Requires(rpmlib): rpmlib(VersionedDependencies) <= 3.0.3-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
Requires(post): /sbin/depmod /bin/sh
Requires(preun): /bin/sh
Requires(postun): /sbin/depmod /bin/sh
Requires: kernel(rhel5_fs_sysfs_ga) = fa27acb839e1128a8e47e3b31a30dabf7cc5f063
kernel(rhel5_net_core_ga) = 51addb9c370f2595fb1bb12e90219e85bcbc0a90
kernel(rhel5_mm_ga) = 9081986688368d2f3cfbb9916f343c0386d0d013
kernel(rhel5_net_ieee80211_ga) = 8187b963b02e538f1394b121e810d6c61e99857a
kernel(rhel5_kernel_ga) = d0f3fa1249f5007887b47bb05a9514b73800234f
kernel(rhel5_lib_ga) = c0ab282427032456594b5e07c9c1b3e171a2138f
kernel(rhel5_drivers_pci_ga) = 5da4962e64c02a34b076c6b6c02abc9241759115
kernel(rhel5_kernel_module_ga) = 9f298944a9e5332beeb68dc9d18bec1e6505f85a
kernel(rhel5_arch_x86_64_mm_ga) = 4db1edbcd4441a8941c6127404ddd577d9128d05
kernel(rhel5_kernel_irq_ga) = b26b8899fe5a26f79915c27d493dd911b2bde668
kernel(rhel5_arch_x86_64_kernel_ga) = 933336f8fd8c90e0eee641788ca0d19ea5064a25
kernel(rhel5_drivers_base_ga) = e1ac81190d152b5fec13e84c05d3afd14cde7c1e
kernel(rhel5_drivers_char_ga) = 5b6bce9360e239c9de4ccba1a22eb4c989a743e3
kernel(rhel5_vmlinux_ga) = ddeb026758d45cbb588d890458f8b02b2f2920f6
kernel(rhel5_net_sched_ga) = 7558924835b9622ec0a8360dba798052bc9547bf
Processing files: ipw3945-kmod-debuginfo-1.0-4.7
Checking for unpackaged file(s): /usr/lib/rpm/check-files /var/tmp/ipw3945-kmod-1.0-4.7-root-root
Wrote: /usr/src/redhat/SRPMS/ipw3945-kmod-1.0-4.7.src.rpm
Wrote: /usr/src/redhat/RPMS/x86_64/kmod-ipw3945-1.0-4.7.x86_64.rpm
Wrote: /usr/src/redhat/RPMS/x86_64/kmod-ipw3945-xen-1.0-4.7.x86_64.rpm
Wrote: /usr/src/redhat/RPMS/x86_64/ipw3945-kmod-debuginfo-1.0-4.7.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.85359
+ umask 022
+ cd /usr/src/redhat/BUILD
+ cd ipw3945-kmod-1.0
+ rm -rf /var/tmp/ipw3945-kmod-1.0-4.7-root-root
+ exit 0
The output from the build will be one (or more, depending upon your build configuration) RPM packages in /usr/src/redhat/RPMS (or alternative location - if you override this in your own RPM macros). For example, on an x86_64 system, the following RPM files may be output:
- kmod-ipw3945-xen-1.0-4.7.x86_64.rpm
- kmod-ipw3945-1.0-4.7.x86_64.rpm
Each has kABI dependency tracking information added automatically. You can view this information using standard Red Hat RPM commands:
[jcm@londonpacket ~]$ rpm -qp --requires /usr/src/redhat/RPMS/x86_64/kmod-ipw3945-1.0-4.7.x86_64.rpm rpmlib(VersionedDependencies) <= 3.0.3-1 /sbin/depmod /sbin/depmod /bin/sh /bin/sh /bin/sh rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 kernel(rhel5_net_ieee80211_ga) = 98354aea16dccf5bc05fc34673c9dc8c01fc1303 kernel(rhel5_fs_sysfs_ga) = decd3b7e952944c9da2ba45b22fd4c506ee103df kernel(rhel5_net_core_ga) = c186a7dc043c903564c2dd9ed49d8847b7043c86 kernel(rhel5_kernel_ga) = 84d69198cf51b494e38d9d0a54e52607c8a507e2 kernel(rhel5_drivers_pci_ga) = 88a9a7f6575f2f00a7ca4ac83a9f3a2c81641290 kernel(rhel5_lib_ga) = ff25b583d6d314edd98f7c9533c5867194b3d30d kernel(rhel5_arch_x86_64_mm_ga) = ca7f91963b9397351659241974f92dc85546f8ca kernel(rhel5_mm_ga) = d5edc1b3d2a4f2bf8ce28d7f4dbeab27cfeb19bd kernel(rhel5_kernel_irq_ga) = b26b8899fe5a26f79915c27d493dd911b2bde668 kernel(rhel5_drivers_base_ga) = 61dc730b8ca5e74017f2df5b55ecda8b7df7f9c2 kernel(rhel5_arch_x86_64_kernel_ga) = 880dbfce5086d666f5bab6ad642c0323fcdabd90 kernel(rhel5_drivers_char_ga) = f226911057872ff1aec3f38ff138e7004af9345d kernel(rhel5_vmlinux_ga) = 78f928da689a93ecf2e044fc0ced6b3eaedf5c19 kernel(rhel5_net_sched_ga) = f59ed7ca1ff4a5999cc750181083f8e6dd78c491 kernel(rhel5_kernel_module_ga) = a74a9d2bf87d13d6b9412698dc2728248ca92523
[jcm@londonpacket ~]$ rpm -qp --requires /usr/src/redhat/RPMS/x86_64/kmod-ipw3945-xen-1.0-4.7.x86_64.rpm rpmlib(VersionedDependencies) <= 3.0.3-1 /sbin/depmod /sbin/depmod /bin/sh /bin/sh /bin/sh rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1 kernel(rhel5_fs_sysfs_ga) = fa27acb839e1128a8e47e3b31a30dabf7cc5f063 kernel(rhel5_net_core_ga) = 51addb9c370f2595fb1bb12e90219e85bcbc0a90 kernel(rhel5_mm_ga) = 9081986688368d2f3cfbb9916f343c0386d0d013 kernel(rhel5_net_ieee80211_ga) = 8187b963b02e538f1394b121e810d6c61e99857a kernel(rhel5_kernel_ga) = d0f3fa1249f5007887b47bb05a9514b73800234f kernel(rhel5_lib_ga) = c0ab282427032456594b5e07c9c1b3e171a2138f kernel(rhel5_drivers_pci_ga) = 5da4962e64c02a34b076c6b6c02abc9241759115 kernel(rhel5_kernel_module_ga) = 9f298944a9e5332beeb68dc9d18bec1e6505f85a kernel(rhel5_arch_x86_64_mm_ga) = 4db1edbcd4441a8941c6127404ddd577d9128d05 kernel(rhel5_kernel_irq_ga) = b26b8899fe5a26f79915c27d493dd911b2bde668 kernel(rhel5_arch_x86_64_kernel_ga) = 933336f8fd8c90e0eee641788ca0d19ea5064a25 kernel(rhel5_drivers_base_ga) = e1ac81190d152b5fec13e84c05d3afd14cde7c1e kernel(rhel5_drivers_char_ga) = 5b6bce9360e239c9de4ccba1a22eb4c989a743e3 kernel(rhel5_vmlinux_ga) = ddeb026758d45cbb588d890458f8b02b2f2920f6 kernel(rhel5_net_sched_ga) = 7558924835b9622ec0a8360dba798052bc9547bf
These packages may now be installed on any system running a compatible kernel (determined according to the kernel ABI versioning checksums contained within the normal package dependency meta-data).
Building FAQ
Q: I am getting errors similar to the following when building the example:
rpmbuild -ba /usr/src/redhat/SPECS/ipw3945.spec
error: Failed build dependencies:
kernel-devel-x86_64 = 2.6.18-8.el5 is needed by ipw3945-kmod-1.0-4.7.x86_64
kernel-xen-devel-x86_64 = 2.6.18-8.el5 is needed by ipw3945-kmod-1.0-4.7.x86_64
If you don't have the appropriate kernel-devel package installed on your system, you will see an error such as that shown (depending upon kernel variant(s) chosen to build against). You can force the build process to use a particular kernel by setting the kversion variable in the RPM SPEC file. Although the built package uses ABI tracking, you still need to choose which kernel source version to build against - this prevents test kernels/development work interfering with your production builds.

