Summary: The Linux kernel (the core of the Linux operating system). Name: kernel %define extralevel pre3 %define sublevel 15 %define kversion 2.2.%{sublevel} %define pcmciaver 3.1.9 Version: %{kversion} Release: pre3a %define KVERREL %{PACKAGE_VERSION}-%{PACKAGE_RELEASE} Copyright: GPL Group: System Environment/Kernel ExclusiveArch: ppc ExclusiveOS: Linux Obsoletes: kernel-modules, kernel-pmac, kernel-chrp, kernel-prep Source0: ftp://ftp.kernel.org/pub/linux/kernel/v2.2/linux-%{kversion}.pre3.tar.bz2 Source1: ftp://hyper.stanford.edu/pub/pcmcia/pcmcia-cs-%{pcmciaver}.tar.gz Source2: README.kernel-sources Source10: pcmcia-cs-2.8.8-network.script Source11: module-info Source12: installkernel Source13: rhkmvtag.c Source14: kernel-2.2-BuildASM.sh Source15: linux-autoconf.h Source16: linux-version.h Source17: linux-modversions.h Source36: kernel-%{kversion}-ppc-bwg3v2.config Patch6: linux-2.2.12-ppcspinlock.patch Patch7: linux-2.2.12-pcnet32.patch Patch10: linux-2.2.12-serial.patch Patch12: raw-2.2.14-rh61.diff Patch14: init_main.c.patch Patch20: i386-2.2.3-compression.patch Patch28: linux-2.2.12-peerbus.patch Patch50: linux-2.2.12-limits.patch BuildRoot: /var/tmp/kernel-%{KVERREL}-root Provides: module-info Autoreqprov: no Requires: initscripts >= 3.64 %packager %vendor %distribution %package source Requires: kernel-headers = %{kversion} Summary: The source code for the Linux kernel. Group: Development/System %package headers Summary: Header files for the Linux kernel. Group: Development/System %package doc Summary: Various documentation bits found in the kernel source. Group: Documentation %package pcmcia-cs Summary: The daemon and device drivers for using PCMCIA adapters. Group: System Environment/Kernel Obsoletes: pcmcia-cs %package utils Summary: Kernel related utilities. Group: System Environment/Kernel %description The kernel package contains the Linux kernel, the core of your Yellow Dog Linux operating system. The kernel handles the basic functions of the operating system: memory allocation, process allocation, device input and output, etc. %description source The kernel-source package contains the source code files for the Linux kernel. These source files are needed to build most C programs, since they depend on the constants defined in the source code. The source files can also be used to build a custom kernel that is better tuned to your particular hardware, if you are so inclined (and you know what you're doing). %description headers Kernel-headers includes the C header files for the Linux kernel. The header files define structures and constants that are needed for building most standard programs. The header files are also needed for rebuilding the kernel. %description doc This package contains documentation files form the kernel source. Various bits of information about the Linux kernel and the device drivers shipped with it are documented in these files. You also might want install this package if you need a reference to the options that can be passed to Linux kernel modules at load time. %description pcmcia-cs Many laptop machines (and some non-laptops) support PCMCIA cards for expansion. Also known as "credit card adapters," PCMCIA cards are small cards for everything from SCSI support to modems. PCMCIA cards are hot swappable (i.e., they can be exchanged without rebooting the system) and quite convenient to use. The kernel-pcmcia-cs package contains a set of loadable kernel modules that implement an applications program interface, a set of client drivers for specific cards and a card manager daemon that can respond to card insertion and removal events by loading and unloading drivers on demand. The daemon also supports hot swapping, so that the cards can be safely inserted and ejected at any time. Install the kernel-pcmcia-cs package if your system uses PCMCIA cards. %description utils The kernel-utils package contains ksymoops, a utility that can be used for decrypting the kernel's OOPS output. %prep %setup -q -n linux -a 1 %patch6 -p0 -b .ppcspinlock %patch7 -p1 -b .pcnet32 %patch10 -p1 -b .serial %patch12 -p0 -b .raw %patch14 -p5 -b .init_main %patch20 -p1 -b .compression %patch28 -p1 -b .peerbus %ifarch ppc %patch50 -p1 -b .limits %endif # Bring in the Red Hat Kernel Module Version Tag program cp $RPM_SOURCE_DIR/rhkmvtag.c . # Basically, this sucks. Shipping kernel source with procompiled binaries, # that is. And having 'make mrproper' not cleaning that up either make clean -C scripts/ksymoops # make sure the kernel has the sublevel we know it has... perl -p -i -e "s/^SUBLEVEL.*/SUBLEVEL = %{sublevel}/" Makefile # get rid of unwanted files find . -name "*.orig" -exec rm -fv {} \; ### ### build ### %build BuildKernel() { # is this a special kernel we want to build? if [ -n "$1" ] ; then %ifarch ppc Config=%{_target_cpu}-bwg3v2 %else Config=%{_target_cpu}-$1 %endif KernelVer=%{version}-%{release} echo BUILDING A KERNEL FOR $1... else Config=%{_target_cpu} KernelVer=%{version}-%{release} echo BUILDING THE NORMAL KERNEL... fi cp $RPM_SOURCE_DIR/kernel-%{kversion}-$Config.config arch/%{_arch}/defconfig rm -f .config # make sure EXTRAVERSION says what we want it to say perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -%{release}/" Makefile make mrproper make oldconfig make dep make include/linux/version.h NRPROC=$(cat /proc/cpuinfo | grep ^processor | wc -l) if [ $NRPROC -eq 0 ] ; then NRPROC=1 fi make -j $NRPROC zImage # make make -j $NRPROC modules MAKE="make -j $NRPROC" # first make sure we are not loosing any .ver files to make mrporper's # removal of zero sized files. find include/linux/modules -size 0 | while read file ; do \ echo > $file done # Start installing stuff mkdir -p $RPM_BUILD_ROOT/boot install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-$KernelVer install -m 644 $RPM_SOURCE_DIR/module-info $RPM_BUILD_ROOT/boot/module-info-$KernelVer %ifarch ppc # install -m 644 arch/ppc/chrpboot/zImage $RPM_BUILD_ROOT/boot/zImage-$KernelVer %else gzip -cfv vmlinux > vmlinuz install -m 644 vmlinuz $RPM_BUILD_ROOT/boot/vmlinuz-$KernelVer %endif install -m 755 vmlinux $RPM_BUILD_ROOT/boot/vmlinux-$KernelVer mkdir -p $RPM_BUILD_ROOT/lib/modules/$KernelVer/{block,cdrom,fs,ipv4,misc,net,scsi,video} make INSTALL_MOD_PATH=$RPM_BUILD_ROOT modules_install KERNELRELEASE=$KernelVer #Identify the modules directory with the Red Hat Kernel Module Version Tag %ifnarch sparc64 cc -o rhkmvtag rhkmvtag.c init/version.o ./rhkmvtag > $RPM_BUILD_ROOT/lib/modules/$KernelVer/.rhkmvtag rm -f rhkmvtag %endif } BuildPCMCIA() { if [ -z "$1" ] ; then echo "BUILDING FOR NORMAL KERNEL..." else echo "BUILDING FOR $1..." fi make -C pcmcia-cs-%{pcmciaver} config < \ $RPM_BUILD_ROOT/usr/src/linux-%{kversion}/include/linux/modversions-$1.h mv include/linux/modules include/linux/modules-$1 fi } ### # DO it... ### rm -rf $RPM_BUILD_ROOT # NORMAL KERNEL %ifarch ppc BuildKernel ppc BuildPCMCIA ppc SaveHeaders ppc %endif make -C scripts/ksymoops ksymoops ### ### install ### %install mkdir -p $RPM_BUILD_ROOT/usr/include ln -sf ../src/linux/include/linux $RPM_BUILD_ROOT/usr/include/linux mkdir -p $RPM_BUILD_ROOT/usr/src/linux-%{kversion} mkdir -p $RPM_BUILD_ROOT/{boot,sbin} install -m 755 $RPM_SOURCE_DIR/installkernel $RPM_BUILD_ROOT/sbin/installkernel %ifarch ppc mkdir -p $RPM_BUILD_ROOT/etc/pcmcia mkdir -p $RPM_BUILD_ROOT/etc/sysconfig # Install our own network up/down script install -m755 $RPM_SOURCE_DIR/pcmcia-cs-2.8.8-network.script \ $RPM_BUILD_ROOT/etc/pcmcia/network # We need our own default /etc/sysconfig/pcmcia cat > $RPM_BUILD_ROOT/etc/sysconfig/pcmcia < $file rm -f $file.old done ## Try to put some smarter autoconf.h and version.h files in place #pushd $RPM_BUILD_ROOT/usr/src/linux-%{kversion}/include/linux ; { #mv autoconf.h autoconf-up.h #mv version.h version-up.h #mv modversions.h modversions-up.h #install -m 644 %{SOURCE15} autoconf.h #install -m 644 %{SOURCE16} version.h #install -m 644 %{SOURCE17} modversions.h #} ; popd #> $RPM_BUILD_ROOT/boot/kernel.h # other tools install -m 755 scripts/ksymoops/ksymoops $RPM_BUILD_ROOT/sbin/ksymoops ### ### clean ### %clean rm -rf $RPM_BUILD_ROOT ### ### scripts ### # do this for upgrades...in case the old modules get removed we have # loopback in the kernel so that mkinitrd will work. %pre /sbin/modprobe loop 2> /dev/null > /dev/null exit 0 %post cd /boot %ifarch ppc #ln -sf zImage-%{KVERREL} zImage ln -sf vmlinux-%{KVERREL} vmlinux %else ln -sf vmlinuz-%{KVERREL} vmlinuz %endif ln -sf System.map-%{KVERREL} System.map ln -sf module-info-%{KVERREL} module-info ln -sf %{KVERREL} /lib/modules/%{kversion} %post headers cd /usr/src rm -f linux ln -snf linux-%{kversion} linux %post source cd /usr/src rm -f linux ln -snf linux-%{kversion} linux %postun %ifarch ppc rm -f /lib/modules/%{KVERREL}/modules.dep /lib/modules/%{kversion} rm -f /boot/vmlinux /boot/zImage /boot/System.map /boot/module-info %endif %postun headers if [ -L /usr/src/linux ]; then if [ `ls -l /usr/src/linux | awk '{ print $11 }'` = "linux-%{kversion}" ]; then [ $1 = 0 ] && rm -f /usr/src/linux fi fi exit 0 %postun source if [ -L /usr/src/linux ]; then if [ `ls -l /usr/src/linux | awk '{ print $11 }'` = "linux-%{kversion}" ]; then [ $1 = 0 ] && rm -f /usr/src/linux fi fi exit 0 %ifarch ppc %post pcmcia-cs /sbin/chkconfig --add pcmcia %preun pcmcia-cs if [ $1 = 0 ]; then /sbin/chkconfig --del pcmcia fi exit 0 %triggerpostun -- kernel-pcmcia-cs < 2.2.5 if [ -f /etc/rc.d/init.d/pcmcia ] ; then /sbin/chkconfig --add pcmcia fi %endif ### ### file lists ### %ifarch ppc %files /boot/vmlinux-%{KVERREL} #/boot/zImage-%{KVERREL} /boot/System.map-%{KVERREL} /boot/module-info-%{KVERREL} /sbin/installkernel %dir /lib/modules /lib/modules/%{KVERREL} %else /boot/vmlinux-%{KVERREL} /boot/vmlinuz-%{KVERREL} /boot/System.map-%{KVERREL} /boot/module-info-%{KVERREL} /sbin/installkernel %dir /lib/modules /lib/modules/%{KVERREL} %endif # this one should be really built only for the basic architecture %ifarch ppc %files source /usr/src/linux-%{kversion}/COPYING /usr/src/linux-%{kversion}/CREDITS /usr/src/linux-%{kversion}/Documentation /usr/src/linux-%{kversion}/MAINTAINERS /usr/src/linux-%{kversion}/Makefile /usr/src/linux-%{kversion}/README /usr/src/linux-%{kversion}/REPORTING-BUGS /usr/src/linux-%{kversion}/Rules.make /usr/src/linux-%{kversion}/arch/%{_arch} /usr/src/linux-%{kversion}/arch/sparc64 /usr/src/linux-%{kversion}/drivers /usr/src/linux-%{kversion}/fs /usr/src/linux-%{kversion}/init /usr/src/linux-%{kversion}/ipc /usr/src/linux-%{kversion}/kernel /usr/src/linux-%{kversion}/lib /usr/src/linux-%{kversion}/mm /usr/src/linux-%{kversion}/modules /usr/src/linux-%{kversion}/net /usr/src/linux-%{kversion}/scripts %ifarch ppc /usr/src/linux-%{kversion}/pcmcia-cs-%{pcmciaver} %endif %endif %files utils %defattr(-,root,root) %doc scripts/ksymoops/README /sbin/ksymoops %ifarch ppc %files pcmcia-cs %doc pcmcia-cs-%{pcmciaver}/doc/PCMCIA-HOWTO %doc pcmcia-cs-%{pcmciaver}/doc/PCMCIA-PROG %doc pcmcia-cs-%{pcmciaver}/SUPPORTED.CARDS %doc pcmcia-cs-%{pcmciaver}/CHANGES %doc pcmcia-cs-%{pcmciaver}/COPYING %doc pcmcia-cs-%{pcmciaver}/README /sbin/cardctl /sbin/cardmgr /sbin/ftl_check /sbin/ftl_format /sbin/ifport /sbin/ifuser /sbin/pcinitrd %ifnarch ppc /sbin/probe %endif /sbin/scsi_info /usr/man/*/* %config /etc/rc.d/init.d/pcmcia %config /etc/sysconfig/pcmcia %dir /etc/pcmcia #/etc/pcmcia/cdrom /etc/pcmcia/config /etc/pcmcia/ftl /etc/pcmcia/ide /etc/pcmcia/memory /etc/pcmcia/network /etc/pcmcia/scsi /etc/pcmcia/serial /etc/pcmcia/shared /etc/pcmcia/cis %config /etc/pcmcia/config.opts #%config /etc/pcmcia/cdrom.opts %config /etc/pcmcia/ftl.opts %config /etc/pcmcia/ide.opts %config /etc/pcmcia/memory.opts %config /etc/pcmcia/scsi.opts %config /etc/pcmcia/serial.opts %endif # again a package that makes no sense to have a optimized version for %ifarch ppc %files headers %dir /usr/src/linux-%{kversion} %ifarch ppc /usr/src/linux-%{kversion}/include/asm-ppc /usr/src/linux-%{kversion}/include/asm-m68k %else /usr/src/linux-%{kversion}/include/asm-%{_arch} %endif %endif /usr/src/linux-%{kversion}/include/asm /usr/src/linux-%{kversion}/include/asm-generic /usr/src/linux-%{kversion}/include/linux /usr/src/linux-%{kversion}/include/net /usr/src/linux-%{kversion}/include/scsi /usr/src/linux-%{kversion}/include/video /usr/include/asm /usr/include/linux /usr/src/linux-%{kversion}/README.kernel-sources %ifarch ppc %files doc %doc Documentation/* %endif %changelog * Wed Jan 02 2000 Kaoru Fukui - update to 2.2.15.pre3 * Tue Dec 07 1999 Kaoru Fukui - adjstment bwg3v2 * Wed Sep 22 1999 Dan Burcaw - Added serial patch - Added floppy patch * Sun Sep 19 1999 Dan Burcaw - synced with RH * Sat Sep 18 1999 Dan Burcaw - synced with samba - removed Pizzazz patch (now merged into samba) * Thu Sep 09 1999 Dan Burcaw - added patch for IBM thin-client server RS/6000 'Pizzazz' * Mon Aug 30 1999 Dan Burcaw - upgraded to 2.2.12 and removed many patches - now using common config - ripped out PReP support until we can find a good way to hand boot/zImage for PReP vs. chrpboot/zImage for CHRP - added Rage 128 patch * Mon Apr 19 1999 Cristian Gafton - upgraded the defrag patch with stuff from davem * Sun Apr 18 1999 Cristian Gafton - log debugging information about starting nfsd to syslog instead of console - make sure the postinstall exits with success for the kernel rpm if lilo has issues - updated sparc jumbo patch - networking fixes from DaveM - make pcmcia use a preun instead of a postun. Duh. - triggerpostun protects upgrades from older verrsions of pcmcia. Duh. Duh. * Sat Apr 17 1999 Cristian Gafton - added patches for the alpha problems, ftruncate fix, mmap and shm fixes from the 2.2.6 kernel - updated DaveM's sparc patch - x86 patches also from x86 kernel * Fri Apr 16 1999 Cristian Gafton - build alpha network drivers as modules - pcmcia scripts do not use /dev/cuaX anymore for /dev/modem (ttySX instead) - disable RTC on alpha * Wed Apr 14 1999 Cristian Gafton - add patch for tokenring - add the REAME.kernel-sources file to the kernel-headers - updated again the sparc patch - add Linus's patch to fix out of memory errors - fix dac960's driver include files * Tue Apr 13 1999 Tom Rini - re add ppc support again * Mon Apr 12 1999 Cristian Gafton - new sparc patch (davem) - new RAID patch (mingo) - new aic7xxx driver (5.1.15 - dledford) - aarp patch from alan * Fri Apr 09 1999 Cristian Gafton - add patch from Alan to make SYS_access SuSv2 compliant - update Dave Miller's sparc patch - get rid of the bogus buffer patch (why the heck didn't patch reject it in first place?) * Wed Apr 07 1999 Cristian Gafton - more patches from Alan - updated the knfsd patches from knfsd 1.2.2 * Mon Apr 05 1999 Cristian Gafton - updated sparc patch from davem - added patch for sound docs and bttv driver from alan * Wed Mar 31 1999 Cristian Gafton - add i586 as an other platform - patch from Alan Cox to fix misc hangups - updated Doug's driver to 5.1.13 - version 2.2.5 * Fri Mar 26 1999 Cristian Gafton - added BOOT config files for all the arches - updated config files (again) * Wed Mar 24 1999 Cristian Gafton - version 2.2.4 - new DAC960 patch - install a module-info for ech kernel build - be more selective in building kernel-doc for all arches - alpha CPUs detection patch * Sat Mar 13 1999 Cristian Gafton - patch for nbd stuff - added large fd patch - added nfsd patches from the knfsd dist * Sat Mar 13 1999 Matt Wilson - disabled vfork() on sparc32 - fixed up sparc64 build - changed the compression level for bzImages from -9 to -3 on i386 * Fri Mar 12 1999 Matt Wilson - build sunlance into the sparc kernels * Thu Mar 11 1999 Cristian Gafton - version 2.2.3 - make the /usr/src/linux-VER dir owned by kernel-headers instead of kernel-source * Wed Mar 10 1999 Cristian Gafton - update to 2.2.2-ac7 - add config files for i686 * Wed Feb 24 1999 Cristian Gafton - merged in sparc64 changes - update to 2.2.2 - fix the uname problems in different shapes of kernel being generated - create a documentation package * Thu Feb 11 1999 Cristian Gafton - version 2.2.1 w/ ac5 - build the boot kernel for the bootdisks * Wed Jan 27 1999 Cristian Gafton - ver 2.2.0 final w/ ac1 - move the pcmcia modules to the main kernel package - also build smp version of the kernel - enable apm in the kernel by default * Tue Jan 19 1999 Cristian Gafton - update to 2.2.0 pre 8 w/ ac1 * Sun Dec 27 1998 Mike Wangsmo - put in 133ac3 - fixed PCMCIA to use GET_USE_COUNT instead of module->usecount * Mon Dec 21 1998 Cristian Gafton - remove the jensen and srm-jensen subpackages, as those should be handled by the generic kernel instead. - use 131ac13 - upgradede to 2.1.131 - removed /usr/include/scsi from kernel-headers * Mon Nov 23 1998 Cristian Gafton - upgraded to 2.1.129 ac3 - pcmcia-cs 3.0.6 - XXX: disabled the DEPCS, EWRK3 support, as it does not build yet * Tue Sep 29 1998 Cristian Gafton - upgraded to 2.1.123 - builds jansen and jensen-srm subpackages on alpha * Thu Aug 13 1998 Cristian Gafton - build of 2.1.115, based on the previous spec from 2.0.35 - build like almost any other package, not dircetly in the buildroot - sed the buildroot dir out of the .depend files