Ubuntu Linux操作系统摄像头驱动的安装
Ubuntu Linux摄像头驱动的a) 请根据内核版本和摄像头类型从http://mxhaard.free.fr/download.html选择下载最新驱动,该驱动支持市面上大多数摄像头。
b) 编译、安装以及装载摄像头驱动
c) # tar xvzf gspcav1-20061216.tar.gz
# cd gspcav1-20061216
# make
# make install
# modprobe gspca
注意:Ubuntu更新库中也包含了该驱动,可以简单的通过“m-a a-i spca5xx”命令来自动下载并编译安装,但是由于库中的代码并不是最新的,对于某些摄像头的驱动可能存在问题,所以推荐手动下载、编译并安装的方式。
d) 用Camorama程序测试摄像头及其驱动程序
# apt-get install camorama
从开始菜单启动Camorama程序,如果驱动工作正常,将会在程序中显示动态预览窗口。
插入USB摄像头
$ dmesg
Linux video capture interface: v2.00
zc0301: V4L2 driver for ZC0301[P] Image Processor and Control Chip v1:1.05
usb 1-2: ZC0301[P] Image Processor and Control Chip detected (vid/pid 0x0AC8/0x301B)
usb 1-2: No supported image sensor detected
usbcore: registered new driver zc0301
$ lsusb
Bus 001 Device 005: ID 0ac8:301b Z-Star Microelectronics Corp. ZC0301 WebCam
Bus 001 Device 004: ID 0bda:8150 Realtek Semiconductor Corp. RTL8150 Fast Ethernet Adapter
Bus 001 Device 002: ID 0ace:1215 ZyDAS
Bus 001 Device 001: ID 0000:0000
ZC0301 WebCam就是我们USB摄像头的芯片,内核是有驱动支持的。
drivers/media/video/zc0301/, 支持V4L2.
$ apt-get install spca5xx-source
[确认源:
deb etch main contrib non-free
deb-src etch main contrib non-free
]
看看源码放在哪里拉
$ dpkg -L spca5xx-source
/.
/usr
/usr/src
/usr/src/spca5xx-source.tar.bz2
/usr/share
/usr/share/doc
/usr/share/doc/spca5xx-source
/usr/share/doc/spca5xx-source/README-SONIX
/usr/share/doc/spca5xx-source/README-TV8532
/usr/share/doc/spca5xx-source/RGB-YUV%2fmodule-setting
/usr/share/doc/spca5xx-source/README.Debian
/usr/share/doc/spca5xx-source/copyright
/usr/share/doc/spca5xx-source/changelog.gz
/usr/share/doc/spca5xx-source/README.gz
/usr/share/doc/spca5xx-source/changelog.Debian.gz
/usr/share/modass
/usr/share/modass/overrides
/usr/share/modass/overrides/spca5xx-source
$ cd /usr/src
$ tar jxf spca5xx-source.tar.bz2
$ cd modules/spca5xx/
参考INSTALL文件
$ make clean
$ make
$ make install
加载模块
$ modprobe spca5xx
$ lsmod | grep sp
spca5xx 642544 0
videodev 21120 2 spca5xx,zc0301
pcspkr 3072 0
usbcore 112644 7 spca5xx,zc0301,zd1211b,rtl8150,usbhid,ohci_hcd
[pcspkr是在modprobe之前原来就有的]
这个时候/dev/video0就建好了。
安装一个应用程序
$ apt-get install camorama
运行camorama,就可以看到了。
另外: 换另一个摄像头(芯片sn9c101),因为装过了spca驱动,所以这次可以直接用了。
下面是插拔时dmesg的信息。
usb 1-2: new full speed USB device using ohci_hcd and address 4
usb 1-2: configuration #1 chosen from 1 choice
Linux video capture interface: v2.00
/usr/src/modules/spca5xx/drivers/usb/spca5xx.c: USB SPCA5XX camera found. SONIX sn9c101 +Tas 5110
/usr/src/modules/spca5xx/drivers/usb/spca5xx.c: [spca5xx_probe:5480] Camera type SN9C
/usr/src/modules/spca5xx/drivers/usb/spca5xx.c: [spca5xx_getcapability:1765] maxw 352 maxh 288 minw 160 minh 120
usbcore: registered new driver spca5xx
/usr/src/modules/spca5xx/drivers/usb/spca5xx.c: spca5xx driver 00.60.00 registered
sn9c102: V4L2 driver for SN9C10x PC Camera Controllers v1:1.27
usbcore: registered new driver sn9c102
usb 1-2: USB disconnect, address 4
b) 编译、安装以及装载摄像头驱动
c) # tar xvzf gspcav1-20061216.tar.gz
# cd gspcav1-20061216
# make
# make install
# modprobe gspca
注意:Ubuntu更新库中也包含了该驱动,可以简单的通过“m-a a-i spca5xx”命令来自动下载并编译安装,但是由于库中的代码并不是最新的,对于某些摄像头的驱动可能存在问题,所以推荐手动下载、编译并安装的方式。
d) 用Camorama程序测试摄像头及其驱动程序
# apt-get install camorama
从开始菜单启动Camorama程序,如果驱动工作正常,将会在程序中显示动态预览窗口。
插入USB摄像头
$ dmesg
Linux video capture interface: v2.00
zc0301: V4L2 driver for ZC0301[P] Image Processor and Control Chip v1:1.05
usb 1-2: ZC0301[P] Image Processor and Control Chip detected (vid/pid 0x0AC8/0x301B)
usb 1-2: No supported image sensor detected
usbcore: registered new driver zc0301
$ lsusb
Bus 001 Device 005: ID 0ac8:301b Z-Star Microelectronics Corp. ZC0301 WebCam
Bus 001 Device 004: ID 0bda:8150 Realtek Semiconductor Corp. RTL8150 Fast Ethernet Adapter
Bus 001 Device 002: ID 0ace:1215 ZyDAS
Bus 001 Device 001: ID 0000:0000
ZC0301 WebCam就是我们USB摄像头的芯片,内核是有驱动支持的。
drivers/media/video/zc0301/, 支持V4L2.
$ apt-get install spca5xx-source
[确认源:
deb etch main contrib non-free
deb-src etch main contrib non-free
]
看看源码放在哪里拉
$ dpkg -L spca5xx-source
/.
/usr
/usr/src
/usr/src/spca5xx-source.tar.bz2
/usr/share
/usr/share/doc
/usr/share/doc/spca5xx-source
/usr/share/doc/spca5xx-source/README-SONIX
/usr/share/doc/spca5xx-source/README-TV8532
/usr/share/doc/spca5xx-source/RGB-YUV%2fmodule-setting
/usr/share/doc/spca5xx-source/README.Debian
/usr/share/doc/spca5xx-source/copyright
/usr/share/doc/spca5xx-source/changelog.gz
/usr/share/doc/spca5xx-source/README.gz
/usr/share/doc/spca5xx-source/changelog.Debian.gz
/usr/share/modass
/usr/share/modass/overrides
/usr/share/modass/overrides/spca5xx-source
$ cd /usr/src
$ tar jxf spca5xx-source.tar.bz2
$ cd modules/spca5xx/
参考INSTALL文件
$ make clean
$ make
$ make install
加载模块
$ modprobe spca5xx
$ lsmod | grep sp
spca5xx 642544 0
videodev 21120 2 spca5xx,zc0301
pcspkr 3072 0
usbcore 112644 7 spca5xx,zc0301,zd1211b,rtl8150,usbhid,ohci_hcd
[pcspkr是在modprobe之前原来就有的]
这个时候/dev/video0就建好了。
安装一个应用程序
$ apt-get install camorama
运行camorama,就可以看到了。
另外: 换另一个摄像头(芯片sn9c101),因为装过了spca驱动,所以这次可以直接用了。
下面是插拔时dmesg的信息。
usb 1-2: new full speed USB device using ohci_hcd and address 4
usb 1-2: configuration #1 chosen from 1 choice
Linux video capture interface: v2.00
/usr/src/modules/spca5xx/drivers/usb/spca5xx.c: USB SPCA5XX camera found. SONIX sn9c101 +Tas 5110
/usr/src/modules/spca5xx/drivers/usb/spca5xx.c: [spca5xx_probe:5480] Camera type SN9C
/usr/src/modules/spca5xx/drivers/usb/spca5xx.c: [spca5xx_getcapability:1765] maxw 352 maxh 288 minw 160 minh 120
usbcore: registered new driver spca5xx
/usr/src/modules/spca5xx/drivers/usb/spca5xx.c: spca5xx driver 00.60.00 registered
sn9c102: V4L2 driver for SN9C10x PC Camera Controllers v1:1.27
usbcore: registered new driver sn9c102
usb 1-2: USB disconnect, address 4
顶(0)
踩(0)
- 最新评论