4.编译内核,make menuconfig -> make bzImage -> make modules
5.ok之后在$(KERNEL)/driver/usb/spca5xx中可以找到spca5xx.o,在加载到arm之前首先加载videodev.o
另外,在PC机上的RH9 2.4.20-8编译spca5xx的驱动时发现一个bug,解决一下
如果直接编译,提示出错:
出现错误信息
[root@126 spca5xx-20060402]# make
Compiling drivers/usb/spca5xx.c
In file included from /lib/modules/2.4.20-8/build/include/linux/vmalloc.h:8,
from drivers/usb/spca5xx.c:46:
/lib/modules/2.4.20-8/build/include/linux/highmem.h: In function `bh_kmap':
/lib/modules/2.4.20-8/build/include/linux/highmem.h:20: warning: pointer of type
`void *' used in arithmetic
drivers/usb/spca5xx.c: In function `spca5xx_mmap':
drivers/usb/spca5xx.c:5131: warning: passing arg 1 of `remap_page_range_R2baf18f
2' makes pointer from integer without a cast
drivers/usb/spca5xx.c:5131: incompatible type for argument 4 of `remap_page_rang
e_R2baf18f2'
drivers/usb/spca5xx.c:5131: too few arguments to function `remap_page_range_R2ba
f18f2'
打开源码spca5xx.c中的spca5xx_mmap,可以发现在这个函数的调用上RH9和RH9以上的版本调用的都不是同一条函数,在remap_page_range()函数的第一个参数对于RH9就没有做定义,为定义情况下在RH9调用remap_page_range()就缺少了第一个参数的描述,一个小bug在这里,只要在出错的remap_page_range参数添加第一个参数,设为0,编译就通过了,还有几个warming可以忽略....