diff options
author | Achim Gottinger <achim@gentoo.org> | 2001-05-04 22:17:47 +0000 |
---|---|---|
committer | Achim Gottinger <achim@gentoo.org> | 2001-05-04 22:17:47 +0000 |
commit | 00f19e8a292927814d914b5d1b3c9d1880e6582b (patch) | |
tree | bb19855c7edd28364ba554e99209de031bcccfa5 /sys-kernel | |
parent | New revisison with pcmcia-cs (diff) | |
download | historical-00f19e8a292927814d914b5d1b3c9d1880e6582b.tar.gz historical-00f19e8a292927814d914b5d1b3c9d1880e6582b.tar.bz2 historical-00f19e8a292927814d914b5d1b3c9d1880e6582b.zip |
*** empty log message ***
Diffstat (limited to 'sys-kernel')
-rwxr-xr-x | sys-kernel/linux/files/2.4.4-ac4/pcmcia | 97 | ||||
-rw-r--r-- | sys-kernel/linux/linux-2.4.4.4-r1.ebuild | 362 |
2 files changed, 459 insertions, 0 deletions
diff --git a/sys-kernel/linux/files/2.4.4-ac4/pcmcia b/sys-kernel/linux/files/2.4.4-ac4/pcmcia new file mode 100755 index 000000000000..4cfb368ff68a --- /dev/null +++ b/sys-kernel/linux/files/2.4.4-ac4/pcmcia @@ -0,0 +1,97 @@ +#!/bin/sh +#RCUPDATE:3 4:69:This line is required for script management + +. /etc/rc.d/config/functions + +SERVICE=pcmcia +opts="start stop restart" + + # Slackware startup options go right here: + # Should be either i82365 or tcic + PCIC=i82365 + # Put socket driver timing parameters here + PCIC_OPTS= + # Put pcmcia_core options here + CORE_OPTS= + # Put cardmgr options here + CARDMGR_OPTS= + # To set the PCMCIA scheme at startup... + SCHEME= + +cleanup() +{ + while read SN CLASS MOD INST DEV EXTRA ; do + if [ "$SN" != "Socket" ] ; then + /etc/pcmcia/$CLASS stop $DEV 2> /dev/null + fi + done +} + +start() { + if [ -d /var/lib/pcmcia ] ; then + SC=/var/lib/pcmcia/scheme + RUN=/var/lib/pcmcia + else + SC=/var/run/pcmcia-scheme + RUN=/var/run + fi + if [ -L $SC -o ! -O $SC ] ; then rm -f $SC ; fi + if [ ! -f $SC ] ; then umask 022 ; touch $SC ; fi + if [ "$SCHEME" ] ; then umask 022 ; echo $SCHEME > $SC ; fi + fgrep -q pcmcia /proc/devices + if [ $? -ne 0 ] ; then + if [ -d /lib/modules/preferred ] ; then + PC=/lib/modules/preferred/pcmcia + else + PC=/lib/modules/`uname -r`/pcmcia + fi + if [ -d $PC ] ; then + echo -n " modules" + /sbin/insmod $PC/pcmcia_core.o $CORE_OPTS 2>&1 > /dev/null + /sbin/insmod $PC/$PCIC.o $PCIC_OPTS 2>&1 > /dev/null + /sbin/insmod $PC/ds.o 2>&1 > /dev/null + else + echo " module directory $PC not found." + break + fi + fi + if [ -s /var/run/cardmgr.pid ] && \ + kill -0 `cat /var/run/cardmgr.pid` 2>/dev/null ; then + echo " cardmgr is already running." + else + if [ -r $RUN/stab ] ; then + cat $RUN/stab | cleanup + fi + /sbin/cardmgr $CARDMGR_OPTS 2>&1 > /dev/null + fi + touch /var/lock/subsys/pcmcia 2>&1 > /dev/null +} + +stop() { + if [ -s /var/run/cardmgr.pid ] ; then + PID=`cat /var/run/cardmgr.pid` + kill $PID + echo -n " cardmgr" + # Give cardmgr a few seconds to handle the signal + kill -0 $PID 2>/dev/null && sleep 2 && \ + kill -0 $PID 2>/dev/null && sleep 2 && \ + kill -0 $PID 2>/dev/null && sleep 2 && \ + kill -0 $PID 2>/dev/null + fi + killall -q "CardBus Watcher" + if fgrep -q "ds " /proc/modules ; then + echo -n " modules" + /sbin/rmmod ds + /sbin/rmmod $PCIC + /sbin/rmmod pcmcia_core + fi + rm -f /var/lock/subsys/pcmcia +} + +restart() { + stop + start +} + +doservice ${@} + diff --git a/sys-kernel/linux/linux-2.4.4.4-r1.ebuild b/sys-kernel/linux/linux-2.4.4.4-r1.ebuild new file mode 100644 index 000000000000..b80ba65fe2ee --- /dev/null +++ b/sys-kernel/linux/linux-2.4.4.4-r1.ebuild @@ -0,0 +1,362 @@ +# Copyright 1999-2000 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later +# Author Daniel Robbins <drobbins@gentoo.org> +# /home/cvsroot/gentoo-x86/sys-kernel/linux/linux-2.4.4.3.ebuild,v 1.1 2001/05/02 14:31:06 achim Exp + +#OKV=original kernel version, KV=patched kernel version +OKV=2.4.4 +KV=2.4.4-ac4 +S=${WORKDIR}/linux-${KV} + +# Versions of LVM +LVMV=0.9.1_beta7 + +LVMVARC=0.9.1_beta7 +# Versions of alsa +AV=0.5.10b + +# Versionos of jfs +JFSV=0.2.1 + +# Versions of lm_sensors +SENV=2.5.5 + +# Versions of reiserfs +RV=20010327 +KNV="6.g" +PIV="1.d" + +# Versions of xmlprocfs +XMLV=0.3 + +# Versions of pcmcia-cs +PCV="3.1.25" + +# [ "${PN}" = "linux" ] && DESCRIPTION="Linux kernel version ${KV}, including modules, binary tools, libraries and includes" +# [ "${PN}" = "linux-sources" ] && DESCRIPTION="Linux kernel version ${KV} - full sources" +# [ "${PN}" = "linux-extras" ] && DESCRIPTION="Linux kernel support tools and libraries" + +SRC_URI="http://www.kernel.org/pub/linux/kernel/v2.4/linux-${OKV}.tar.bz2 + http://www.kernel.org/pub/linux/kernel/people/alan/2.4/patch-${KV}.bz2 + http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/linux-2.4.4-knfsd-6.g.patch.gz + http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/linux-2.4.4-procinfo-1.d.patch.gz + http://dice.mfa.kfki.hu/download/reiserfs-3.6.25-2.4.4/reiserfs-quota-2.4.4.dif.bz2" + +# http://oss.software.ibm.com/developerworks/opensource/jfs/project/pub/jfs-${JFSV}-patch.tar.gz +# http://download.sourceforge.net/xmlprocfs/linux-2.4-xmlprocfs-${XMLV}.patch.gz +# ftp://ftp.reiserfs.com/pub/reiserfs-for-2.4/linux-${OKV}-reiserfs-${RV}.patch.gz + +[ "`use lm_sensors`" ] && SRC_URI="${SRC_URI} http://www.netroedge.com/~lm78/archive/lm_sensors-${SENV}.tar.gz" +[ "`use lvm`" ] && SRC_URI="${SRC_URI} ftp://ftp.sistina.com/pub/LVM/0.9.1_beta/lvm_${LVMVARC}.tar.gz" +[ "`use alsa`" ] && SRC_URI="${SRC_URI} ftp://ftp.alsa-project.org/pub/driver/alsa-driver-${AV}.tar.bz2" +[ "`use pcmcia-cs`" ] &&SEC_URI="${SRC_URI} http://prdownloads.sourceforge.net/pcmcia-cs/pcmcia-cs-${PCV}.tar.gz" +HOMEPAGE="http://www.kernel.org/ + http://www.netroedge.com/~lm78/ + http://www.namesys.com + http://www.sistina.com/lvm/ + http://www.alsa-project.org + http://pcmcia-cs.sourceforge.net" + +[ "${PN}" = "linux" ] || [ "${PN}" = "linux-sources" ] && PROVIDE="virtual/kernel" + +RDEPEND=">=sys-apps/reiserfs-utils-3.6.25-r1" +DEPEND=">=sys-apps/modutils-2.4.0" + +# this is not pretty... +LINUX_HOSTCFLAGS="-Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -I${S}/include" + +src_unpack() { + #unpack kernel and apply reiserfs-related patches + cd ${WORKDIR} + unpack linux-${OKV}.tar.bz2 + try mv linux linux-${KV} + cd ${S} + echo "Applying ${KV} patch..." + try bzip2 -dc ${DISTDIR}/patch-${KV}.bz2 | patch -p1 +# echo "Applying reiserfs-update patch..." +# try gzip -dc ${DISTDIR}/linux-2.4.2-reiserfs-${RV}.patch.gz | patch -N -p1 +# echo "You can ignore the rejects the changes already are in rc11" + +# echo +# echo "Applying xmlprocfs patch..." +# try gzip -dc ${DISTDIR}/linux-2.4-xmlprocfs-${XMLV}.patch.gz | patch -p1 + echo "Applying ac-nfsfh patch..." + try patch -p0 < ${FILESDIR}/${KV}/nfsfh-ac-fix.diff + echo "Applying reiserfs-knfsd patch..." + try gzip -dc ${DISTDIR}/linux-${OKV}-knfsd-${KNV}.patch.gz | patch -p1 + echo "Applying ac-nfsfh-knfsd patch..." + try patch -p0 < ${FILESDIR}/${KV}/nfsfh-ac-knfsd.diff + echo "Applying reiserfs-procinfo patch..." + try gzip -dc ${DISTDIR}/linux-${OKV}-procinfo-${PIV}.patch.gz | patch -p1 +# echo "Applying reiserfs-quota patch..." +# try bzip2 -dc ${DISTDIR}/reiserfs-quota-${OKV}.dif.bz2 | patch -p1 + + if [ "`use lvm`" ] || [ "`use alsa`" ] || [ "`use lm_sensors`" ] || [ "`use pcmcia-cs`" ] + then + mkdir ${S}/extras + fi + + if [ "`use lvm`" ] + then + #create and apply LVM patch. The tools get built later. + cd ${S}/extras + echo "Unpacking and applying LVM patch..." + unpack lvm_${LVMVARC}.tar.gz + try cd LVM/${LVMV} + + # I had to hack this in so that LVM will look in the current linux + # source directory instead of /usr/src/linux for stuff - pete + try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}" + + cd PATCHES + try make KERNEL_VERSION=${KV} KERNEL_DIR=${S} + cd ${S} + # the -l option allows this patch to apply cleanly (ignore whitespace changes) + try patch -l -p1 < ${S}/extras/LVM/${LVMV}/PATCHES/lvm-${LVMV}-${KV}.patch + cd ${S}/drivers/md + try patch -p0 < ${FILESDIR}/2.4.4-r4/lvm.c.diff + fi + + if [ "`use alsa`" ] + then + #unpack alsa drivers + echo "Unpacking ALSA drivers..." + cd ${S}/extras + unpack alsa-driver-${AV}.tar.bz2 + fi + + if [ "`use lm_sensors`" ] + then + #unpack and apply the lm_sensors patch + echo "Unpacking and applying lm_sensors patch..." + cd ${S}/extras + unpack lm_sensors-${SENV}.tar.gz + try cd lm_sensors-${SENV} + try mkpatch/mkpatch.pl . ${S} > ${S}/lm_sensors-patch + try rmdir src + try ln -s ../.. src + try cp -a Makefile Makefile.orig + try sed -e \"s:^LINUX=.*:LINUX=src:\" \ + -e \"s/^COMPILE_KERNEL.*/COMPILE_CERNEL := 0/\" \ + -e \"s:^I2C_HEADERS.*:I2C_HEADERS=src/include:\" \ + -e \"s#^DESTDIR.*#DESTDIR := ${D}#\" \ + -e \"s#^PREFIX.*#PREFIX := /usr#\" \ + -e \"s#^MANDIR.*#MANDIR := /usr/share/man#\" \ + Makefile.orig > Makefile + cd ${S} + try patch -p1 < lm_sensors-patch + fi + if [ "`use pcmcia-cs`" ] + then + echo "Unpacking pcmcia-cs tools..." + cd ${S}/extras + unpack pcmcia-cs-${PCV}.tar.gz + patch -p0 < ${FILESDIR}/${KV}/pcmcia-cs-${PCV}-gentoo.diff + fi + #get sources ready for compilation or for sitting at /usr/src/linux + echo "Preparing for compilation..." + cd ${S} + #sometimes we have icky kernel symbols; this seems to get rid of them + try make mrproper + if [ "${PN}" = "linux" ] || [ "${PN}" = "linux-extras" ] + then + #this is the configuration for the default kernel + try cp ${FILESDIR}/${KV}/config.bootcomp .config + try yes \"\" \| make oldconfig + echo "Ignore any errors from the yes command above." + try make include/linux/version.h + fi + #fix silly permissions in tarball + cd ${WORKDIR} + chown -R 0.0 ${S} + chmod -R a+r-w+X,u+w ${S} +} + +src_compile() { + if [ "${PN}" = "linux" ] || [ "${PN}" = "linux-extras" ] + then + try make symlinks + + if [ "`use lvm`" ] + then + #LVM tools are included in the linux and linux-extras pakcages + cd ${S}/extras/LVM/${LVMV} + + # I had to hack this in so that LVM will look in the current linux + # source directory instead of /usr/src/linux for stuff - pete + try CFLAGS=\""${CFLAGS} -I${S}/include"\" ./configure --prefix=/ --mandir=/usr/share/man --with-kernel_dir="${S}" + + try make + fi + + if [ "`use lm_sensors`" ] + then + cd ${S}/extras/lm_sensors-${SENV} + try make + fi + + cd ${S} + + if [ "$PN" == "linux" ] + then + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" dep + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" bzImage + #LEX=\""flex -l"\" bzImage + try make HOSTCFLAGS=\""${LINUX_HOSTCFLAGS}"\" modules + #LEX=\""flex -l"\" modules + + if [ "`use alsa`" ] + then + cd ${S}/extras/alsa-driver-${AV} + try ./configure --with-kernel=\"${S}\" --with-isapnp=yes --with-sequencer=yes --with-oss=yes --with-cards=all + try make + fi + if [ "`use pcmcia-cs`" ] + then + cd ${S}/extras/pcmcia-cs-${PCV} + try ./Configure -n --kernel=${S} --moddir=/lib/modules/${KV} \ + --notrust --cardbus --nopnp --noapm --srctree --sysv --rcdir=/etc/rc.d/ + try make all + fi + fi + fi +} + +src_install() { + if [ "${PN}" = "linux" ] || [ "${PN}" = "linux-extras" ] + then + dodir /usr/lib + + if [ "`use lvm`" ] + then + cd ${S}/extras/LVM/${LVMV}/tools + + try CFLAGS=\""${CFLAGS} -I${S}/include"\" make install -e prefix=${D} mandir=${D}/usr/share/man \ + sbindir=${D}/sbin libdir=${D}/lib + #no need for a static library in /lib + mv ${D}/lib/*.a ${D}/usr/lib + fi + + if [ "`use lm_sensors`" ] + then + #install sensors tools + cd ${S}/extras/lm_sensors-${SENV} + make install + fi + + if [ "`use alsa`" ] + then + # get alsa includes + cd ${S}/extras/alsa-driver-${AV} + insinto /usr/src/linux-${KV}/include/linux + cd include + doins asound.h asoundid.h asequencer.h ainstr_*.h + fi + if [ "${PN}" = "linux" ] + then + dodir /usr/src + + + dodir /usr/src/linux-${KV} + cd ${D}/usr/src + #grab includes and documentation only + echo ">>> Copying includes and documentation..." + cp -ax ${S}/include ${D}/usr/src/linux-${KV} + cp -ax ${S}/Documentation ${D}/usr/src/linux-${KV} + + #grab compiled kernel + dodir /boot/boot + insinto /boot/boot + cd ${S} + doins arch/i386/boot/bzImage + + #grab modules + # Do we have a bug in modutils ? + # Meanwhile we use this quick fix (achim) + + install -d ${D}/lib/modules/`uname -r` + try make INSTALL_MOD_PATH=${D} modules_install + + depmod -b ${D} -F ${S}/System.map ${KV} +# rm -rf ${D}/lib/modules/`uname -r` + + if [ "`use alsa`" ] + then + #install ALSA modules + cd ${S}/extras/alsa-driver-${AV} + dodir /lib/modules/${KV}/misc + cp modules/*.o ${D}/lib/modules/${KV}/misc + + fi + if [ "`use pcmcia-cs`" ] + then + #install PCMCIA modules and utilities + cd ${S}/extras/pcmcia-cs-${PCV} + try make PREFIX=${D} install + rm -rf ${D}/etc/rc.d + insinto /etc/rc.d/init.d + doins ${FILESDIR}/${PV}/pcmcia + fi + #fix symlink + cd ${D}/lib/modules/${KV} + rm build + ln -sf /usr/src/linux-${KV} build + fi + elif [ "${PN}" = "linux-sources" ] + then + dodir /usr/src + + cd ${S} + make mrproper + + if [ "`use lvm`" ] + then + cd ${S}/extras/LVM/${LVMV} + make distclean + fi + + if [ "`use lm_sensors`" ] + then + cd ${S}/extras/lm_sensors-${SENV} + make clean + fi + if [ "`use alsa`" ] + then + cd ${S}/extras/alsa-driver-${AV} + make clean + fi + if [ "`use pcmcia-cs`" ] + then + cd ${S}/extras/pcmcia-cs-${PCV} + make clean + fi + + echo ">>> Copying sources..." + cp -ax ${S} ${D}/usr/src + + #don't overwrite existing .config if present + cd ${D}/usr/src/linux-${KV} + if [ -e .config ] + then + cp -a .config .config.eg + fi + fi +} + +pkg_postinst() { + rm -f ${ROOT}/usr/src/linux + ln -sf linux-${KV} ${ROOT}/usr/src/linux + + #copy over our .config if one isn't already present + cd ${ROOT}/usr/src/linux-${KV} + if [ "${PN}" = "linux-sources" ] && [ -e .config.eg ] && [ ! -e .config ] + then + cp -a .config.eg .config + fi +} + + +pkg_postrm() { + rm -f ${ROOT}/usr/src/linux + rm -rf ${ROOT}/usr/src/linux-${KV} +} |