《2022年linux...中将中星微zc摄像头驱动配置成.ko模块 .pdf》由会员分享,可在线阅读,更多相关《2022年linux...中将中星微zc摄像头驱动配置成.ko模块 .pdf(7页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、本文由中国嵌入式爱好者QQ 群整理,转载请注明出处:QQ群:24386694 本人在 2012 年成功的将中星微zc301 摄像头驱动移植到linux2.6.19内核中,并且摄像头采集的视频通过arm 开发板可以顺利由UDP 传送到电脑客户端进行显示。时隔 2 年多,由于最近想认真的研究下视频传输,所以再次的将中星微驱动配置成.ko 模块,插入到linux2.6.32.2内核中,具体过程如下。首先配置内核:make menuconfig Device Drivers -Multimedia support -Video For Linux *Video capture adapters -*V
2、4L USB devices -GSPCA based webcams -ZC3XX USB Camera Driver 保存退出make zImage 名师资料总结-精品资料欢迎下载-名师精心整理-第 1 页,共 7 页 -make modules make modules_install 将生成的 gspca_zc3xx.ko拷入开发板中,如果找不到此模块,可以用命令进行查找,具体如下rootlocalhost linux-2.6.32.2#find-name*.ko./drivers/media/video/v4l1-compat.ko./drivers/media/video/gspc
3、a/gspca_vc032x.ko./drivers/media/video/gspca/gspca_sn9c20 x.ko./drivers/media/video/gspca/gspca_main.ko./drivers/media/video/gspca/gspca_sq905c.ko./drivers/media/video/gspca/stv06xx/gspca_stv06xx.ko./drivers/media/video/gspca/gspca_spca508.ko./drivers/media/video/gspca/gspca_mr97310a.ko./drivers/med
4、ia/video/gspca/gspca_sonixj.ko./drivers/media/video/gspca/gspca_conex.ko./drivers/media/video/gspca/gspca_finepix.ko./drivers/media/video/gspca/gspca_zc3xx.ko./drivers/media/video/gspca/gspca_sunplus.ko./drivers/media/video/gspca/gspca_mars.ko./drivers/media/video/gspca/gspca_ov534.ko./drivers/media
5、/video/gspca/gspca_spca500.ko 名师资料总结-精品资料欢迎下载-名师精心整理-第 2 页,共 7 页 -./drivers/media/video/gspca/gspca_spca505.ko./drivers/media/video/gspca/gspca_jeilinj.ko./drivers/media/video/gspca/gl860/gspca_gl860.ko./drivers/media/video/gspca/gspca_spca561.ko./drivers/media/video/gspca/gspca_stk014.ko./drivers/m
6、edia/video/gspca/gspca_spca501.ko./drivers/media/video/gspca/gspca_tv8532.ko./drivers/media/video/gspca/gspca_spca506.ko./drivers/media/video/gspca/gspca_etoms.ko./drivers/media/video/gspca/gspca_sonixb.ko./drivers/media/video/gspca/gspca_pac207.ko./drivers/media/video/gspca/gspca_pac7311.ko./driver
7、s/media/video/gspca/m5602/gspca_m5602.ko./drivers/media/video/gspca/gspca_ov519.ko./drivers/media/video/gspca/gspca_t613.ko./drivers/media/video/gspca/gspca_sq905.ko./drivers/media/video/v4l2-common.ko./drivers/media/video/v4l2-int-device.ko./drivers/media/video/videodev.ko./drivers/media/video/s3c2
8、440camera.ko./drivers/media/video/uvc/uvcvideo.ko./drivers/media/common/tuners/tda8290.ko 名师资料总结-精品资料欢迎下载-名师精心整理-第 3 页,共 7 页 -./drivers/media/common/tuners/tea5761.ko./drivers/media/common/tuners/tuner-simple.ko./drivers/media/common/tuners/tuner-xc2028.ko./drivers/media/common/tuners/tuner-types.ko
9、./drivers/media/common/tuners/mc44s803.ko./drivers/media/common/tuners/mt20 xx.ko./drivers/media/common/tuners/xc5000.ko./drivers/media/common/tuners/tda9887.ko./drivers/media/common/tuners/tea5767.ko./drivers/scsi/scsi_wait_scan.ko./drivers/char/mini2440_hello_module.ko rootlocalhost linux-2.6.32.2
10、#在开发板中,插入gspca_zc3xx.ko模块,rootFriendlyARM/opt#insmod gspca_zc3xx.ko gspca_zc3xx:Unknown symbol gspca_frame_add gspca_zc3xx:Unknown symbol gspca_debug gspca_zc3xx:Unknown symbol gspca_disconnect gspca_zc3xx:Unknown symbol gspca_dev_probe insmod:cannot insert gspca_zc3xx.ko:unknown symbol in module or
11、 invalid para meter 名师资料总结-精品资料欢迎下载-名师精心整理-第 4 页,共 7 页 -发现,在插入 gspca_zc3xx.ko模块之前,需要插入其他模块。所以,将生成的scsi_wait_scan.ko v4l1-compat.ko v4l2-common.ko v4l2-int-device.ko videodev.ko 都拷入开发板,依次进行插入rootFriendlyARM/opt#insmod scsi_wait_scan.ko rootFriendlyARM/opt#insmod v4l1-compat.ko rootFriendlyARM/opt#ins
12、mod v4l2-int-device.ko rootFriendlyARM/opt#insmod videodev.ko Linux video capture interface:v2.00 rootFriendlyARM/opt#insmod gspca_main.ko gspca:main v2.7.0 registered rootFriendlyARM/opt#insmod gspca_zc3xx.ko gspca:probing 0ac8:301b zc3xx:probe 2wr ov vga 0 x0000 zc3xx:probe sensor-0011 zc3xx:Find
13、Sensor HV7131R(c)gspca:probe ok usbcore:registered new interface driver zc3xx zc3xx:registered rootFriendlyARM/opt#名师资料总结-精品资料欢迎下载-名师精心整理-第 5 页,共 7 页 -将摄像头拔下再插入,出现以下信息rootFriendlyARM/opt#usb 1-1.2:USB disconnect,address 3 gspca:disconnect complete usb 1-1.4:new full speed USB device using s3c2410-oh
14、ci and address 4 usb 1-1.4:New USB device found,idVendor=0ac8,idProduct=301b usb 1-1.4:New USB device strings:Mfr=1,Product=2,SerialNumber=0 usb 1-1.4:Product:PC Camera usb 1-1.4:Manufacturer:Vimicro Corp.usb 1-1.4:configuration#1 chosen from 1 choice gspca:probing 0ac8:301b zc3xx:probe 2wr ov vga 0 x0000 zc3xx:probe sensor-0011 zc3xx:Find Sensor HV7131R(c)gspca:probe ok rootFriendlyARM/opt#说明,中星微在linux2.6.32.2中已成功配置成.ko 模块.名师资料总结-精品资料欢迎下载-名师精心整理-第 6 页,共 7 页 -欢迎各位开发者加入中国嵌入式爱好者群,共同探讨 QQ 群:24386694 名师资料总结-精品资料欢迎下载-名师精心整理-第 7 页,共 7 页 -