gspca摄像头驱动的移植的问题,求教!

arcadyan_s 2011-07-15 07:02:46
Kernel version :2.6.35.30
Crosstool :arm-linux-gcc-4.3.2
Board :FS2410
System :ubuntu 10.8
Source :gspcav1-20071224

错误消息如下:

CC drivers/media/video/gspcav1/gspca_core.o
In file included from drivers/media/video/gspcav1/gspca_core.c:847:
drivers/media/video/gspcav1/utils/spcausb.h: In function 'spca5xxRegRead':
drivers/media/video/gspcav1/utils/spcausb.h:95: error: implicit declaration of function 'info'
drivers/media/video/gspcav1/utils/spcausb.h: In function 'spca_set_interface':
drivers/media/video/gspcav1/utils/spcausb.h:278: error: implicit declaration of function 'warn'
In file included from drivers/media/video/gspcav1/gspca_core.c:855:
drivers/media/video/gspcav1/Sunplus-jpeg/sp5xxfw2.h: In function 'sp5xxfw2_init':
drivers/media/video/gspcav1/Sunplus-jpeg/sp5xxfw2.h:122: error: called object 'info' is not a function
drivers/media/video/gspcav1/Sunplus-jpeg/sp5xxfw2.h:136: error: called object 'info' is not a function
drivers/media/video/gspcav1/Sunplus-jpeg/sp5xxfw2.h:141: error: called object 'info' is not a function
drivers/media/video/gspcav1/Sunplus-jpeg/sp5xxfw2.h:148: error: called object 'info' is not a function
drivers/media/video/gspcav1/Sunplus-jpeg/sp5xxfw2.h:176: error: called object 'info' is not a function
drivers/media/video/gspcav1/Sunplus-jpeg/sp5xxfw2.h: In function 'sp5xxfw2_start':
drivers/media/video/gspcav1/Sunplus-jpeg/sp5xxfw2.h:214: error: called object 'info' is not a function
drivers/media/video/gspcav1/Sunplus-jpeg/sp5xxfw2.h:230: error: called object 'info' is not a function
drivers/media/video/gspcav1/gspca_core.c: In function 'spca5xx_ioctl':
drivers/media/video/gspcav1/gspca_core.c:2465: error: implicit declaration of function 'video_usercopy'
drivers/media/video/gspcav1/gspca_core.c: At top level:
drivers/media/video/gspcav1/gspca_core.c:2611: error: unknown field 'owner' specified in initializer
drivers/media/video/gspcav1/gspca_core.c:2611: warning: initialization from incompatible pointer type
drivers/media/video/gspcav1/gspca_core.c:2613: error: unknown field 'type' specified in initializer
drivers/media/video/gspcav1/gspca_core.c:2617: warning: initialization from incompatible pointer type
drivers/media/video/gspcav1/gspca_core.c: In function 'spca50x_create_sysfs':
drivers/media/video/gspcav1/gspca_core.c:2771: error: implicit declaration of function 'video_device_create_file'
drivers/media/video/gspcav1/gspca_core.c:2782: error: implicit declaration of function 'video_device_remove_file'
drivers/media/video/gspcav1/gspca_core.c: In function 'spca5xx_probe':
drivers/media/video/gspcav1/gspca_core.c:4303: error: incompatible types when assigning to type 'struct device' from type 'struct device *'
make[4]: *** [drivers/media/video/gspcav1/gspca_core.o] 错误 1
make[3]: *** [drivers/media/video/gspcav1] 错误 2
make[2]: *** [drivers/media/video] 错误 2
make[1]: *** [drivers/media] 错误 2
make: *** [drivers] 错误 2
...全文
395 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
武溪嵌人 2014-03-18
  • 打赏
  • 举报
回复
gspcav1-20071224不支持v4l2怎么办呀!
曹大夯 2011-10-18
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 arcadyan_s 的回复:]

引用 1 楼 jackie_forever 的回复:

跟我的出错信息完全一样。楼主这问题解决了么?

内核2.6.35已完全支持zc3xx的摄像头,配置内核添加zc3xx驱动

linux-2.6.35内核中网络视频服务器的移植
一、环境
主机环境 :ubuntu 10.10
目标机:FS2410(S3C2410)
主机工具链 :gcc-4.……
[/Quote]
解释得很详细。赞!
liuhonggang23 2011-10-17
  • 打赏
  • 举报
回复
谁弄过35内核的云台控制驱动的移植。求赐教
arcadyan_s 2011-07-22
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 jackie_forever 的回复:]

跟我的出错信息完全一样。楼主这问题解决了么?
[/Quote]
内核2.6.35已完全支持zc3xx的摄像头,配置内核添加zc3xx驱动

