1 Summary: The Linux kernel (the core of the Linux operating system)
3 # What parts do we want to build? We must build at least one kernel.
4 # These are the kernels that are built IF the architecture allows it.
10 # Versions of various parts
13 # Polite request for people who spin their own kernel rpms:
14 # please modify the "release" field in a way that identifies
15 # that the kernel isn't the stock distribution kernel, for example by
16 # adding some text to the end of the version number.
19 %define kversion 2.6.%{sublevel}
20 %define rpmversion 2.6.%{sublevel}
21 %define release %(R="$Revision: 1.2142 $"; RR="${R##: }"; echo ${RR%%?})_FC4
23 %define make_target bzImage
24 %define kernel_image x86
26 %define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE}
28 # groups of related archs
29 %define all_x86 i586 i686
31 # Override generic defaults with per-arch defaults
36 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-*.config
39 # Second, per-architecture exclusions (ifarch)
42 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-i?86*.config
43 %define image_install_path boot
52 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-x86_64*.config
53 %define image_install_path boot
59 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-ppc64*.config
60 %define image_install_path boot
62 %define make_target vmlinux
63 %define kernel_image vmlinux
67 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-ppc64*.config
68 %define image_install_path boot
70 %define make_target vmlinux
71 %define kernel_image vmlinux
75 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-s390*.config
76 %define image_install_path boot
77 %define make_target image
78 %define kernel_image arch/s390/boot/image
82 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-s390x.config
83 %define image_install_path boot
84 %define make_target image
85 %define kernel_image arch/s390/boot/image
89 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-sparc.config
90 %define make_target image
91 %define kernel_image image
96 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-sparc64*.config
97 %define make_target image
98 %define kernel_image image
102 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-ppc*.config
103 %define image_install_path boot
104 %define make_target vmlinux
105 %define kernel_image vmlinux
110 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-ia64.config
111 %define image_install_path boot/efi/EFI/redhat
112 %define signmodules 1
113 %define make_target compressed
114 %define kernel_image vmlinux.gz
118 # Three sets of minimum package version requirements in the form of Conflicts:
119 # to versions below the minimum
123 # First the general kernel 2.6 required versions as per
124 # Documentation/Changes
126 %define kernel_dot_org_conflicts ppp <= 2.3.15, pcmcia-cs <= 3.1.20, isdn4k-utils <= 3.0, mount < 2.10r-5, nfs-utils < 1.0.3, e2fsprogs < 1.29, util-linux < 2.10, jfsutils < 1.0.14, reiserfsprogs < 3.6.3, xfsprogs < 2.1.0, procps < 2.0.9, oprofile < 0.5.3
129 # Then a series of requirements that are distribution specific, either
130 # because we add patches for something, or the older versions have
131 # problems with the newer kernel or lack certain things that make
132 # integration in the distro harder than needed.
134 %define package_conflicts cipe < 1.4.5, kudzu <= 0.92, initscripts < 7.23, dev < 3.2-7, iptables < 1.2.5-3, bcm5820 < 1.81, nvidia-rh72 <= 1.0 selinux-policy-targeted < 1.23.16-1
137 # Several packages had bugs in them that became obvious when the NPTL
138 # threading code got integrated.
140 %define nptl_conflicts SysVinit < 2.84-13, pam < 0.75-48, vixie-cron < 3.0.1-73, privoxy < 3.0.0-8, spamassassin < 2.44-4.8.x, cups < 1.1.17-13
143 # Packages that need to be installed before the kernel is, because the %post
146 %define kernel_prereq fileutils, module-init-tools, initscripts >= 5.83, mkinitrd >= 4.2.15-1
149 Group: System Environment/Kernel
151 Version: %{rpmversion}
153 ExclusiveArch: noarch %{all_x86} x86_64 ppc ppc64
155 Provides: kernel = %{version}
156 Provides: kernel-drm = 4.3.0
157 Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}
158 Prereq: %{kernel_prereq}
159 Conflicts: %{kernel_dot_org_conflicts}
160 Conflicts: %{package_conflicts}
161 Conflicts: %{nptl_conflicts}
162 # We can't let RPM do the dependencies automatic because it'll then pick up
163 # a correct but undesirable perl dependency from the module headers which
164 # isn't required for the kernel proper to function
168 # List the packages used during the kernel build
170 BuildPreReq: module-init-tools, patch >= 2.5.4, bash >= 2.03, sh-utils, tar
171 BuildPreReq: bzip2, findutils, gzip, m4, perl, make >= 3.78, gnupg, diffutils
172 BuildRequires: gcc >= 3.4.2, binutils >= 2.12, redhat-rpm-config
173 BuildConflicts: rhbuildsys(DiskFree) < 500Mb
176 Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-%{kversion}.tar.bz2
178 Source10: COPYING.modules
181 Source20: kernel-%{kversion}-i586.config
182 Source22: kernel-%{kversion}-i686.config
183 Source23: kernel-%{kversion}-i686-smp.config
185 Source25: kernel-%{kversion}-x86_64.config
186 Source26: kernel-%{kversion}-x86_64-smp.config
188 Source27: kernel-%{kversion}-ppc.config
189 Source28: kernel-%{kversion}-ppc-smp.config
190 Source29: kernel-%{kversion}-ppc64.config
191 Source30: kernel-%{kversion}-ppc64iseries.config
193 Source32: kernel-%{kversion}-s390.config
194 Source33: kernel-%{kversion}-s390x.config
196 Source34: kernel-%{kversion}-ia64.config
198 #Source66: kernel-%{kversion}-sparc.config
199 #Source67: kernel-%{kversion}-sparc64.config
200 #Source68: kernel-%{kversion}-sparc64-smp.config
203 # Patches 0 through 100 are meant for core subsystem upgrades
205 Patch1: patch-2.6.17.4.bz2
207 # Patches 100 through 500 are meant for architecture patches
211 Patch200: linux-2.6-x86-tune-generic.patch
212 Patch201: linux-2.6-x86-vga-vidfail.patch
213 Patch202: linux-2.6-intel-cache-build.patch
214 Patch203: linux-2.6-x86_64-silence-up-apic-errors.patch
215 Patch204: linux-2.6-edid-check.patch
216 Patch205: linux-2.6-x86_64-smp-on-uphw-cpucount.patch
217 Patch206: linux-2.6-x86-hp-reboot.patch
218 Patch207: linux-2.6-x86-cpu_index-false.patch
219 Patch208: linux-2.6-x86_64-noisy-syscalls.patch
220 Patch210: linux-2.6-x86-alternatives-smp-only.patch
223 Patch302: linux-2.6-offb-find-fb.patch
224 Patch305: linux-2.6-cell-mambo-drivers.patch
225 Patch306: linux-2.6-hvc-console.patch
226 Patch314: linux-2.6-ppc-rtas-check.patch
227 Patch317: linux-2.6-ppc-iseries-input-layer.patch
231 # 600 - 699 sparc(64)
234 # Patches 800 through 899 are reserved for bugfixes to the core system
235 # and patches related to how RPMs are build
237 Patch800: linux-2.6-build-nonintconfig.patch
238 Patch801: linux-2.6-build-userspace-headers-warning.patch
241 Patch810: linux-2.6-execshield.patch
242 Patch813: linux-2.6-warn-c-p-a.patch
244 # Module signing infrastructure.
245 Patch900: linux-2.6-modsign-core.patch
246 Patch901: linux-2.6-modsign-crypto.patch
247 Patch902: linux-2.6-modsign-ksign.patch
248 Patch903: linux-2.6-modsign-mpilib.patch
249 Patch904: linux-2.6-modsign-script.patch
250 Patch905: linux-2.6-modsign-include.patch
252 # Tux http accelerator.
253 Patch910: linux-2.6-tux.patch
256 # Patches 1000 to 5000 are reserved for bugfixes to drivers and filesystems
259 Patch1011: linux-2.6-debug-slab-backtrace.patch
260 Patch1012: linux-2.6-debug-list_head.patch
261 Patch1013: linux-2.6-debug-taint-vm.patch
262 Patch1015: linux-2.6-debug-singlebiterror.patch
263 Patch1016: linux-2.6-debug-spinlock-taint.patch
264 Patch1017: linux-2.6-debug-spinlock-panic.patch
265 Patch1018: linux-2.6-debug-Wundef.patch
266 Patch1019: linux-2.6-debug-disable-builtins.patch
267 Patch1020: linux-2.6-debug-sleep-in-irq-warning.patch
268 Patch1025: linux-2.6-debug-sysfs-crash-debugging.patch
269 Patch1027: linux-2.6-debug-slab-leak-detector.patch
270 Patch1028: linux-2.6-debug-oops-pause.patch
271 Patch1029: linux-2.6-debug-account-kmalloc.patch
272 Patch1030: linux-2.6-debug-latency-tracing.patch
273 Patch1031: linux-2.6-debug-periodic-slab-check.patch
274 Patch1032: linux-2.6-debug-boot-delay.patch
275 Patch1033: linux-2.6-debug-must_check.patch
277 # Restrict /dev/mem usage.
278 Patch1050: linux-2.6-devmem.patch
280 # Provide read only /dev/crash driver.
281 Patch1060: linux-2.6-crash-driver.patch
283 Patch1070: linux-2.6-sleepon.patch
286 Patch1102: linux-2.6-scsi-advansys-pcitable.patch
287 Patch1103: linux-2.6-iscsi-update-to-2-6-18-upstream.patch
290 Patch1200: linux-2.6-NFSD-non-null-getxattr.patch
291 Patch1201: linux-2.6-NFSD-ctlbits.patch
292 Patch1203: linux-2.6-NFSD-badness.patch
295 Patch1301: linux-2.6-net-sundance-ip100A.patch
296 Patch1304: linux-2.6-net-ipw2200-monitor.patch
299 Patch1400: linux-2.6-squashfs.patch
302 Patch1600: linux-2.6-module_version.patch
303 Patch1610: linux-2.6-input-kill-stupid-messages.patch
304 Patch1620: linux-2.6-serial-tickle-nmi.patch
305 Patch1630: linux-2.6-radeon-backlight.patch
306 Patch1640: linux-2.6-ide-tune-locking.patch
307 Patch1660: linux-2.6-valid-ether-addr.patch
308 Patch1670: linux-2.6-softcursor-persistent-alloc.patch
309 Patch1680: linux-2.6-usb-unusual-devices.patch
310 Patch1690: linux-2.6-autofs-invalidate.patch
311 Patch1700: linux-2.6-w1-hush-debug.patch
312 Patch1710: linux-2.6-sched-up-migration-cost.patch
313 Patch1720: linux-2.6-proc-self-maps-fix.patch
314 Patch1730: linux-2.6-ac97_unregister_controls_ad18xx.patch
315 Patch1740: linux-2.6-softlockup-disable.patch
316 Patch1750: linux-2.6-serial-resume.patch
317 Patch1760: linux-2.6-suspend-slab-warnings.patch
318 Patch1770: linux-2.6-optimise-spinlock-debug.patch
319 Patch1780: linux-2.6-powernow-k7-smp.patch
320 Patch1790: linux-2.6-console-suspend.patch
322 # SELinux/audit patches.
323 Patch1800: linux-2.6-selinux-hush.patch
324 Patch1801: linux-2.6-selinux-mprotect-checks.patch
326 # Warn about usage of various obsolete functionality that may go away.
327 Patch1900: linux-2.6-obsolete-oss-warning.patch
329 # no external module should use these symbols.
330 Patch1910: linux-2.6-unexport-symbols.patch
333 Patch2001: linux-2.6-vm-silence-atomic-alloc-failures.patch
334 Patch2002: linux-2.6-vm-clear-unreclaimable.patch
336 # Tweak some defaults.
337 Patch2100: linux-2.6-defaults-max-symlinks.patch
338 Patch2101: linux-2.6-defaults-fat-utf8.patch
339 Patch2102: linux-2.6-defaults-firmware-loader-timeout.patch
340 Patch2103: linux-2.6-defaults-phys-start.patch
341 Patch2104: linux-2.6-defaults-unicode-vt.patch
342 Patch2105: linux-2.6-defaults-disable-split-ptlock.patch
345 Patch2200: linux-2.6-sata-promise-pata-ports.patch
346 Patch2201: linux-2.6-sata-silence-dumb-msg.patch
347 Patch2202: linux-2.6-sata-ahci-suspend.patch
350 Patch2300: linux-2.6-acpi_os_acquire_object-gfp_kernel-called-with-irqs.patch
351 Patch2301: linux-2.6-acpi-ecdt-uid-hack.patch
352 Patch2302: linux-2.6-cpufreq-acpi-sticky.patch
355 # 10000 to 20000 is for stuff that has to come last due to the
356 # amount of drivers they touch. But only these should go here.
357 # Not patches you're too lazy for to put in the proper place.
360 Patch10000: linux-2.6-compile-fixes.patch
362 # Little obvious 1-2 liners that fix silly bugs.
363 # Do not add anything non-trivial here.
364 Patch10001: linux-2.6-random-patches.patch
367 # END OF PATCH DEFINITIONS
369 BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
372 The kernel package contains the Linux kernel (vmlinuz), the core of any
373 Linux operating system. The kernel handles the basic functions
374 of the operating system: memory allocation, process allocation, device
375 input and output, etc.
378 Summary: Development package for building kernel modules to match the kernel.
379 Group: System Environment/Kernel
381 Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}
382 Prereq: /usr/bin/find
385 This package provides kernel headers and makefiles sufficient to build modules
386 against the kernel package.
390 Summary: Various documentation bits found in the kernel source.
394 This package contains documentation files from the kernel
395 source. Various bits of information about the Linux kernel and the
396 device drivers shipped with it are documented in these files.
398 You'll want to install this package if you need a reference to the
399 options that can be passed to Linux kernel modules at load time.
402 Summary: The Linux kernel compiled for SMP machines.
404 Group: System Environment/Kernel
405 Provides: kernel = %{version}
406 Provides: kernel-drm = 4.3.0
407 Provides: kernel-%{_target_cpu} = %{rpmversion}-%{release}smp
408 Prereq: %{kernel_prereq}
409 Conflicts: %{kernel_dot_org_conflicts}
410 Conflicts: %{package_conflicts}
411 Conflicts: %{nptl_conflicts}
412 # upto and including kernel 2.4.9 rpms, the 4Gb+ kernel was called kernel-enterprise
413 # now that the smp kernel offers this capability, obsolete the old kernel
414 Obsoletes: kernel-enterprise < 2.4.10
415 # We can't let RPM do the dependencies automatic because it'll then pick up
416 # a correct but undesirable perl dependency from the module headers which
417 # isn't required for the kernel proper to function
421 This package includes a SMP version of the Linux kernel. It is
422 required only on machines with two or more CPUs as well as machines with
423 hyperthreading technology.
425 Install the kernel-smp package if your machine uses two or more CPUs.
428 Summary: Development package for building kernel modules to match the SMP kernel.
429 Group: System Environment/Kernel
430 Provides: kernel-smp-devel-%{_target_cpu} = %{rpmversion}-%{release}
431 Provides: kernel-devel-%{_target_cpu} = %{rpmversion}-%{release}smp
432 Provides: kernel-devel = %{rpmversion}-%{release}smp
434 Prereq: /usr/bin/find
436 %description smp-devel
437 This package provides kernel headers and makefiles sufficient to build modules
438 against the SMP kernel package.
442 # First we unpack the kernel tarball.
443 # If this isn't the first make prep, we use links to the existing clean tarball
444 # which speeds things up quite a bit.
445 if [ ! -d kernel-%{kversion}/vanilla ]; then
446 # Ok, first time we do a make prep.
447 rm -f pax_global_header
448 %setup -q -n %{name}-%{version} -c
449 mv linux-%{kversion} vanilla
451 # We already have a vanilla dir.
452 cd kernel-%{kversion}
453 if [ -d linux-%{kversion}.%{_target_cpu} ]; then
454 # Just in case we ctrl-c'd a prep already
456 # Move away the stale away, and delete in background.
457 mv linux-%{kversion}.%{_target_cpu} deleteme
461 cp -rl vanilla linux-%{kversion}.%{_target_cpu}
463 cd linux-%{kversion}.%{_target_cpu}
465 # Update to latest upstream.
469 # Patches 10 through 100 are meant for core subsystem upgrades
473 # Patches to back out
477 # Architecture patches
483 # Compile 686 kernels tuned for Pentium4.
485 # add vidfail capability;
486 # without this patch specifying a framebuffer on the kernel prompt would
487 # make the boot stop if there's no supported framebuffer device; this is bad
488 # for the installer cd that wants to automatically fall back to textmode
491 # exitfunc called from initfunc.
493 # Suppress APIC errors on UP x86-64.
495 # Reboot thru bios on HP laptops.
497 # Workaround BIOSes that don't list CPU0
499 # Reboot through BIOS on HP systems,.
501 # cpu_index >= NR_CPUS becomming always false.
503 # Hush noisy unimplemented 32bit syscalls
505 # Only print info about SMP alternatives on SMP kernels.
511 # Find OF framebuffer more reliably
513 # Support the IBM Mambo simulator; core as well as disk and network drivers.
515 # Make HVC console generic; support simulator console device using it.
517 # Check properly for successful RTAS instantiation
519 # No input layer on iseries
523 # Patches 500 through 1000 are reserved for bugfixes to the core system
524 # and patches related to how RPMs are build
528 # This patch adds a "make nonint_oldconfig" which is non-interactive and
529 # also gives a list of missing options at the end. Useful for automated
530 # builds (as used in the buildsystem).
532 # Warn if someone tries to build userspace using kernel headers
540 # GPG signed kernel modules
553 # Patches 1000 to 5000 are reserved for bugfixes to drivers and filesystems
558 # Various low-impact patches to aid debugging.
569 # Slab leak detector.
580 # Make /dev/mem a need-to-know function
585 # /dev/crash driver for the crashdump analysis tool
590 # Most^WAll users of sleep_on are broken; fix a bunch
597 # Add a pci table to advansys driver.
599 # iSCSI driver update that can be dropped when kernel is rebased
600 # against a kernel that has the SCSI updates for 2.6.18
604 # Various upstream NFS/NFSD fixes.
607 # kNFSD: fixed '-p port' arg to rpc.nfsd and enables the defining proto versions and transports
613 # New PCI ID for sundance driver.
615 # add IPW2200_MONITOR config option
622 # Various SELinux fixes from 2.6.10rc
626 # Add missing MODULE_VERSION tags to some modules.
628 # The input layer spews crap no-one cares about.
630 # Tickle the NMI whilst doing serial writes.
632 # Radeon on thinkpad backlight power-management goodness.
634 # Fix IDE locking bug.
638 # Use persistent allocation in softcursor
640 # Add some USB devices to the unusual quirk list.
642 # autofs4 - need to invalidate children on tree mount expire
644 # Silence debug messages in w1
646 # Only print migration info on SMP
648 # setuid /proc/self/maps fix.
652 # Add a safety net to softlockup so that it doesn't prevent installs.
654 # serial/tty resume fixing.
656 # Fix up kmalloc whilst atomic warning during resume.
658 # Speed up spinlock debug.
660 # Fix up powernow-k7 to work on SMP kernels.
662 # Console fixes for suspend/resume
665 # Silence some selinux messages.
667 # Fix the SELinux mprotect checks on executable mappings
670 # Warn about obsolete functionality usage.
672 # Remove kernel-internal functionality that nothing external should use.
678 # Silence GFP_ATOMIC failures.
680 # VM oom killer tweaks.
683 # Changes to upstream defaults.
684 # Bump up the number of recursive symlinks.
686 # Use UTF-8 by default on VFAT.
688 # Increase timeout on firmware loader.
690 # Change PHYSICAL_START
692 # Use unicode VT's by default.
694 # Disable split pagetable lock
697 # Enable PATA ports on Promise SATA.
699 # Silence silly SATA printk.
705 # Silence more ACPI debug spew from suspend.
709 # Make acpi-cpufreq sticky.
713 # Patches 5000 to 6000 are reserved for new drivers that are about to
723 # misc small stuff to make things compile or otherwise improve performance
727 # Small 1-2 liners fixing silly bugs that get pushed upstream quickly.
730 # END OF PATCH APPLICATIONS
732 cp %{SOURCE10} Documentation/
736 cp -f %{all_arch_configs} .
739 # now run oldconfig over all the config files
743 Arch=`head -1 .config | cut -b 3-`
744 make ARCH=$Arch nonint_oldconfig > /dev/null
745 echo "# $Arch" > configs/$i
746 cat .config >> configs/$i
749 # make sure the kernel has the sublevel we know it has. This looks weird
750 # but for -pre and -rc versions we need it since we only want to use
751 # the higher version when the final kernel is released.
752 perl -p -i -e "s/^SUBLEVEL.*/SUBLEVEL = %{sublevel}/" Makefile
753 perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -prep/" Makefile
755 # get rid of unwanted files resulting from patch fuzz
757 find . \( -name "*.orig" -o -name "*~" \) -exec rm -f {} \; >/dev/null
765 # Create gpg keys for signing the modules
768 gpg --homedir . --batch --gen-key %{SOURCE11}
769 gpg --homedir . --export --keyring ./kernel.pub Red > extract.pub
770 make linux-%{kversion}.%{_target_cpu}/scripts/bin2c
771 linux-%{kversion}.%{_target_cpu}/scripts/bin2c ksign_def_public_key __initdata < extract.pub > linux-%{kversion}.%{_target_cpu}/crypto/signature/key.h
778 # Pick the right config file for the kernel we're building
779 if [ -n "$Flavour" ] ; then
780 Config=kernel-%{kversion}-%{_target_cpu}-$Flavour.config
781 DevelDir=/usr/src/kernels/%{KVERREL}-$Flavour-%{_target_cpu}
782 DevelLink=/usr/src/kernels/%{KVERREL}$Flavour-%{_target_cpu}
784 Config=kernel-%{kversion}-%{_target_cpu}.config
785 DevelDir=/usr/src/kernels/%{KVERREL}-%{_target_cpu}
789 KernelVer=%{version}-%{release}$Flavour
790 echo BUILDING A KERNEL FOR $Flavour %{_target_cpu}...
792 # make sure EXTRAVERSION says what we want it to say
793 perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}$Flavour/" Makefile
795 # and now to start the build process
798 cp configs/$Config .config
800 Arch=`head -1 .config | cut -b 3-`
801 echo USING ARCH=$Arch
803 if [ "$KernelImage" == "x86" ]; then
804 KernelImage=arch/$Arch/boot/bzImage
807 make -s ARCH=$Arch nonint_oldconfig > /dev/null
808 make -s ARCH=$Arch %{?_smp_mflags} $MakeTarget
809 make -s ARCH=$Arch %{?_smp_mflags} modules || exit 1
811 # Start installing the results
813 %if "%{_enable_debug_packages}" == "1"
814 mkdir -p $RPM_BUILD_ROOT/usr/lib/debug/boot
816 mkdir -p $RPM_BUILD_ROOT/%{image_install_path}
817 install -m 644 .config $RPM_BUILD_ROOT/boot/config-$KernelVer
818 install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-$KernelVer
819 cp $KernelImage $RPM_BUILD_ROOT/%{image_install_path}/vmlinuz-$KernelVer
820 if [ -f arch/$Arch/boot/zImage.stub ]; then
821 cp arch/$Arch/boot/zImage.stub $RPM_BUILD_ROOT/%{image_install_path}/zImage.stub-$KernelVer || :
824 mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer
825 make -s ARCH=$Arch INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer
827 # And save the headers/makefiles etc for building modules against
829 # This all looks scary, but the end result is supposed to be:
830 # * all arch relevant include/ files
831 # * all Makefile/Kconfig files
832 # * all script/ files
834 rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
835 rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/source
836 mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
837 (cd $RPM_BUILD_ROOT/lib/modules/$KernelVer ; ln -s build source)
838 # dirs for additional modules per module-init-tools, kbuild/modules.txt
839 mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/extra
840 mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/updates
841 # first copy everything
842 cp --parents `find -type f -name "Makefile*" -o -name "Kconfig*"` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
843 cp Module.symvers $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
844 # then drop all but the needed Makefiles/Kconfig files
845 rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Documentation
846 rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts
847 rm -rf $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
848 cp arch/%{_arch}/kernel/asm-offsets.s $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch}/kernel || :
849 cp .config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
850 cp .kernelrelease $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/
851 cp -a scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
852 if [ -d arch/%{_arch}/scripts ]; then
853 cp -a arch/%{_arch}/scripts $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch} || :
855 if [ -f arch/%{_arch}/*lds ]; then
856 cp -a arch/%{_arch}/*lds $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/%{_arch}/ || :
858 rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*.o
859 rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/scripts/*/*.o
860 mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
862 cp -a acpi config keys linux math-emu media mtd net pcmcia rdma rxrpc scsi sound video asm asm-generic $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
863 cp -a `readlink asm` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
864 if [ "$Arch" = "x86_64" ]; then
865 cp -a asm-i386 $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
867 # While arch/powerpc/include/asm is still a symlink to the old
868 # include/asm-ppc{64,} directory, include that in kernel-devel too.
869 if [ "$Arch" = "powerpc" -a -r ../arch/powerpc/include/asm ]; then
870 cp -a `readlink ../arch/powerpc/include/asm` $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include
871 mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/$Arch/include
872 pushd $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/arch/$Arch/include
873 ln -sf ../../../include/asm-ppc* asm
877 # Make sure the Makefile and version.h have a matching timestamp so that
878 # external modules can be built
879 touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/Makefile $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/linux/version.h
880 touch -r $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/.config $RPM_BUILD_ROOT/lib/modules/$KernelVer/build/include/linux/autoconf.h
884 # save the vmlinux file for kernel debugging into the kernel-debuginfo rpm
886 %if "%{_enable_debug_packages}" == "1"
887 mkdir -p $RPM_BUILD_ROOT/usr/lib/debug/lib/modules/$KernelVer
888 cp vmlinux $RPM_BUILD_ROOT/usr/lib/debug/lib/modules/$KernelVer
891 find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames
893 # gpg sign the modules
895 gcc -o scripts/modsign/mod-extract scripts/modsign/mod-extract.c -Wall
896 KEYFLAGS="--no-default-keyring --homedir .."
897 KEYFLAGS="$KEYFLAGS --secret-keyring ../kernel.sec"
898 KEYFLAGS="$KEYFLAGS --keyring ../kernel.pub"
901 for i in `cat modnames`
903 sh ./scripts/modsign/modsign.sh $i Red
909 # mark modules executable so that strip-to-file can strip them
910 cat modnames | xargs chmod u+x
912 # detect missing or incorrect license tags
913 for i in `cat modnames`
916 /sbin/modinfo -l $i >> modinfo
920 grep -v "^Dual BSD/GPL" |\
921 grep -v "^Dual MPL/GPL" |\
922 grep -v "^GPL and additional rights" |\
923 grep -v "^GPL v2" && exit 1
926 # remove files that will be auto generated by depmod at rpm -i time
927 rm -f $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.*
929 # Move the devel headers out of the root file system
930 mkdir -p $RPM_BUILD_ROOT/usr/src/kernels
931 mv $RPM_BUILD_ROOT/lib/modules/$KernelVer/build $RPM_BUILD_ROOT/$DevelDir
932 ln -sf ../../..$DevelDir $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
933 [ -z "$DevelLink" ] || ln -sf `basename $DevelDir` $RPM_BUILD_ROOT/$DevelLink
940 # prepare directories
941 rm -rf $RPM_BUILD_ROOT
942 mkdir -p $RPM_BUILD_ROOT/boot
944 cd linux-%{kversion}.%{_target_cpu}
947 BuildKernel %make_target %kernel_image
951 BuildKernel %make_target %kernel_image smp
960 cd linux-%{kversion}.%{_target_cpu}
963 mkdir -p $RPM_BUILD_ROOT/usr/share/doc/kernel-doc-%{kversion}/Documentation
965 # sometimes non-world-readable files sneak into the kernel source tree
967 # copy the source over
968 tar cf - Documentation | tar xf - -C $RPM_BUILD_ROOT/usr/share/doc/kernel-doc-%{kversion}
976 rm -rf $RPM_BUILD_ROOT
982 # load the loop module for upgrades...in case the old modules get removed we have
983 # loopback in the kernel so that mkinitrd will work.
985 /sbin/modprobe loop 2> /dev/null > /dev/null || :
989 /sbin/modprobe loop 2> /dev/null > /dev/null || :
993 if [ `uname -i` == "x86_64" ]; then
994 if [ -f /etc/sysconfig/kernel ]; then
995 /bin/sed -i -e 's/^DEFAULTKERNEL=kernel-smp$/DEFAULTKERNEL=kernel/' /etc/sysconfig/kernel
998 [ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}
999 /sbin/new-kernel-pkg --package kernel --mkinitrd --depmod --install %{KVERREL}
1002 [ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
1003 if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ] ; then
1004 pushd /usr/src/kernels/%{KVERREL}-%{_target_cpu} > /dev/null
1005 /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
1010 [ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}smp
1011 /sbin/new-kernel-pkg --package kernel-smp --mkinitrd --depmod --install %{KVERREL}smp
1014 [ -f /etc/sysconfig/kernel ] && . /etc/sysconfig/kernel
1015 if [ "$HARDLINK" != "no" -a -x /usr/sbin/hardlink ] ; then
1016 pushd /usr/src/kernels/%{KVERREL}-smp-%{_target_cpu} > /dev/null
1017 /usr/bin/find . -type f | while read f; do hardlink -c /usr/src/kernels/*FC*/$f $f ; done
1022 /sbin/modprobe loop 2> /dev/null > /dev/null || :
1023 /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}
1026 /sbin/modprobe loop 2> /dev/null > /dev/null || :
1027 /sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}smp
1036 %defattr(-,root,root)
1037 /%{image_install_path}/vmlinuz-%{KVERREL}
1038 /boot/System.map-%{KVERREL}
1039 /boot/config-%{KVERREL}
1040 %dir /lib/modules/%{KVERREL}
1041 /lib/modules/%{KVERREL}/kernel
1042 /lib/modules/%{KVERREL}/build
1043 /lib/modules/%{KVERREL}/source
1044 /lib/modules/%{KVERREL}/extra
1045 /lib/modules/%{KVERREL}/updates
1048 %defattr(-,root,root)
1049 %verify(not mtime) /usr/src/kernels/%{KVERREL}-%{_target_cpu}
1054 %defattr(-,root,root)
1055 /%{image_install_path}/vmlinuz-%{KVERREL}smp
1056 /boot/System.map-%{KVERREL}smp
1057 /boot/config-%{KVERREL}smp
1058 %dir /lib/modules/%{KVERREL}smp
1059 /lib/modules/%{KVERREL}smp/kernel
1060 /lib/modules/%{KVERREL}smp/build
1061 /lib/modules/%{KVERREL}smp/source
1062 /lib/modules/%{KVERREL}smp/extra
1063 /lib/modules/%{KVERREL}smp/updates
1066 %defattr(-,root,root)
1067 %verify(not mtime) /usr/src/kernels/%{KVERREL}-smp-%{_target_cpu}
1068 /usr/src/kernels/%{KVERREL}smp-%{_target_cpu}
1071 # only some architecture builds need kernel-doc
1075 %defattr(-,root,root)
1076 %{_datadir}/doc/kernel-doc-%{kversion}/Documentation/*
1077 %dir %{_datadir}/doc/kernel-doc-%{kversion}/Documentation
1078 %dir %{_datadir}/doc/kernel-doc-%{kversion}
1082 * Tue Jul 11 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2142_FC4]
1084 - Disable split pagetable lock.
1086 * Wed Jul 5 2006 Dave Jones <davej@redhat.com>
1087 - Get rid of stack backtrace on panic, which in most
1088 cases actually caused a loss of info instead of a gain.
1090 * Fri Jun 30 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2141_FC4]
1093 * Fri Jun 30 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2140_FC4]
1095 - Fix up the alsa list_add bug.
1097 * Mon Jun 26 2006 Dave Jones <davej@redhat.com>
1098 - Fix up various stupidities incurred by the last big rebase.
1099 - Reenable SMP x86-64 builds.
1101 - Enable PCI fake hotplug driver.
1102 - Enable gameport/joystick on i586 builds. (#196581)
1104 * Sat Jun 24 2006 Dave Jones <davej@redhat.com>
1105 - Enable profiling for 586 kernels.
1107 * Fri Jun 23 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2139_FC4]
1108 - Rebuild with slab debug off.
1110 * Tue Jun 20 2006 Dave Jones <davej@redhat.com> [2.6.17-1.2138_FC4]
1113 * Mon Jun 5 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2115_FC4]
1116 * Tue May 30 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2114_FC4]
1119 * Mon May 29 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2113_FC4]
1120 - Improved list_head debugging.
1122 * Tue May 23 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2112_FC4]
1125 * Sat May 20 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2111_FC4]
1128 * Wed May 10 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2110_FC4]
1131 * Tue May 9 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2109_FC4]
1133 - make 16C950 UARTs work (again). (#126403)
1134 - Fix exec-shield default, which should fix a few programs that
1137 * Thu May 4 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2108_FC4]
1140 * Tue May 2 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2107_FC4]
1143 * Mon May 1 2006 Dave Jones <davej@redhat.com>
1146 * Tue Apr 25 2006 Dave Jones <davej@redhat.com>
1147 - Fix up SCSI errors with mymusix usb mp3 player (#186187)
1149 * Mon Apr 24 2006 Dave Jones <davej@redhat.com>
1152 * Wed Apr 19 2006 Dave Jones <davej@redhat.com>
1153 - Enable PCI MSI support.
1155 * Tue Apr 18 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2096_FC4]
1158 * Tue Apr 18 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2093_FC4]
1161 * Mon Apr 17 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2092_FC4]
1164 * Sun Apr 16 2006 Dave Jones <davej@redhat.com>
1167 * Fri Apr 7 2006 Dave Jones <davej@redhat.com>
1170 * Tue Apr 4 2006 Dave Jones <davej@redhat.com>
1171 - Reenable non-standard serial ports. (#187466)
1172 - Reenable snd-es18xx for x86-32 (#187733)
1174 * Thu Mar 30 2006 Dave Jones <davej@redhat.com>
1175 - ship the .kernelrelease file in -devel too.
1176 - Disable EDAC debug.
1178 * Tue Mar 26 2006 Dave Jones <davej@redhat.com> [2.6.16-1.2069_FC4]
1181 * Mon Mar 25 2006 Dave Jones <davej@redhat.com>
1182 - Include patches posted for review for inclusion in 2.6.16.1
1183 - Updated new audit msg types.
1184 - Reenable HDLC driver (#186257)
1185 - Make acpi-cpufreq 'sticky'
1186 - Fix broken x86-64 32bit vDSO (#186924)
1188 * Tue Mar 21 2006 Dave Jones <davej@redhat.com>
1189 - Improve spinlock scalability on big machines.
1191 * Mon Mar 20 2006 Dave Jones <davej@redhat.com>
1192 - Sync with FC5's 2.6.16 kernel.
1193 - Update Tux & Exec-shield to latest.