Comedi and old kernels

How much effort do you think it is worth investing trying to get Comedi 
to build for 2.2 and 2.0 kernels?

Here are a couple of problems I've accounted so far in my attempt to 
build against an old Red Hat 2.2.16 kernel, but I don't think these 
particular problems are specific to Red Hat kernels:

1. The kernel's include files are included before the compatibility 
headers.  This is because the main kernel include directory -I option is 
present in LINUX_CC instead of LINUX_CFLAGS.

2. The pcmcia stuff isn't integrated into the kernel sources, so there 
is no include/pcmcia directory.  The include/linux/device.h 
compatibility header has a #include <pcmcia/cs_types.h> which failed 
because of this.  Maybe some way to configure the path to the pcmcia-cs 
sources is required along with a conditional compilation option to 
prevent <pcmcia/cs_types.h> being included altogether when Comedi is 
configured with the --disable-pcmcia option.

3. Assuming comedi could be persuaded to build, there are some run-time 
problems that will need fixing.  The one that springs to mind is the 
recend replacement of the 'pci_for_each_device' loops with 
'pci_find_device' and later with 'pci_get_device'.  The problem is that 
the version of 'pci_find_device' included in 2.2 kernels does not 
understand the 'PCI_ANY_ID' wildcard, so it will try (and fail) to find 
a device matching this literal value (0xFFFF I think).  The wildcard 
tests in 'pci_find_device' weren't added until 2.3.7.  That one should 
be easy enough to fix with some compatibility header code.

-- 
-=( Ian Abbott _at_ MEV Ltd.    E-mail: <abbotti_at_mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-

Received on 2005-06-27Z14:27:36