Add compat-wireless as an option for kernel build

This commit is contained in:
John W. Linville 2011-11-16 15:28:37 -05:00
parent 8bcddfb033
commit 10731a4cc7
3 changed files with 44 additions and 0 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ clog
*.rpm *.rpm
*.orig *.orig
kernel-[23].*/ kernel-[23].*/
/compat-wireless-2011-11-15.tar.bz2

View File

@ -146,6 +146,9 @@ Summary: The Linux kernel
# build a release kernel on rawhide # build a release kernel on rawhide
%define with_release %{?_with_release: 1} %{?!_with_release: 0} %define with_release %{?_with_release: 1} %{?!_with_release: 0}
# Include driver backports (e.g. compat-wireless) in the kernel build.
%define with_backports %{?_with_backports: 1} %{?!_with_backports: 0}
# Set debugbuildsenabled to 1 for production (build separate debug kernels) # Set debugbuildsenabled to 1 for production (build separate debug kernels)
# and 0 for rawhide (all kernels are debug kernels). # and 0 for rawhide (all kernels are debug kernels).
# See also 'make debug' and 'make release'. # See also 'make debug' and 'make release'.
@ -198,6 +201,11 @@ Summary: The Linux kernel
# The kernel tarball/base version # The kernel tarball/base version
%define kversion 3.%{base_sublevel} %define kversion 3.%{base_sublevel}
# The compat-wireless version
# (If this is less than kversion, make sure with_backports is turned-off.)
# (For rawhide, use a snapshot version anyway...)
%define cwversion 2011-11-15
%define make_target bzImage %define make_target bzImage
%define KVERREL %{version}-%{release}.%{_target_cpu} %define KVERREL %{version}-%{release}.%{_target_cpu}
@ -535,6 +543,7 @@ BuildRequires: rpm-build >= 4.4.2.1-4
%endif %endif
Source0: ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-%{kversion}.tar.bz2 Source0: ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-%{kversion}.tar.bz2
Source1: compat-wireless-%{cwversion}.tar.bz2
Source11: genkey Source11: genkey
Source14: find-provides Source14: find-provides
@ -1416,6 +1425,13 @@ find . -name .gitignore -exec rm -f {} \; >/dev/null
cd .. cd ..
%if %{with_backports}
# Extract the compat-wireless bits
%setup -q -n kernel-%{kversion}%{?dist} -T -D -a 1
%endif
### ###
### build ### build
### ###
@ -1538,6 +1554,9 @@ BuildKernel() {
# dirs for additional modules per module-init-tools, kbuild/modules.txt # dirs for additional modules per module-init-tools, kbuild/modules.txt
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
%if %{with_backports}
mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/backports
%endif
# first copy everything # first copy everything
cp --parents `find -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build cp --parents `find -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
@ -1641,6 +1660,23 @@ BuildKernel() {
# prune junk from kernel-devel # prune junk from kernel-devel
find $RPM_BUILD_ROOT/usr/src/kernels -name ".*.cmd" -exec rm -f {} \; find $RPM_BUILD_ROOT/usr/src/kernels -name ".*.cmd" -exec rm -f {} \;
%if %{with_backports}
cd ../compat-wireless-%{cwversion}/
make clean
make KLIB_BUILD=../linux-%{kversion}.%{_target_cpu} \
KMODPATH_ARG="INSTALL_MOD_PATH=$RPM_BUILD_ROOT" \
KMODDIR="backports" install-modules
# mark modules executable so that strip-to-file can strip them
find $RPM_BUILD_ROOT/lib/modules/$KernelVer/backports -name "*.ko" \
-type f | xargs --no-run-if-empty chmod u+x
cd -
%endif
} }
### ###
@ -2029,6 +2065,9 @@ fi
/lib/modules/%{KVERREL}%{?2:.%{2}}/source\ /lib/modules/%{KVERREL}%{?2:.%{2}}/source\
/lib/modules/%{KVERREL}%{?2:.%{2}}/extra\ /lib/modules/%{KVERREL}%{?2:.%{2}}/extra\
/lib/modules/%{KVERREL}%{?2:.%{2}}/updates\ /lib/modules/%{KVERREL}%{?2:.%{2}}/updates\
%if %{with_backports}\
/lib/modules/%{KVERREL}%{?2:.%{2}}/backports\
%endif\
%ifarch %{vdso_arches}\ %ifarch %{vdso_arches}\
/lib/modules/%{KVERREL}%{?2:.%{2}}/vdso\ /lib/modules/%{KVERREL}%{?2:.%{2}}/vdso\
/etc/ld.so.conf.d/kernel-%{KVERREL}%{?2:.%{2}}.conf\ /etc/ld.so.conf.d/kernel-%{KVERREL}%{?2:.%{2}}.conf\
@ -2069,6 +2108,9 @@ fi
# ||----w | # ||----w |
# || || # || ||
%changelog %changelog
* Wed Nov 16 2011 John W. Linville <linville@redhat.com>
- Add compat-wireless as an option for kernel build
* Wed Nov 16 2011 Kyle McMartin <kmcmartin@redhat.com> * Wed Nov 16 2011 Kyle McMartin <kmcmartin@redhat.com>
- Work around #663080 and restore building 'perf' on s390x (we don't need - Work around #663080 and restore building 'perf' on s390x (we don't need
kernel-tools since cpuspeed isn't needed on s390...) kernel-tools since cpuspeed isn't needed on s390...)

View File

@ -1,3 +1,4 @@
8d43453f8159b2332ad410b19d86a931 linux-3.1.tar.bz2 8d43453f8159b2332ad410b19d86a931 linux-3.1.tar.bz2
210b6056f364be58cb95e11a529e158d patch-3.2-rc2.bz2 210b6056f364be58cb95e11a529e158d patch-3.2-rc2.bz2
0845c3547ebae1c938246969bdb830f8 patch-3.2-rc2-git1.bz2 0845c3547ebae1c938246969bdb830f8 patch-3.2-rc2-git1.bz2
77da243ea639c14679d67788b2b72f41 compat-wireless-2011-11-15.tar.bz2