2 suggestions for book, 1 for laptops and 1 for networking....

Alex Kloss alex at Stud-Mailer.Uni-Marburg.DE
Thu Jan 17 03:16:21 PST 2002


Hi, there!

> I hope I chose the right list to send this to...I
> should start off by saying that I am not a subscribed
> member, so if you do reply could you please cc: me at
> mcummings at datanode.net - thanks.
>
> I installed lfs on a laptop this week which is what
> spurred the original reason I wanted to post this
> message. Would it be possible to include a note (and
> if you need someone to actually write it, let me know,
> can't promise poetry but I can stab at it pretty good)
> directed at laptop users wanting to setup lfs that
> they also download the pcmcia package (sourceforge is
> the distribution point I believe) and parallel to
> their kernel tree, before that final reboot, run a
> make config && make all && make install, and if they
> have wireless to then cd to the wireless directory and
> do a make && make install (at least in my experience
> it doesn't get done with the general makes) - all of
> which will install the pcmcia modules, the pcmcia
> startup script, the cardctl & cardmgr programs, and
> the necessary subdirectories under /etc/ and
> /etc/sysconfig/.
>
> Second suggestion was more of a question - I noticed
> that although the lfs book discusses setting up your
> network files and eth device (in general terms at
> least), that there aren't (that I noticed, though by
> the end of the marathon I might have missed it) any
> notes or tarballs for some of the basic tools like
> telnet, ftp, and ssh...just thought I'd ask.
>
> Thanks to anyone who made it through my rambles this
> far,
>
> Mike
> mcummings at datanode.net
>
> __________________________________________________
> Do You Yahoo!?
> Send FREE video emails in Yahoo! Mail!
> http://promo.yahoo.com/videomail/
> --
> Unsubscribe: send email to listar at linuxfromscratch.org
> and put 'unsubscribe lfs-dev' in the subject header of the message
>
Now that Remenic and I installed LFS on notebooks quite often, I wrote a
pcmcia hint which is not yet finished (because of the crappy bootscript),
but still usable. Find this hint attached.

I suggest not putting this into the LFS book itself, because it's not
really necessary for an installation, but more a hintworthy thing.

LX
-------------- next part --------------
TITLE:		Setting up and configuring pcmcia support
LFS VERSION:	any
AUTHOR:		Alex Kloss <l.x. at gmx.de>

SYNOPSIS:
	The notebook on which that hint is written is the second that
	I've installed LFS on. Naturally, you want the pcmcia support
	when using LFS. So look at this hint.

HINT:	
	There seems to be a way to set up pcmcia support without the
	pcmcia-cs-package using only the kernel modules. Alas, it's
	not really usable, userfriendly or even compatible to your
	stuff.

DOWNLOADS:
	http://pcmcia.sourceforge.net (pcmcia-cs)
	xforms library (only for cardinfo)

INSTALL:
	If you want the X11 utility cardinfo (which is only a GUI
	version of cardctl), you need to install the xforms library
	first.

	Before installing the pcmcia-cs package, you should disable
	every single pcmcia related Option in your kernel configuration. 
	The modules delivered with the pcmcia-cs package are the newest
	stable versions.

	make [old]config &&
	make all &&
	make install

	You might not want to answer to the questions of the configure
	script. Then you might want to chose "make oldconfig" instead
	of "make config".

	For the bootscript, you need to make the directory
	/var/lock/subsys:

	mkdir /var/lock/subsys

	You'll find a new bootscript in /etc/init.d, which has little
	in common with the LFS bootscripts. You may replace it with the
	following one:

#!/bin/sh
#
# "$Id rc.pcmcia 1.39 2001/10/04 12:30:05 (David Hinds) +LX $"
#
# Startup/shutdown script for pcmcia support, originally taken from the
# pcmcia-cs package and changed by Alex Kloss to fit into the LFS
# boot procedure.
#

source /etc/init.d/functions

get_configuration () {
# Source PCMCIA configuration, if available
if [ -f /etc/pcmcia.conf ]; then
    # Debian startup option file
    . /etc/pcmcia.conf
elif [ -f /etc/sysconfig/pcmcia ]; then
    # Red Hat startup option file
    . /etc/sysconfig/pcmcia
else
    # 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=
fi
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
}

usage()
{
	echo "Usage: $0 {start|stop|status|restart|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
}

check_conf () {
    	if [ "$PCIC" = "" ]; then
		echo "PCIC module not defined in startup options!"
		break
    	fi
}

case $1 in
	start)
		get_configuration
		check_conf
		echo -n "Starting PCMCIA services..."
		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
		grep -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
	    		KD=/lib/modules/`uname -r`/kernel/drivers/pcmcia
	    		if [ -d $PC ]; then
				/sbin/insmod $PC/pcmcia_core.o $CORE_OPTS 2> /dev/null
				/sbin/insmod $PC/$PCIC.o $PCIC_OPTS 2> /dev/null
				/sbin/insmod $PC/ds.o 2> /dev/null
	    		elif [ -d $KD ]; then
				/sbin/modprobe pcmcia_core 2> /dev/null
				/sbin/modprobe $PCIC 2> /dev/null
				/sbin/modprobe ds 2> /dev/null
	    		else
				echo -e "\n module directory $PC not found:"
				break
	    		fi
    			loadproc /sbin/cardmgr $CARDMGR_OPTS 2> /dev/null
		fi
		touch /var/lock/subsys/pcmcia
		;;
    	stop)
		get_configuration
		check_conf
		echo -n "Shutting down PCMCIA services..."
		if [ -s /var/run/cardmgr.pid ]; then
	    		killproc cardmgr
		fi
		killall -q "CardBus Watcher"
		if grep -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
		;;
	status)
		pid=`/sbin/pidof cardmgr`
		if [ "$pid" != "" ]; then
	    		echo "cardmgr (pid $pid) is running..."
	    		EXITCODE=0
		else
	    		echo "cardmgr is stopped"
		fi
		;;

    	restart)
		$0 stop
		$0 start
		;;

	reload)
		get_environment
		check_conf
		reloadproc /usr/sbin/cardmgr $CARDMGR_OPTS
		;;
    	*)
		usage
		;;
esac

	So much for the bootscript. I'm too lazy to filter out
	everything that's not necessary for LFS bootup, so if anyone is
	keen enough to optimize it, please send me a copy!

USAGE:
	Start the pcmcia services (modules and cardmgr) via the
	bootscript. Insert a pcmcia card. You should hear a beep when
	the card is recognized and another one when it's configured.

	You may check your pcmcia status with the cardctl tool, which
	has the following options:

	status: displays the status of the pcmcia slot(s)

	config: displays the configuration of the pcmcia slot(s)

	ident: displays the pcmcia card(s) identification

	suspend/resume/reset/eject/insert: handle the pcmcia slot(s)

	Suspend and resume will only work if you enabled the APM
	functions for pcmcia.

Hope this was helpful!
Alex


More information about the hints mailing list