]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel.spec
RT variant added
[packages/kernel.git] / kernel.spec
index 23c38d773bd39e36a296f449532f7fdcbe7e07de..a2b628ec0890b95f18f6fea4bae620b24918519c 100644 (file)
@@ -31,6 +31,8 @@
 
 %bcond_with    vserver         # support for VServer
 
+%bcond_with    rt              # real-time kernel (CONFIG_PREEMPT_RT) for low latencies
+
 %bcond_with    vanilla         # don't include any patches
 %bcond_with    rescuecd        # build kernel for our rescue
 %bcond_with    myown           # build with your own config (kernel-myown.config)
@@ -96,6 +98,9 @@
 %if %{without pae}
 %define                alt_kernel      nopae
 %endif
+%if %{with rt}
+%define                alt_kernel      rt
+%endif
 
 # kernel release (used in filesystem and eventually in uname -r)
 # modules will be looked from /lib/modules/%{kernel_release}
@@ -140,6 +145,7 @@ Source25:   kernel-ia64.config
 
 Source41:      kernel-patches.config
 Source43:      kernel-vserver.config
+Source44:      kernel-rt.config
 
 Source55:      kernel-imq.config
 
@@ -205,6 +211,10 @@ Patch146:  kernel-aufs4+vserver.patch
 # Show normal colors in menuconfig with ncurses ABI 6
 Patch250:      kernel-fix_256colors_menuconfig.patch
 
+# https://rt.wiki.kernel.org/
+# https://www.kernel.org/pub/linux/kernel/projects/rt/4.8/patch-4.8.6-rt5.patch.xz
+Patch500:      kernel-rt.patch
+
 Patch2000:     kernel-small_fixes.patch
 Patch2001:     kernel-pwc-uncompress.patch
 Patch2003:     kernel-regressions.patch
@@ -382,6 +392,7 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %{?with_fbcondecor:Fbsplash/fbcondecor - enabled }\
 %{?with_nfsroot:Root on NFS - enabled}\
 %{?with_vserver:Linux-VServer - %{vserver_patch}}\
+%{?with_rt:CONFIG_PREEMPT_RT - enabled}\
 
 %define Features %(echo "%{__features}" | sed '/^$/d')
 
@@ -649,7 +660,10 @@ cd linux-%{basever}
 #
 
 # kernel-pom-ng-IPV4OPTSSTRIP.patch
+%if %{without rt}
+# fails on -Werror=incompatible-pointer-types
 %patch10 -p1
+%endif
 
 # kernel-owner-xid.patch
 %if %{with vserver}
@@ -666,8 +680,11 @@ cd linux-%{basever}
 %patch50 -p1
 %endif
 
+%if %{without rt}
+# fails on -Werror=incompatible-pointer-types
 %patch55 -p1
 %patch56 -p1
+%endif
 
 # kernel-rndis_host-wm5.patch
 %patch59 -p1
@@ -691,6 +708,11 @@ cd linux-%{basever}
 %patch7000 -p1
 %endif
 
+%if %{with rt}
+%patch500 -p1
+rm -f localversion-rt
+%endif
+
 # apparmor
 %patch5000 -p1
 
@@ -729,7 +751,6 @@ EOF
 
 RescueConfig() {
        set -x
-       cat <<-EOCONFIG > $1
                # CONFIG_SOUND is not set
                # CONFIG_AUDIT is not set
                # CONFIG_TR is not set
@@ -894,6 +915,9 @@ EOCONFIG
 %endif
 %if %{with vserver}
                %{SOURCE43} \
+%endif
+%if %{with rt}
+               %{SOURCE44} \
 %endif
                %{SOURCE41} %{?0:patches} \
 %endif
This page took 0.233926 seconds and 4 git commands to generate.