From 9e1bd8adfa31f0059d9ef38b58d30375016822e8 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Sun, 5 Feb 2012 14:25:24 +0000 Subject: [PATCH] - dropped pae bcond - enabled by default for i686 - dropped pcmcia bcond - support only TLD architectures --- kernel-vanilla.spec | 66 +++++++++------------------------------------ 1 file changed, 12 insertions(+), 54 deletions(-) diff --git a/kernel-vanilla.spec b/kernel-vanilla.spec index 9875ffd..aff497d 100644 --- a/kernel-vanilla.spec +++ b/kernel-vanilla.spec @@ -1,8 +1,6 @@ # Conditional build: %bcond_without source # don't build kernel-vanilla-source package -%bcond_without pcmcia # don't build pcmcia %bcond_with verbose # verbose build (V=1) -%bcond_with pae # build PAE (HIGHMEM64G) support on uniprocessor %{?debug:%define with_verbose 1} @@ -17,7 +15,7 @@ %define _enable_debug_packages 0 -%define alt_kernel vanilla%{?with_pae:-pae} +%define alt_kernel vanilla # kernel release (used in filesystem and eventually in uname -r) # modules will be looked from /lib/modules/%{kernel_release} @@ -91,23 +89,17 @@ Conflicts: reiserfsprogs < 3.6.3 Conflicts: udev < 1:071 Conflicts: util-linux < 2.10o Conflicts: xfsprogs < 2.6.0 -%if %{with pae} -ExclusiveArch: %{ix86} -ExcludeArch: i386 i486 i586 -%else -ExclusiveArch: %{ix86} %{x8664} -%endif +ExclusiveArch: i586 i686 x86_64 ExclusiveOS: Linux BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%ifarch %{ix86} %{x8664} +%ifarch i586 i686 x86_64 %define target_arch_dir x86 -%endif -%ifnarch %{ix86} %{x8664} +%else %define target_arch_dir %{_target_base_arch} %endif -%ifarch %{ix86} +%ifarch i586 i686 %define kernel_config x86 %else %define kernel_config %{_target_base_arch} @@ -365,49 +357,21 @@ Pakiet zawiera dokumentację do jądra Linuksa pochodzącą z katalogu # Fix EXTRAVERSION in main Makefile sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{_postver}-%{alt_kernel}#g' Makefile -# on sparc this line causes CONFIG_INPUT=m (instead of =y), thus breaking build -sed -i -e '/select INPUT/d' net/bluetooth/hidp/Kconfig - # cleanup backups after patching find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f %build TuneUpConfigForIX86 () { set -x -%ifarch %{ix86} - pae= - [ "$2" = "yes" ] && pae=yes - %if %{with pae} - pae=yes - %endif - %ifnarch i386 - sed -i 's:CONFIG_M386=y:# CONFIG_M386 is not set:' $1 - %endif - %ifarch i486 - sed -i 's:# CONFIG_M486 is not set:CONFIG_M486=y:' $1 - %endif +%ifarch i586 i686 %ifarch i586 - sed -i 's:# CONFIG_M586 is not set:CONFIG_M586=y:' $1 - %endif - %ifarch i686 + sed -i "s:# CONFIG_HIGHMEM4G is not set:CONFIG_HIGHMEM4G=y:" $1 + sed -i "s:CONFIG_HIGHMEM64G=y:# CONFIG_HIGHMEM64G is not set:" $1 + sed -i "d:CONFIG_X86_PAE=y:" $1 + %else + sed -i 's:CONFIG_M586=y# CONFIG_M586 is not set::' $1 sed -i 's:# CONFIG_M686 is not set:CONFIG_M686=y:' $1 %endif - %ifarch pentium3 - sed -i 's:# CONFIG_MPENTIUMIII is not set:CONFIG_MPENTIUMIII=y:' $1 - %endif - %ifarch pentium4 - sed -i 's:# CONFIG_MPENTIUM4 is not set:CONFIG_MPENTIUM4=y:' $1 - %endif - %ifarch athlon - sed -i 's:# CONFIG_MK7 is not set:CONFIG_MK7=y:' $1 - %endif - %ifarch i686 athlon pentium3 pentium4 - if [ "$pae" = "yes" ]; then - sed -i "s:CONFIG_HIGHMEM4G=y:# CONFIG_HIGHMEM4G is not set:" $1 - sed -i "s:# CONFIG_HIGHMEM64G is not set:CONFIG_HIGHMEM64G=y\nCONFIG_X86_PAE=y:" $1 - fi - sed -i 's:CONFIG_MATH_EMULATION=y:# CONFIG_MATH_EMULATION is not set:' $1 - %endif return 0 %endif } @@ -452,10 +416,8 @@ PreInstallKernel() { mkdir -p $KERNEL_INSTALL_DIR/boot install System.map $KERNEL_INSTALL_DIR/boot/System.map-$KernelVer -%ifarch %{ix86} %{x8664} install arch/x86/boot/bzImage $KERNEL_INSTALL_DIR/boot/vmlinuz-$KernelVer install vmlinux $KERNEL_INSTALL_DIR/boot/vmlinux-$KernelVer -%endif %{__make} %CrossOpts modules_install firmware_install \ %{?with_verbose:V=1} \ @@ -665,7 +627,7 @@ fi /lib/modules/%{kernel_release}/kernel/kernel /lib/modules/%{kernel_release}/kernel/lib -%ifarch %{x8664} +%ifarch x86_64 /lib/modules/%{kernel_release}/kernel/mm %endif /lib/modules/%{kernel_release}/kernel/net @@ -678,7 +640,6 @@ fi %exclude /lib/modules/%{kernel_release}/kernel/drivers/media/video/saa7134/saa7134-alsa.ko* %endif %dir /lib/modules/%{kernel_release}/misc -%if %{with pcmcia} %dir /lib/modules/%{kernel_release}/kernel/drivers/pcmcia /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko* %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/[!p]* @@ -697,7 +658,6 @@ fi %exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko* %exclude /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko* %exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko* -%endif %ghost /lib/modules/%{kernel_release}/modules.* # symlinks pointing to kernelsrcdir %ghost /lib/modules/%{kernel_release}/build @@ -714,7 +674,6 @@ fi /lib/modules/%{kernel_release}/kernel/drivers/gpu/drm %endif -%if %{with pcmcia} %files pcmcia %defattr(644,root,root,755) %exclude /lib/modules/%{kernel_release}/kernel/drivers/pcmcia/pcmcia*ko* @@ -732,7 +691,6 @@ fi /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko* /lib/modules/%{kernel_release}/kernel/drivers/serial/serial_cs.ko* /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko* -%endif %if %{have_sound} %files sound-alsa -- 2.46.0