Re: pcmcia not working

From: Lenard (lenard_at_127.0.0.1)
Date: 11/05/03


Date: Wed, 05 Nov 2003 13:01:29 GMT

On Tue, 04 Nov 2003 17:29:14 +0000, A. S. Budden typed:

> Hi there,
>
> I've just installed RH9 on my laptop, but I can't get pcmcia to work.
> When it starts, I get the following on the screen (if started with
> service pcmcia start):

Yep, the pcmcia support for Red Hat Linux 9 is spotty at best.

> I've tried searching the web for help with this and I've found a few
> other people have had this problem, but I couldn't find a solution that
> worked.

You didn't look hard enough maybe.

> Can anyone offer any help with this please?

Method One;

Locate from the CD's or Download and install the
kernel-pcmcia-cs-3.1.31-13.i386.rpm package if not already installed.

Then edit /etc/rc.d/init.d/pcmcia you need to remove the .o extensions on
lines 107-9.

Method Two;

You need the kernel-source RPM package for your current kernel installed
and you need to remove the kernel-pcmcia-cs RPM package. If your kernel is
newer than what's available on the CD-ROM, then you can download the
kernel-source RPM from Red Hat, or many other places available on the
Internet, rpmfind.net is a good place to look.

The current version of the Red Hat Linux kernel and kernel-source RPM's
is; 2.4.20-20.X (where X equals your version of Red Hat Linux)

To install the RPM package first mount the CDROM as root, from the console
or xterm session; (Press the Enter key after keying in the commands)

>From the CD;
Type; mount /dev/cdrom
Type; rpm -Uvh /mnt/cdrom/RedHat/RPMS/kernel-source-2.4.20-8.i386.rpm

>From download where the RPM package is located; Type; rpm -Uvh
kernel-source-<version_number>.i386.rpm

You also need to remove the kernel-pcmcia-cs-3.1.31-13.i386.rpm package.
As root type; rpm -e kernel-source

>From download where the RPM package is located; Type; rpm -Uvh
kernel-source-<version_number>.i386.rpm

Download and unpack the pcmcia-cs-3.2.4.tar.gz available at;
http://pcmcia-cs.sourceforge.net/

>From the console or xterm session from the location you stored the
downloaded pcmcia-cs-3.2.4 package;

Type; tar -zxpvf pcmcia-cs-3.2.4.tar.gz

Type; cd pcmcia-cs-3.2.4

Type; ./Configure --force --extraver=<version_number>

If you don't to this then it will use <version_number>custom as the kernel
source tree. Use the version_number of your actual kernel.

Answer the following questions like the examples below;

kernel source directory is: /usr/src/linux-2.4

build trusting versions: n

include 32-bit cardbus support: y

PnP BIOS resource checking: n

Module install dir: /lib/modules/<version_number> (Example:
/lib/modules/2.4.20-20.9)

Now as root(if your not already);

Type; make all
Type; make install

In /etc/sysconfig/pcmcia, you should have;

PCMCIA=yes
PCIC=i82365
PCIC_OPTS=
CORE_OPTS=
CARDMGR_OPTS=

You can check with the command; cat /etc/sysconfig/pcmcia

If not, using your choice of editor, edit the file and make any needed
changes.

You can test this, as root(Red Hat 8/9 specific);

service pcmcia stop
remove and pcmcia cards installed
service pcmcia start
insert pcmcia card(s)

Special case, you see the error;
PCI: no irq known for interrupt pin A of device...XXXXXX. Please try using
pci=biosirq.

All the RPM kernel versions for RH9 that I have seen have the same problem
with some PCMCIA Controllers and laptop BIOS's. Red Hat has back-ported
some features from the 2.5.XX (future 2.6/3.0???) kernel into these
kernels and have made other changes with pcmcia support that are not
supported well in these cases. If you upgrade the kernel(via RPM) then you
still need to modify/change the pcmcia support for the new kernel.

In addition do not boot your laptop with any pcmcia cards installed. When
the system is done booting and your ready to log on, insert your pcmcia
card(s).

Method Three (Creating your own custom kernel without PCMCIA support);

Using the Red Hat Linux 9 for this method;

As root, from the console or xterm session; Install the kernel-source RPM
package for your kernel version. This is located on the second RH9 CD in
/mnt/cdrom/RedHat/RPMS directory you will find the file;

kernel-source-2.4.20-8.i386.rpm

To install the RPM package first mount the CDROM; (Press the Enter key
after keying in the commands)

Type; mount /dev/cdrom
Type; rpm -Uvh /mnt/cdrom/RedHat/RPMS/kernel-source-2.4.20-8.i386.rpm
Type; cd /usr/src/linux-2.4

It is important that kernel build starts with the source tree in a known
condition.

Type; make mrproper
Type; make xconfig

This open an xterm kernel configuration screen that you can use to
customize your kernel.

Click on the Load configuration from File button

This will open a new window, in this window type in the following;
/usr/src/linux-2.4.20-8/configs/kernel-2.4.20-i686.config

Note: replace '-i686' to match your CPU requirments and or needs

Click on the OK button

The window will close and you will be back at the kernel configuration
screen.

Click on the General setup button
(new window will open)

Click on the PCMCIA/CardBus support button (new window will open)

Click on the n next to the top choice of PCMCIA/CardBus support

Click on the OK button
(window closes)

Click on the Main Menu button
(window closes)

Click on the Save and Exit button
(window closes)

You now should be ready to build a new kernel with kernel PCMCIA support
disabled, now you can build it.

Type; make dep
Type; make clean
Type; make bzImage
Type; make modules

This will take a fair amount of time, don't worry, be patient, have a
drink and maybe something to eat!

Type; make modules_install
Type; make install

This will write a new kernel boot option in grub, the one you just
finished building and just installed.

Reboot your system and select the; Red Hat Linux (2.4.20-8custom) boot
option and follow the 'method two' instuctions starting from downloading
the pcmcia source package.

Further help and reading can be found here;

http://www.linuxselfhelp.com/HOWTO/Kernel-HOWTO.html
http://pcmcia-cs.sourceforge.net/ftp/doc/PCMCIA-HOWTO.html

-- 
SCO + RICO Act = Justice
             Hi!  I'm a .sig virus!  Copy me to your .sig!