I have a camera but i do not have a driver for Linux. So i am trying to install the driver for 05e1:0b01. But its still getting failed.

Device plug/unplug shows correctly in /var/log/messages

Aug 19 19:15:47 example kernel: [39339.374902] usb 1-3: USB disconnect, device number 16
Aug 19 19:16:52 example kernel: [39404.464068] usb 1-3: new high speed USB device number 17 using ehci_hcd
Aug 19 19:16:55 example kernel: [39407.152965] usb 1-3: New USB device found, idVendor=05e1, idProduct=0b01
Aug 19 19:16:55 example kernel: [39407.152976] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 19 19:16:55 example kernel: [39407.152984] usb 1-3: Product: USB Camera
Aug 19 19:16:55 example kernel: [39407.152990] usb 1-3: Manufacturer: Syntek
Aug 19 19:16:55 example kernel: [39407.152997] usb 1-3: SerialNumber: 0123456789AC
Aug 19 19:16:55 example mtp-probe: checking bus 1, device 17: "/sys/devices/pci0000:00/0000:00:1d.7/usb1/1-3"
Aug 19 19:16:55 example mtp-probe: bus: 1, device: 17 was not an MTP device

Step 1: I downloaded this camera driver from http://sourceforge.net/projects/syntekdriver/

Step 2: README file told to do so.

stk11xx-2.1.0]# make -f Makefile.standalone
make -C /lib/modules/2.6.40.3-0.fc15.i686/build SUBDIRS=/home/sun/Downloads/stk11xx-2.1.0 modules
make[1]: Entering directory `/usr/src/kernels/2.6.40.3-0.fc15.i686'
  CC [M]  /home/sun/Downloads/stk11xx-2.1.0/stk11xx-usb.o
/home/sun/Downloads/stk11xx-2.1.0/stk11xx-usb.c: In function ‘usb_stk11xx_probe’:
/home/sun/Downloads/stk11xx-2.1.0/stk11xx-usb.c:803:2: error: implicit declaration of function ‘init_MUTEX’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors

make[2]: *** [/home/sun/Downloads/stk11xx-2.1.0/stk11xx-usb.o] Error 1
make[1]: *** [_module_/home/sun/Downloads/stk11xx-2.1.0] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.40.3-0.fc15.i686'
make: *** [driver] Error 2

Step 3: Google i found i have to add stk11xx-usb.c new lines

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26) 
#include <linux/semaphore.h> 
#else 
#include <asm/semaphore.h> 
#endif 
#define init_MUTEX(LOCKNAME) sema_init(LOCKNAME,1);

Step 4: Try to build again fail.

stk11xx-2.1.0]# make -f Makefile.standalone
make -C /lib/modules/2.6.40.3-0.fc15.i686/build SUBDIRS=/home/sun/Downloads/stk11xx-2.1.0 modules
make[1]: Entering directory `/usr/src/kernels/2.6.40.3-0.fc15.i686'
  CC [M]  /home/sun/Downloads/stk11xx-2.1.0/stk11xx-usb.o
  CC [M]  /home/sun/Downloads/stk11xx-2.1.0/stk11xx-v4l.o
/home/sun/Downloads/stk11xx-2.1.0/stk11xx-v4l.c:43:28: fatal error: linux/videodev.h: No such file or directory
compilation terminated.
make[2]: *** [/home/sun/Downloads/stk11xx-2.1.0/stk11xx-v4l.o] Error 1
make[1]: *** [_module_/home/sun/Downloads/stk11xx-2.1.0] Error 2
make[1]: Leaving directory `/usr/src/kernels/2.6.40.3-0.fc15.i686'
make: *** [driver] Error 2
stk11xx-2.1.0]# 

Step 5: i cant solve this.

Can anyone advise me how to solve this now? I am blocked (more reference: https://sourceforge.net/projects/syntekdriver/forums/forum/616183/topic/4665233 )

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

The error message you have at step 4 says that the compiler is not able to find the file videodev.h on your system. The file videodev.h comes with the kernel source code ( on my system it is linux-2.6.37.3/include/kernel/videodev.h and it should be in a comparable location on any kernel source version ). When you install the kernel headers this file will be installed to /usr/include/linux/videodev.h - and this is what you are missing. So, (1) your distro may have some sort of kernel-dev rpm file with the appropriate kernel headers or (2) you may have the download the appropriate kernel version ( see uname -r but it looks like you have linux-2.6.40.3 ) source code and then install the kernel headers ( read the kernel source code README and then run 'make headers_install' - you may have to configure the kernel source but you probably should not have to 'make' and 'make install' the kernel. Your goal is to get a copy of videodev.h and any supporting header files from the kernel source to the usable place on your hdd ( probably /usr/include and /usr/include/linux ).

If you already have /usr/include/linux/videodev.h on your hdd, verify that the INCLUDE environment variable points to /usr/include.

Now looking more closely, it looks like the kernel.org people have obsoleted videodev.h and removed it from the source code prior to version 2.6.39.3 ( and replaced it with vedeodev2.h? - not clear at this point ) and it looks like you have linux-2.6.40.3 - suggest you get an older copy of the kernel source and manually copy videodev.h to /usr/include/linux ( or wherever you now have videodev2.h ).

link|improve this answer
thanks finally it did not worked and i returned to the suppliers by asking my money back. – YumYumYum Aug 26 '11 at 20:58
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.