Installing the Webcam
From OpenCV on the Cell
Installing the Webcam
If you have a webcam, OpenCV can be utilized further. However, the base Linux kernel does not support a capture device as CONFIG_VIDEO_DEV is not set by default. Moreover, as Linux 2.6.23 does not support a USB Video Class driver, it is necessary to install that too. Next, we prepared a patch for FC6. Please install as follows:
Rebuilding the kernel
Download Build-opencv-kernel.tar.gz. Please execute the following command to unpack the pathch and the driver installation script:
$ wget http://cell.fixstars.com/opencv/download/fc/Build-opencv-kernel.tar.gz $ tar zxf Build-opencv-kernel.tar.gz $ cd Build-opencv-kernel $ wget http://cell.fixstars.com/ps3linux/download/cell-linux-20070817/CELL-Linux-CL_20070817-ADDON/src/linux-2.6.23-20070817.tar.bz2
Apply the patch to drivers/media/video/compat_ioctl32.c for corresponding to USB Video Class:
$ tar jxf linux-2.6.23-20070817.tar.bz2 $ patch -d linux-2.6.23-20070817 -p1 < linux-2.6.23-20070817-v4l.diff $ cd linux-2.6.23-20070817
Edit the Makefile for set EXTRAVERSION.
EXTRAVERSION = -ps3pf-with-capture
Start the kernel configuration menu. If using X Windows, you can type make xconfig for use GUI.
$ make ps3_defconfig $ make menuconfig
Choose the menu as follows, and enable Video For Linux:
- Device Drivers -> Multimedia devices -> Video For Linux
When you use LVM(Logical Volume Management), require additional operation. When you use Fedora 7, probably, you use LVM. To know either you use or not use LVM, try command as follows:
$ mount | grep mapper /dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
If you get some messages as above, your system use LVM.
To enable capabilities to handle LVM on your system, see EnablingLVM.
The Device Tree Compiler(dtc) is needed for to build linux-2.6.23-20070817. dtc is the tool for building device information object from device tree. For more information, get source from 'git:www.jdl.com/software/dtc.git' by using git, and see files in 'Documentation' directory.
If unsure, download the source of dtc from here, and build it, and copy dtc to /usr/local/bin as follows:
$ tar -zxf Dtc.tar.gz $ cd dtc $ make dtc $ su # cp dtc /usr/local/bin
Build the kernel. It takes long time. Please wait for finishing compilation.
$ make $ make modules
After compiling, execute the following command while logged on as "root":
# make modules_install # installkernel 2.6.23-ps3pf-with-capture vmlinux System.map
Append the boot target 'capture' to /etc/kboot.conf, as follows:
default=capture timeout=10 root=LABEL=/ text='/boot/vmlinux-2.6.23 initrd=/boot/initrd.img' linux='/boot/vmlinux-2.6.23 initrd=/boot/initrd.img video=ps3fb:mode:3' capture='/boot/vmlinux-2.6.23-ps3pf-with-capture initrd=/boot/initrd-2.6.23-ps3pf-with-capture.img video=ps3fb:mode:3'
After checking kboot.conf to make sure that all the above changes have been applied properly, reboot the OS.
Install the driver
Please refer to Tested Webcams page. If your webcam is in this, install a correspondence driver with the following script.
- USB Video Class driver
If your webcam is UVC device, execute the following script by "root" user. It execute compile, and installation:
# ./build_uvc_module
- GSPCA driver
If your webcam is not UVC device, it may enable by installing the gspca driver. Execute the following script by "root" user. It execute compile, and installation:
# ./build_gspca_module
When your webcam is not recognized with the gspca driver, try unloading of USB2.0 driver as follows:
$ modprobe -r ehci-hcd

