diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-06-04 20:47:18 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-06-04 20:47:18 +0000 |
commit | ef9d12c6cabe35b2fdab176c3d3490b109d391c1 (patch) | |
tree | ac65b579614cf14fcebbb808a17b6dda3ee6f371 | |
parent | e33a8dbf70cdbfc7f652ec0f2f4e4a58b1618cde (diff) | |
download | buildroot-novena-ef9d12c6cabe35b2fdab176c3d3490b109d391c1.tar.gz buildroot-novena-ef9d12c6cabe35b2fdab176c3d3490b109d391c1.zip |
Cleanup pcmcia a bit (such as removing the X11 binary it installs)
and use the pcmcia default init script rather than including a
default one in the target_skeleton.
-rw-r--r-- | make/pcmcia.mk | 11 | ||||
-rwxr-xr-x | sources/target_skeleton/etc/init.d/S30pcmcia | 180 |
2 files changed, 9 insertions, 182 deletions
diff --git a/make/pcmcia.mk b/make/pcmcia.mk index bf94fed85..187ea3ee3 100644 --- a/make/pcmcia.mk +++ b/make/pcmcia.mk @@ -41,7 +41,7 @@ $(PCMCIA_DIR)/.patched: $(PCMCIA_DIR)/.unpacked touch $(PCMCIA_DIR)/.patched $(PCMCIA_DIR)/.configured: $(PCMCIA_DIR)/.patched - ( cd $(PCMCIA_DIR) ; ./Configure --kernel=$(LINUX_SOURCE_DIR) --noprompt \ + ( cd $(PCMCIA_DIR) ; ./Configure --kernel=$(LINUX_DIR) --noprompt \ --rcdir=/etc --arch=$(ARCH) --trust --srctree --nocardbus \ --sysv --kcc=$(HOSTCC) --ucc=$(TARGET_CC) --ld=$(TARGET_CROSS)ld \ --target=$(TARGET_DIR)) @@ -74,7 +74,14 @@ $(TARGET_DIR)/sbin/cardmgr: $(PCMCIA_DIR)/cardmgr/cardmgr rm -f $(TARGET_DIR)/usr/share/pnp.ids $(TARGET_DIR)/sbin/lspnp $(TARGET_DIR)/sbin/setpnp; rm -f $(TARGET_DIR)/sbin/pcinitrd rm -f $(TARGET_DIR)/sbin/probe - cp $(SOURCE_DIR)/target_skeleton/etc/init.d/S30pcmcia $(TARGET_DIR)/etc/init.d/S30pcmcia + rm -f $(TARGET_DIR)/sbin/ide_info + rm -f $(TARGET_DIR)/sbin/scsi_info + rm -f $(TARGET_DIR)/sbin/ftl_check + rm -f $(TARGET_DIR)/sbin/ftl_format + rm -f $(TARGET_DIR)/usr/X11R6/bin/xcardinfo + rm -rf $(TARGET_DIR)/etc/sysconfig + cp $(PCMCIA_DIR)/etc/rc.pcmcia $(TARGET_DIR)/etc/init.d/S30pcmcia + rm -rf $(TARGET_DIR)/etc/pcmcia/cis chmod a+x $(TARGET_DIR)/etc/init.d/S30pcmcia chmod -R u+w $(TARGET_DIR)/etc/pcmcia/* diff --git a/sources/target_skeleton/etc/init.d/S30pcmcia b/sources/target_skeleton/etc/init.d/S30pcmcia deleted file mode 100755 index 0b14338f3..000000000 --- a/sources/target_skeleton/etc/init.d/S30pcmcia +++ /dev/null @@ -1,180 +0,0 @@ -#!/bin/sh - -# rc.pcmcia 1.39 2001/10/04 12:30:05 (David Hinds) -# -# This is designed to work in BSD as well as SysV init setups. See -# the HOWTO for customization instructions. -# Modified to comply with Debian's standards by Brian Mays -# <brian@debian.org>. - -# Tags for Red Hat init configuration tools -# -# chkconfig: 2345 45 96 -# processname: cardmgr -# pidfile: /var/run/cardmgr.pid -# config: /etc/pcmcia/config -# config: /etc/pcmcia/config.opts -# description: PCMCIA support is usually to support things like ethernet \ -# and modems in laptops. It won't get started unless \ -# configured so it is safe to have it installed on machines \ -# that don't need it. - -# Save option values passed in through the environment -for N in PCMCIA PCIC PCIC_OPTS CORE_OPTS CARDMGR_OPTS SCHEME ; do - V=`eval echo '$'$N` ; if [ "$V" ] ; then eval ENV_$N=\"$V\" ; fi -done - -# PCMCIA configuration... This may be wrong for many systems. - -# Should be either yenta_socket, i82365 or tcic -PCIC=yenta_socket -#PCIC=i82365 -#PCIC=tcic - -# 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= -PCMCIA=yes - - -for N in PCMCIA PCIC PCIC_OPTS CORE_OPTS CARDMGR_OPTS SCHEME ; do - V=`eval echo '$'ENV_$N` ; if [ "$V" ] ; then eval $N=\"$V\" ; fi -done -if [ "$PCMCIA" -a "$PCMCIA" != "yes" ] ; then exit 0 ; fi - -# Debian modification: Fix PCIC for stand-alone modules. -# yenta_socket -> i82365 on these systems. -# Existence of a standalone module implies that it is preferred. -PC=/lib/modules/`uname -r`/pcmcia -if [ "$PCIC" = yenta_socket -a -e $PC/i82365.o \ - -a ! -L $PC/i82365.o ]; then - PCIC=i82365 -fi - -usage() -{ - echo "Usage: $0 {start|stop|status|restart|reload|force-reload}" -} - -cleanup() -{ - while read SN CLASS MOD INST DEV EXTRA ; do - if [ "$SN" != "Socket" ] ; then - /etc/pcmcia/$CLASS stop $DEV 2> /dev/null - fi - done -} - -EXITCODE=1 -for x in "1" ; do - - if [ "$PCIC" = "" ] ; then - echo "PCIC module not defined in startup options!" - break - fi - - if [ $# -lt 1 ] ; then usage ; break ; fi - action=$1 - - case "$action" in - - start) - echo -n "Starting PCMCIA services:" - SC=/var/lib/pcmcia/scheme - RUN=/var/lib/pcmcia - 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 - grep -q pcmcia /proc/devices - if [ $? -ne 0 ] ; then - PC=/lib/modules/`uname -r`/pcmcia - KD=/lib/modules/`uname -r`/kernel/drivers/pcmcia - if [ -d $KD ] ; then - /sbin/modprobe pcmcia_core - /sbin/modprobe $PCIC - /sbin/modprobe ds - elif [ -d $PC ] ; then - echo -n " modules" - /sbin/insmod $PC/pcmcia_core.o $CORE_OPTS - /sbin/insmod $PC/$PCIC.o $PCIC_OPTS - /sbin/insmod $PC/ds.o - 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 - echo " cardmgr." - /sbin/cardmgr $CARDMGR_OPTS - fi - touch /var/lock/pcmcia.lock 2>/dev/null - EXITCODE=0 - ;; - - stop) - echo -n "Shutting down PCMCIA services:" - 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 - if grep -q "ds " /proc/modules ; then - echo -n " modules" - /sbin/rmmod ds - /sbin/rmmod $PCIC - /sbin/rmmod pcmcia_core - fi - echo "." - rm -f /var/lock/pcmcia.lock - EXITCODE=0 - ;; - - status) - pid=`/bin/pidof cardmgr` - if [ "$pid" != "" ] ; then - echo "cardmgr (pid $pid) is running..." - EXITCODE=0 - else - echo "cardmgr is stopped" - EXITCODE=3 - fi - ;; - - restart) - $0 stop - $0 start - EXITCODE=$? - ;; - - reload|force-reload) - echo "Reloading $DESC configuration files." - kill -1 `cat /var/run/cardmgr.pid` 2>/dev/null - EXITCODE=0 - ;; - - *) - usage - ;; - - esac - -done - -# Only exit if we're in our own subshell -case $0 in *pcmcia) exit $EXITCODE ;; esac |