Search:  
Gentoo Wiki

HARDWARE_PCMCIA_NIC

This article is part of the Hardware series.
Laptops TV Tuner Cards Wireless Servers Storage Other Hardware Motherboards Related
Note: This guide about pcmcia-cs is deprecated in favour of the new guide about pcmciautils.

Contents

Preface

Assumptions:

ie if you didn't 'emerge pcmcia-cs' then this same command which has to be repeated later won't work now - you have no network set up! By emerging it before you've downloaded the sources necessary to install it. If you didn't, go to the end for a quick how-to.

eg for me it's a symlink to /usr/src/linux-2.4.19-gentoo-r10 and you can check this using 'ls -l /usr/src/linux' and, if needed, correct it using 'ln -sf /usr/src/linux-your-version /usr/src/linux'

Kernel preparation: 2.4

# cd /usr/src/linux 
# make menuconfig

For the 2.4 kernel, we will use the pcmcia-cs drivers instead of the in-kernel ones, so make sure they're de-selected:

Linux Kernel Configuration: PCMCIA/CardBus
General setup --->
  PCMCIA/CardBus support --->
    < > PCMCIA/CardBus support

If you had to modify your kernel's settings, save your configuration and rebuild your kernel as follows:

Saving your kernel configuration... 


*** End of Linux kernel configuration. 
*** Check the top-level Makefile for additional configuration. 
*** Next, you must run 'make dep'. 

# make dep && make clean bzImage modules modules_install

Once this is complete (~30 mins or less) then you need to move it. You'll need to mount /boot if you haven't already done so. If you are mounting your /boot, you'll need to substitute 'hda1' with whatever device you use as your boot partition.

 # mount /dev/hda1 /boot 
 # cd /boot 
 # mv bzImage bzImage.old 
 # cp /usr/src/linux/arch/i386/boot/bzImage . 
 # cd / 
 # umount /boot

Kernel preparation: 2.6

you MUST have PCMCIA active or else building pcmcia-cs will fail.

Linux Kernel Configuration: PCMCIA/CardBus
Bus options (PCI, PCMCIA, EISA, MCA, ISA) --->
  PCCARD (PCMCIA/CardBus) support --->
    <*> PCCard (PCMCIA/CardBus) support

Now, select the drivers for your card. Example:

Linux Kernel Configuration: PCMCIA NIC Drivers
Device Drivers  --->
 Network device support  --->
  Wireless LAN (non-hamradio)  --->
   [*] Wireless LAN drivers (non-hamradio) & Wireless Extensions
   <M>   Hermes chipset 802.11b support (Orinoco/Prism2/Symbol)

If you had to modify your kernel's settings, save your configuration and rebuild your kernel as follows:

Saving your kernel configuration... 


*** End of Linux kernel configuration. 
*** Execute 'make' to build the kernel or try 'make help'.

 # make && make modules_install

Once this is complete (~30 mins or less) then you need to move it. You'll need to mount /boot if you haven't already done so. If you are mounting your /boot, you'll need to substitute 'hda1' with whatever device you use as your boot partition.

 # mount /dev/hda1 /boot 
 # cd /boot 
 # mv bzImage bzImage.old 
 # cp /usr/src/linux/arch/i386/boot/bzImage . 
 # cd / 
 # umount /boot

Alternatively, run 'make install' to automatically copy the kernel and run lilo or grub.

(Re)Install pcmcia-cs

# emerge pcmcia-cs 
# rc-update add pcmcia boot

NOTE: pcmcia-cs modules are separated for 2.4 kernel so it is necessary to emerge them separtely:

# emerge pcmcia-cs-modules

Prepare configuration files

Now we need to make sure the appropriate modules are loaded when the computer boots:

# nano -w /etc/modules.autoload

or in kernel 2.6

# nano -w /etc/modules.autoload.d/kernel-2.6

