远程视频监控程序设计摄像头采集驱动移植
gspcav1-20071224
gspcav1-20071224下载地址:
http://www.slackware.com/%7Ealien/slackbuilds/gspcav1/build/gspcav1-20071224.tar.gz
由于linux-2.6.24.4/drivers/usb 目录下没有media目录,故移植步骤如下:
a)在linux-2.6.24.4/drivers/usb 目录下新建media目录,将gspcav1-20071224.tar.gz copy到media下解压。为了使media编译进内核,需修改linux-2.6.24.4/drivers/usb目录下的Kconfig、Makefile文件。
[root@localhost yaffs2]# cd ../linux-2.6.24.4/drivers/usb/
[root@localhost usb]# pwd
/root/2410-s/linux-2.6.24.4/drivers/usb
[root@localhost usb]# mkdir media
[root@localhost usb]# cd media/
[root@localhost media]# cp /mnt/hgfs/arm/gspcav1-20071224.tar.gz ./
[root@localhost media]# mv gspcav1-20071224 gspca
[root@localhost media]# cd ..
[root@localhost usb]# pwd
/root/2410-s/linux-2.6.24.4/drivers/usb
[root@localhost usb]# vi Kconfig
添加 source "drivers/usb/media/Kconfig"
![](https://i-blog.csdnimg.cn/blog_migrate/39e9e00d8e03c677746f059e5bbacd7e.jpeg)
[root@localhost usb]# vi Makefile
添加 obj-$(CONFIG_USB_SPCA5XX) += media/
b)为添加gspcav1-20071224 编译选项,在media下新建Kconfig、Makefile文件。
[root@localhost usb]# cd media/
[root@localhost media]# pwd
/root/2410-s/linux-2.6.24.4/drivers/usb/media
[root@localhost media]# vi Kconfig
#
# USB Multimedia device configuration
#
comment "USB Multimedia devices"
depends on USB
config USB_SPCA5XX
tristate "USB SPCA5XX Sunplus/Vimicro/Sonix jpeg Cameras"
depends on USB && VIDEO_DEV
---help---
Say Y or M here if you want to use one of these webcams:
The built-in microphone is enabled by selecting USB Audio support.
This driver uses the Video For Linux API. You must say Y or M to
"Video For Linux" (under Character Devices) to use this driver.
Information on this API and pointers to "v4l" programs may be found
at <file:Documentation/video4linux/API.html>.
To compile this driver as a module, choose M here: the
module will be called spca5xx.
[root@localhost media]# vi Makefile
#
# Makefile for USB Media drivers
#
obj-$(CONFIG_USB_SPCA5XX) += gspca/
转载于:https://blog.51cto.com/chenboqiang/484075