首先编译加载zc301p摄像头驱动:
在pad版的sdk kernel中
Make menuconfig
选中
Drivers > Multimedia support > Media USB Adapters > GSPCA based webcams >
<M> ZC3XX USB Camera Driver
然后编译
make modules
mkdir modules_install
make INSTALL_MOD_PATH=./modules_install modules_install
root@firefly:/home/firefly/Desktop/gspca# ls
gspca_main.ko gspca_zc3xx.ko
root@firefly:/home/firefly/Desktop/gspca# insmod gspca_main.ko
root@firefly:/home/firefly/Desktop/gspca# insmod gspca_zc3xx.ko
root@firefly:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 0ac8:301b Z-Star Microelectronics Corp. ZC0301 Webcam
root@firefly:/home/firefly/Desktop/gspca# ls /dev/video0
/dev/video0
摄像头加载成功(注意要先加载main.ko)
移植mjpg-sreamer需要先移植jpeg库,移植方法如下:
wget http://www.ijg.org/files/jpegsrc.v8b.tar.gz
tar -zxvf jpegsrc.v8b.tar.gz
cd jpeg-8b
./configure --prefix=/usr/local/jpeg --enable-shared --enable-static
make
make install