diff options
author | John W. Linville <linville@tuxdriver.com> | 2011-11-16 15:28:37 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-16 15:52:10 -0500 |
commit | 10731a4cc7bff41fe6d30293fc5b08f8cad38fd8 (patch) | |
tree | 3af6976aa9c28271470d6ac0b7acf4c894a00c25 /kernel.spec | |
parent | 8bcddfb0331de682e3f88070411fb76dd3462785 (diff) | |
download | kernel-10731a4cc7bff41fe6d30293fc5b08f8cad38fd8.tar.gz kernel-10731a4cc7bff41fe6d30293fc5b08f8cad38fd8.tar.xz kernel-10731a4cc7bff41fe6d30293fc5b08f8cad38fd8.zip |
Add compat-wireless as an option for kernel build
Diffstat (limited to 'kernel.spec')
-rw-r--r-- | kernel.spec | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/kernel.spec b/kernel.spec index 6474a3dd1..7466d7f56 100644 --- a/kernel.spec +++ b/kernel.spec @@ -146,6 +146,9 @@ Summary: The Linux kernel # build a release kernel on rawhide %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) # and 0 for rawhide (all kernels are debug kernels). # See also 'make debug' and 'make release'. @@ -198,6 +201,11 @@ Summary: The Linux kernel # The kernel tarball/base version %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 KVERREL %{version}-%{release}.%{_target_cpu} @@ -535,6 +543,7 @@ BuildRequires: rpm-build >= 4.4.2.1-4 %endif Source0: ftp://ftp.kernel.org/pub/linux/kernel/v3.0/linux-%{kversion}.tar.bz2 +Source1: compat-wireless-%{cwversion}.tar.bz2 Source11: genkey Source14: find-provides @@ -1416,6 +1425,13 @@ find . -name .gitignore -exec rm -f {} \; >/dev/null cd .. +%if %{with_backports} + +# Extract the compat-wireless bits +%setup -q -n kernel-%{kversion}%{?dist} -T -D -a 1 + +%endif + ### ### build ### @@ -1538,6 +1554,9 @@ BuildKernel() { # 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/updates +%if %{with_backports} + mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/backports +%endif # first copy everything 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 @@ -1641,6 +1660,23 @@ BuildKernel() { # prune junk from kernel-devel 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}}/extra\ /lib/modules/%{KVERREL}%{?2:.%{2}}/updates\ +%if %{with_backports}\ +/lib/modules/%{KVERREL}%{?2:.%{2}}/backports\ +%endif\ %ifarch %{vdso_arches}\ /lib/modules/%{KVERREL}%{?2:.%{2}}/vdso\ /etc/ld.so.conf.d/kernel-%{KVERREL}%{?2:.%{2}}.conf\ @@ -2069,6 +2108,9 @@ fi # ||----w | # || || %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> - Work around #663080 and restore building 'perf' on s390x (we don't need kernel-tools since cpuspeed isn't needed on s390...) |