Webcam driver compilation and insertion into NanosG20 ------------------------------------------------------------------------- Wanted to setup a webcam http://www.linwik.com/wiki/installing+the+latest+v4l+tv+tuner+drivers+in+debian+gnu+linux+5.0 No camera driver in the distro. dmesg usb 1-2.1: new full speed USB device using at91_ohci and address 20 dev/video0 does not exist lsusb Bus 001 Device 020: ID 046d:0804 Logitech, Inc. Webcam C250 Other USB devices like USB hub or keyboard work. ------------------------------------------------------------------------- apt-get update apt-get install make gcc dov4l libpt-1.11.2-plugins-v4l2 apt-get install subversion build-essential libjpeg62-dev libjpeg62 By compiling programms get error File not found: /lib/modules/2.6.35.7-nanosg20/build/.config Problem, no Linux headers. apt-get install linux-headers-2.6.35.7-nanosg20 E: Unable to locate package linux-headers-2.6.35.7-nanosg20 E: Couldn't find any package by regex 'linux-headers-2.6.35.7-nanosg20' Can download this version apt-get install linux-headers-2.6.23 and copy driver directory into /lib/modules/2.6.35.7-nanosg20/ succeeded to compile modules but wrong kernel version. The webcam did not work. v4l1_compat: version magic '2.6.35.7 preempt mod_unload ARMv5 ' should be '2.6.35.7-nanosg20 preempt mod_unload ARMv5 Correct is to download linux headers from NanosG20 website. Then make modules and they will replace the wrong version modules. ------------------------------------------------------------------------- Need to install linux headers for NanosG20 Linux Kernel Quellcode Paket [85,90 MB] https://www.ledato.de/download/linux-source-2.6.35.7-nanosg20.deb dpkg -i linux-source-2.6.35.7-nanosg20.deb cd /usr/src/linux-2.6.35.7-nanosg20 make menuconfig video drivers were not selected in the distro. Selected them and exit. Started to build kernel using make, but it would take a day to compile. ------------------------------------------------------------------------- Searched for ways how to compile just video modules. warning, in file '/var/lib/dpkg/status' near line 2775 package 'linux-2.6.35.7-nanosg20': missing maintainer Don't know if following two lines found somewhere are necessary: ln -s /usr/src/linux-2.6.35.7-nanosg20/Module.symvers Module.symvers make modules_prepare Video drivers are here cd /usr/src/linux-2.6.35.7-nanosg20/drivers/media/video Running "make" in /video directory did not work. Need to be here: cd /usr/src/linux-2.6.35.7-nanosg20 make M=drivers/media/video/ Works!!! This creates .ko files. The order of insertion seems to be important. Insertion of some modules produced error, so I ommited them. To have the modules automatically loaded on next boot, place the code in nano /etc/rc.local ######################################################## cd /usr/src/linux-2.6.35.7-nanosg20/drivers/media/video insmod v4l1-compat.ko insmod v4l2-int-device.ko insmod videodev.ko insmod v4l2-common.ko insmod ov511.ko insmod gspca/gspca_main.ko insmod usbvideo/usbvideo.ko insmod usbvideo/quickcam_messenger.ko insmod uvc/uvcvideo.ko ######################################################## =============================================================== Camera now exists ls /dev/video0 Now dmesg shows with Logitech C250 usb 1-2.1: new full speed USB device using at91_ohci and address 20 uvcvideo: Found UVC 1.00 device (046d:0804) input: UVC Camera (046d:0804) as /devices/platform/at91_ohci/usb1/1-2/1-2.1/1-2.1:1.0/input/input2 and with Logitech C510 input: UVC Camera (046d:081d) as /devices/platform/at91_ohci/usb1/1-2/1-2.4/1-2.4:1.2/input/input3 ------------------------------------------------- lsmod uvcvideo 53016 0 v4l2_common 13739 0 ov511 57821 0 videodev 37680 3 uvcvideo,v4l2_common,ov511 v4l1_compat 13164 2 uvcvideo,videodev v4l2_int_device 1986 0 ...... ------------------------------------------------- insmod v4l1-compat.ko insmod v4l2-int-device.ko insmod videodev.ko insmod v4l2-common.ko insmod ov511.ko insmod gspca/gspca_main.ko insmod usbvideo/usbvideo.ko insmod usbvideo/quickcam_messenger.ko insmod uvc/uvcvideo.ko ./mjpg_streamer -i "/var/www/mjpg-streamer/input_uvc.so -r 960x720" -o "/var/www/mjpg-streamer/output_http.so "