#
# 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}
%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}
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}
%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 ":CONFIG_X86_PAE=y:d" $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
}
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} \
/lib/modules/%{kernel_release}/kernel/kernel
/lib/modules/%{kernel_release}/kernel/lib
-%ifarch %{x8664}
+%ifarch x86_64
/lib/modules/%{kernel_release}/kernel/mm
%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]*
%exclude /lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
%exclude /lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
%exclude /lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
-%endif
/lib/modules/%{kernel_release}/kernel/security
/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*
/lib/modules/%{kernel_release}/kernel/drivers/net/wireless/libertas/*_cs.ko*
/lib/modules/%{kernel_release}/kernel/drivers/parport/parport_cs.ko*
/lib/modules/%{kernel_release}/kernel/drivers/usb/host/sl811_cs.ko*
-%endif
%if %{have_sound}
%files sound-alsa