linux-2.6.35内核中网络视频服务器的移植
一、环境
主机环境 :ubuntu 10.10
目标机:FS2410(S3C2410)
主机工具链 :gcc-4.4.5
交叉工具链:arm-none-linux-gnueabi-gcc-4.3.2
摄像头 :ZC3xx
二、移植过程
1、配置内核是内核支持芯片为ZC3xx的摄像头
Make menuconfig
Device Drivers --->
<*> Multimedia support --->
<*> Video For Linux
  • Enable Video For Linux API 1
  • (DEPRECATED) (NEW)
  • Video capture adapters
  • (NEW) --->
  • V4L USB devices
  • (NEW) --->
    <*> GSPCA based webcams--->
    <*> ZC3XX USB Camera Driver
    <*> USB Video Class (UVC)
  • UVC input events device support
  • (NEW)
    <*> USB ZC0301[P] webcam support (DEPRECATED)
    2、重新编译内核
    修改文件drivers/media/video/gspac/gspca.c添加红色语句
    220 goto error_buffer;
    221 }
    urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP;
    222 usb_fill_int_urb(urb, dev,
    223 usb_rcvintpipe(dev, ep->
    make zImage
    通过上面两个步骤就可以驱动我们的摄像头了。但是这个驱动是基于V4l2的。以前基于V4L的一些上层应用就不能用了,或需要做大量的修改!这里我们要实现网络视频的功能,
    以前都是用servfox这个网络视频服务器,但是这个服务器就是基于V4L的,我们如果想用的话就得对servfox的源码进行修改。这里我们选用另外一种方案mjpg-stream。
    3、mjpg-stream的移植
    关于mjpg-stream的资料大家可以在下面这个网址查看:http://sourceforge.net/apps/mediawiki/mjpg-streamer/index.php?title=Main_Page
    mjpg-stream的移植需要jpeg的库,所以我们先移植jpeg的库
    (1)jpeg库的移植
    1)jpeg源码包通过下面这个网址下载 http://www.ijg.org/files/jpegsrc.v8b.tar.gz

    2)解压源码包 tar xvf jpegsrc.v8b.tar.gz

    3)配置源码 cd jpeg-8b
    ./configure --prefix=/home/farsight/linux-2.6.35/video/jpeg --host=arm-none-linux-gnueabi

    4)编译 make

    5)安装 make install

    6)拷贝库到文件系统中 cp /home/farsight/dovideo/jpeg/lib/libjpeg.so.8 /source/rootfs/lib
    (2)mjpg-stream的移植
    1)mjpg-stream源码包通过下面这个网址下载 http://sourceforge.net/projects/mjpg-streamer/
    2)解压源码 tar xvf mjpg-streamer-r63.tar.gz

    3)修改源码
    cd mjpg-streamer-r63

    修改顶层makefile及plugins目录中的各级makefile将所有
    CC=gcc
    修改为
    CC=arm-none-linux-gnueabi-gcc

    修改plugins/input_uvc/Makfile

    修改
    CFLAGS += -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC

    CFLAGS += -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -I/home/linux/s3c2410-2.6.35/video/jpeg/include

    修改
    $(CC) $(CFLAGS) -ljpeg -o $@ input_uvc.c v4l2uvc.lo jpeg_utils.lo dynctrl.lo

    $(CC) $(CFLAGS) -ljpeg -L/home/linux/s3c2410-2.6.35/video/jpeg/lib -o $@ input_uvc.c v4l2uvc.lo jpeg_utils.lo dynctrl.lo

    不修改这个上面会提示如下错误:jpeg_uils.c:27: fatal error: jpeglib.h: No such file or directory

    4)编译
    make

    5)测试
    mkdir /source/rootfs/mjpg
    cp *.so /source/rootfs/mjpg
    cp mjpg-stream /source/rootfs/bin
    打开开开发板运行
    mjpg_streamer -i "/mjpg/input_uvc.so" -o "/mjpg/output_http.so -w /t"
    在源码目录下有start.sh,这个脚本里有一些mjpg-stream的使用方法及说明
    打开一个网页输入下面地址就能够看到一个视频(开发板的IP为192.168.1.202):
    http://192.168.1.202:8080/?action=stream
    打开一个网页输入下面地址就能够看到一个静态图片:
    http://192.168.1.202:8080/?action=snapshot
    6)在mjpg源码下有一个www的目录,这个一个网络使用mjpg的实例,结合web服务器(boa)可以实现一些其他相关功能。



kelsel 2011-07-17
  • 打赏
  • 举报
回复
貌似2.6.22以上的内核不支持gspcav1-20071224。
arcadyan_s 2011-07-17
  • 打赏
  • 举报
回复
还没有呢,网上也有不少童鞋都这相同的问题,也没有个解答方案,我还在琢磨中,有结果第一时间在这贴出,如果你有什么进展也请帮忙贴出来,大家分享一下~
jackie_forever 2011-07-16
  • 打赏
  • 举报
回复
跟我的出错信息完全一样。楼主这问题解决了么?

21,597

社区成员

发帖
与我相关
我的任务
社区描述
硬件/嵌入开发 驱动开发/核心开发
社区管理员
  • 驱动开发/核心开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