No subject


Sun Feb 20 16:52:19 PST 2005


# uname -a
The kernel version should be printed along with an extention like "-18" or
something. What you can do is find a ".deb" package that has the src for
that same version kernel.

Say for instance if I have Debian with kernel version:
2.4.18-9 listed as available for install
Then I want to find a debian package like "kernel-source-2.4.18" and
install it.

This would need to be the exact kernel tree that was used to build the
2.4.18-9 kernel that was reported to me when I did "uname -a"

Once this is installed, you should then check the /usr/src/dir and see
what the folder is called. The name is important.

When you build pcmcia-cs you must make a decision:
1) Will you be the one that maintains the pcmcia-cs?
2) Will you want to have Debian do it?

Advantage of 1 is that you can get the latest and greatest whenever you want.
Disadvantage of 1 is there is a lot of initial setup.

Advantage of 2 is that it is little work
Disadvantage of 2 is that you may not have the latest support for all
pcmcia hardware.

There is work involved in going with yout own pcmcia:

1: you will want to have your own script
# cp /etc/init.d/pcmcia* /etc/init.d/pcmcia-cs-custom
then edit /etc/init.d/pcmcia-cs-custom and do a global search and replace
of "/usr" with "/usr/local" (this way you can install your pcmcia into
/usr/local/sbin and /usr/local/bin (etc) and not worry about a systm
mistake breaking it for you.)

(We assume you installed your debian kernel source for the version you are
running. I'll assume that it was installed in /usr/src/linux-2.4.18-9) )

2: you will need to build your pcmcia-cs:
# cd /usr/local/src/pcmcia-cs-3.2.4/
# make clean
# ./Configure --current --kernel=/usr/src/linux-2.4.18-9 --arch=i386
--trust --cardbus --pnp --apm

--current tells pcmcia "configure" to read the kernel options from the
presently running kernel while the --kernel specifies kernel source for
ref of the proper kernel headers.
You should not need to specify --arch=386, but it is there if you want
--trust permits you to enable trusting version of pcmcia-cs (see pcmcia
help) If you dont want: --notrust
--cardbus is if your pcmcia hardware is 32-bit cardbus. If you have it,
enable it, if not then set to --nocardbus
--pnp is nice as it enabled pnp support and make stuff work better inmost
cases. (IMHO)
--apm is also useful, but you may want to disable --noapm

3: build
After done with configure:
# make all

4: install
if it works:
# make install

It should install to /usr/local/.....

5: test
to test it:
# /etc/init.d/pcmcia-cs stop
(or whetever the old script's name was)
# /etc/init.d/pcmcia-cs-custom start
# ps -auxw | grep -i card
Does it show a card service running from /usr/local/.... ?
If so, then the new one appears to be running

Test cards. Do they work? If so, go on...

6: convert system to start YOUR NEW COPY instead of the regular system one:
You can then visit /etc/rc?.d and set the symlinks for starting your new
script with the "S" and "K" options (S=start, K= stop : based ont
runlevel)

an example:
# cd /etc
# for i in rc?.d/?[0-9][0-9]*pcmci* ; do ln -s ../init.d/pcmcia-cs-custom
${i}-custom ; rm $i ; done
is a simple script that I think will delete the symlinks to the old pcmcia
services, and create new ones to your new script to have it startup
properly on reboot.
verify:
# ls -l rc?.d/*pcmcia*
you should see a bunch of symlinks (one per rc folder) now pointing to
"../init.d/pcmcis-cs-custom"
# less rc0.d/*pcmcia*
should show you the contents of your new start/shutdown script.

# 7: uninstall the system based pcmcia-cs:
now you can probably stop the present pcmcia-cs-custom:

Then, uninstall the system's pcmcia-cs.
(left to you)

# 8: restart your pcmcia-cs-custom services:
Then restart your custom-cs:
# /etc/init.d/pcmcia-cs-custom start



More information about the talk mailing list