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 | |
parent | 8bcddfb0331de682e3f88070411fb76dd3462785 (diff) | |
download | kernel-10731a4cc7bff41fe6d30293fc5b08f8cad38fd8.tar.gz kernel-10731a4cc7bff41fe6d30293fc5b08f8cad38fd8.tar.xz kernel-10731a4cc7bff41fe6d30293fc5b08f8cad38fd8.zip |
Add compat-wireless as an option for kernel build
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | kernel.spec | 42 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 44 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index 98392fa4d..f6332b27c 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ clog *.rpm *.orig kernel-[23].*/ +/compat-wireless-2011-11-15.tar.bz2 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...) @@ -1,3 +1,4 @@ 8d43453f8159b2332ad410b19d86a931 linux-3.1.tar.bz2 210b6056f364be58cb95e11a529e158d patch-3.2-rc2.bz2 0845c3547ebae1c938246969bdb830f8 patch-3.2-rc2-git1.bz2 +77da243ea639c14679d67788b2b72f41 compat-wireless-2011-11-15.tar.bz2 |