This file, as indicated by it's name, loads modules automatically. For pcmcia you'll need either 'i82365' or 'i82092' compatable bridge support - depending upon which worked for you during the initial installation - and 'ds' (drive service). For most of us it's 'i82365', so substitute if with i82092 below if that's what you need.
Note the omission of pcmcia_core.

File: /etc/modules.autoload
# /etc/modules.autoload:  kernel modules to load when system boots. 
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/modules.autoload,v 1.5 2002/$ 
# 
# Add the names of modules that you'd like to load when the system 
# starts into this file, one per line.  Comments begin with a # and 
# are ignored.  Read man modules.autoload for additional details 

# For example: 
# 3c59x 

# Here we'll put our relevant pcmcia modules 
i82365 
ds

Finally, make sure you have the right information in the /etc/conf.d/net configuration file. As per usual you'll have to substitute information relevant to your network over mine:

# nano -w /etc/conf.d/net 
File: /etc/conf.d/net
# In this file we'll need the following correct definitions: 
#     iface_eth0 
#     gateway 

# Note the similarity between this and the ifconfig command! 
iface_eth0="10.0.0.130 broadcast 10.0.0.255 netmask 255.255.255.0" 

# The gateway definition was definited during the installation by the 
# route command, and the 'netmask 0.0.0.0 metric 1' is assumed 
gateway="eth0/10.0.0.5"

That's it! Reboot and hopefully it should work!

If it's still not working...

Check that your card is supported on the pcmcia-cs support cards list. Did you correctly create resolv.conf? Check it anyway:

#nano -w /etc/resolv.conf 
File: /etc/resolv.conf
# nameservers go here but I shall not show mine for legal reasons! 
# so these are rather made up 
nameserver 123.1.2.3 
nameserver 1.2.3.123

Did you add eth0 using rc-update, as the installation doc told you to? The following will output an explicit statement if you already have:

# rc-update add net.eth0 default

Double-check /etc/conf.d/net for typos - I find they're easier to make than they are to spot.

Check your modules loaded correctly, check yours is similar to mine with lsmod:

# lsmod 
Module              Size  Used by     Not tainted 
serial_cs           7344    0  (unused) 
xirc2ps_cs         16740    1 
ds                  7112    2  [serial_cs xirc2ps_cs] 
i82365             26976    2 
pcmcia_core        43520    0  [serial_cs xirc2ps_cs ds i82365]

Check cardmgr is loaded:

# ps -C cardmgr 
   PID TTY          TIME CMD 
  2416 ?        00:00:00 cardmgr

I've tried to be as comprehensive as possible. Any other ideas, please suggest!

anz suggest this tip: I had the problem that the modules could not be found (... no i82365 and ds). But it worked after:

env-update 
source /etc/profile 
ldconfig 
update-modules force

Getting pcmcia-cs

If you forgot to emerge it during the initial installation procedure, don't worry, it's easy to get it. You can find out what version of pcmcia-cs your gentoo wants fairly easily:

# emerge -p pcmcia-cs

You need to find it's url on a gentoo mirror. Then reboot and use the liveCD to boot, mount your partition and wget it into /mnt/gentoo/usr/portage/distfiles.

Replace /dev/hda3 by your main gentoo partition, if it differs.

# mkdir /mnt/gentoo 
# mount /dev/hda3 /mnt/gentoo
# cd /mnt/gentoo/usr/portage/distfiles 
# wget http://path/to/pcmcia-cs

Then take out the liveCD, boot back into your gentoo installation, and:

# emerge pcmcia-cs

Then resume.

Credits

Original Gentoo Forum Post by Charles Goodwin (aka charlieg)
Original Gentoo Forum Post by anz
Original Gentoo Forum Post by el_Salmon

See Also

Wireless/Configuration

Feedback

Concern or Compliments? please use our Concerns or Compliments? Please use the Discussion section. page.

Retrieved from "http://www.gentoo-wiki.info/HARDWARE_PCMCIA_NIC"

Last modified: Fri, 29 Aug 2008 04:31:00 +0000 Hits: 27,429