impossible to compile GPR400 PCMCIA driver on 2.6 kernel?
Clement Seveillac
clement at nist.gov
Fri Nov 14 17:52:35 GMT 2003
Hello,
I have tried hard to compile a PCMCIA smart card driver on my 2.6 linux
kernel, without even getting close. I would like to know if this goal if
even reachable :-)
My configuration:
hardware:
- IBM Thinkpad T40 (2373-19U) laptop: the reason why I prefer to use a
2.6 kernel (works perfectly, whereas APM or other features are almost
impossible to have on 2.4.*)
- Gemplus GPR400 (aka GemPC400) PCMCIA smart card reader
software:
- linux kernel 2.6.0-test9
- debian unstable (aka sid)
pcmcia-cs package:
- either the latest pre-3.2.6 snapshot (pcmcia-cs.09-Nov-03), the debian
sid source versions (3.2.5-1 or 3.2.5-2), or the 3.1.17 (tested with the
following code)
GPR400 driver source code:
- either jaiger's latest driver (gpr400_cs-0.9.7) or MUSCLE project
latest driver (card-0.9.6.tar.gz), uncompressed into pcmcia-cs source
directory as they have to.
My problems:
- pcmcia-cs needs PCMCIA support enabled in 2.5/2.6 kernels (see message
[1]), but when it is enabled (CONFIG_PCMCIA=m) it won't try to compile
drivers modules. (see [2] and [3])
[1] when PCMCIA is not configured and we run `make config`, it says:
"2.5.0 and later kernels require that PCMCIA be configured in the kernel
source tree. To fix, reconfigure and rebuild your kernel with PCMCIA
enabled."
[2] `make config' displays this warning:
** Your kernel is configured with PCMCIA driver support. Therefore,
** 'make all' will compile the PCMCIA utilities but not the drivers.
** See README-2.4 if this is not what you intended!
[3] `make' stops before trying to compile gpr400_cs.c:
make[1]: Entering directory `/usr/src/sc/pcmcia-cs-3.2.6'
make -C modules MODULES=gpr400_cs.o
make[2]: Entering directory `/usr/src/sc/pcmcia-cs-3.2.6/modules'
Your kernel is already configured with PCMCIA support.
- I really wanted my module so I tried to compile it anyway :-)
But there were another errors (e.g.
/usr/src/linux/include/asm/module.h:52:2: #error unknown processor
family, or if I set manualy CONFIG_MPENTIUMIII (my thinkpad has a
Pentium M):
error: variable `gpr400_chr_fops' has initializer but incomplete type
[...]
gpr400_cs.c:375: error: structure has no member named `release'
Then:
- Do I have to assume pcmcia-cs cannot build drivers anymore (for 2.6
kernels), and must it be used only for its other tools?
- Or is there a way to get it to compile a gpr400 kernel module? (I
don't know if 2.6 kernel can still use .o modules, since their new
modules seem to work differently and are named .ko)
- How difficult would it be to modify the source code of gpr400 driver
so it would work as a 2.6 kernel driver? (in linux/drivers/pcmcia)
- Finally, would you know some smart card PCMCIA (or maybe USB) readers
that could be well supported on linux 2.6 kernels?
Many thanks in advance,
--
clem
More information about the linux-pcmcia
mailing list