« Sunday is blog Day | Tuesday Night is Blog Night, an Emo poem » |
If you aren't interested in webcam drivers for Centos 4 then skip this blog entry and go to the next one, you have been warned.
This week we spent some time getting a webcam working on Linux. A camera that worked fine on Debian Etch using the the Linux kernel webcam driver called gspca wouldn't work on Centos 4.4 and by extention Redhat 4.4 because the kernel is too far behind the bleeding edge. Updating kernels from 2.6.9 to the 2.16.16 just seemed like too daunting a prospect. It turned out that when we compiled the latest driver version from Linux kernel webcams Driver SPCA / SPCA5xx there was only one unsatisfied dependency. A little more digging and we came up with the equivalent call in our kernel version. To assist those others who run into this problem I have copied the required change below.
// remap_pfn_range is not in the 2.6.9 kernel
// if (remap_pfn_range
// (vma, start, page >> PAGE_SHIFT, PAGE_SIZE, PAGE_SHARED)) {
// up(&spca50x->lock);
if (remap_page_range
(vma, start, page, PAGE_SIZE, PAGE_SHARED)) {
up(&spca50x->lock);
Thanks to all the hard working people who created this driver without much support from the camera or chipset manufacturers.
To assist those who may be typing their error message into a search engine I have included the error message text below.
/home/wayne/gspcav1-20070110/gspca_core.c: In function `spca5xx_mmap':
/home/wayne/gspcav1-20070110/gspca_core.c:2502: warning: implicit declaration of function `remap_pfn_range'
LD [M] /home/wayne/gspcav1-20070110/gspca.o
Building modules, stage 2.
MODPOST
*** Warning: "remap_pfn_range" [/home/wayne/gspcav1-20070110/gspca.ko] undefined!