PCMCIA/udev help

support support at cslimits.net
Wed Sep 12 22:06:41 PDT 2007


> ... I just installed LFS 6.3 on an old laptop (Dell
> Latitude CPi D300XT). My network interface is a Xircom Ethernet 10/100 and
> 56k modem combo PCMCIA card. It worked fine with the LFS LiveCD, but when I
> booted into the new LFS system, I get an "eth0 doesn't exist" message on
> bootup.

Well, at least you know the hardware works without any esoteric driver(s), 
etc.; could be worse... 

> I've double-checked that all the PCMCIA and Xircom items are set in the
> kernel (it's all compiled in; no modules). Looking at dmesg, the bridge
> appears to be detected fine. In addition, when I remove/insert the card, I
> get a message like "pccard: PCMCIA card inserted into slot 0". So it looks
> like I'm almost there. What am I missing?

I would boot up with the live CD and start by looking to see if there's an 
"alias eth0" line in /etc/modprobe.conf; I'm not sure if they have one there 
or not).  For ex. an Intel e-net pro 10/100 NIC uses the e100 driver; it 
also uses the mii.ko driver but modprobe is smart enough to figure that part 
out).  So, /etc/modprobe.conf would contain: 

alias eth0 e100 

You can see what modules your NIC depends on using "modinfo". From there, 
lsmod | grep e100, lsmod | grep mii, etc.; try to determine what, exactly, 
is being loaded. 

> The PCMCIA howto
> (http://kernel.org/pub/linux/utils/kernel/pcmcia/howto.html) suggests that
> I may need to set a "resource database", but doesn't really say how to go
> about doing that. 
> If it's more likely on the udev side,
> /etc/udev/rules.d/70-persistent-net.rules says: 
> SUBSYSTEM=="net", DRIVERS="?*", ATTRS{address}=="00:10:a4:02:f5:6b",
> NAME="eth0" 
> Pretty sure that's the right MAC address. I can provide more info from
> running under the LiveCD... I just don't know what info would be useful.

I would try running "udevmonitor" - start it without the card being in the 
system, then fire up udevmonitor, then plug the card in - dump the whole 
thing to a file; there will be a <lot> of output.  Something like: 

udevmonitor 2>&1 | tee out.dat 

ought to work.  I would also run udevinfo against anything related to the 
card; if you're not familiar w its syntax it can be somewhat daunting to 
become so, but I think you'll find it worth the time & aggrivation.  A quick 
example - if I have a USB device, I could start off with: 

cat /proc/bus/usb/devices 

That would dump several lines for everything attached to the machine via the 
USB; I would find the one I wanted, say, for ex it was this one: 

T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  3 Spd=1.5 MxCh= 0
D:  Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0764 ProdID=0501 Rev= 0.01
S:  Manufacturer=CPS
S:  Product= CP 1300D
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 50mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID  ) Sub=00 Prot=00 Driver=usbhid
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=10ms 

which tells me I want to look at /proc/bus/usb/001/003 (the 001 is from the 
"Bus=01", the 003 from the "Dev#=  3").  So one udevinfo query that should 
produce useful results is: 

udevinfo -a -n bus/usb/001/003 

If you do this on the live CD you should eventually find something that 
triggers some other action; using my USB NIC for an example, that something 
is this rule: 


which states that udev should run the specified program "if the action it's 
processing is an 'add', and it occurred on the USB bus, and the driver 
involved is 'prism2_usb.ko'".  Without that, the adapter won't work, 
irregardless of whether I have its driver modprobed or built into the kernel 
or not; in this case, building the module into the kernel would actually 
cause this setup to not work correctly because of the way that the rule is 

You should be able to tell how the kernel on the CD was built by looking in 
/boot; there should be a file named config-something or similar; it'll 
contain all the "CONFIG_USETHIS=Y" generated by "make menuconfig" et al. 

You've got the card manager daemon running (cardmgr), right?  It uses its 
own "config.opts" file - which it calls a resource file - you have to set 
various options for cards in it...  I would check the setup you have against 
the one on the cd (and make sure the daemon's running). 

Hopefully, that will help you uncover what, exactly, it is that isn't 
happening; with any luck, whatever "it" is - and keep in mind that there may 
be more than one "it" - will become apparent fairly quickly. 

 - Larry

More information about the lfs-support mailing list