Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I moved to linux some weeks ago and now i'm trying to resolve the only problem i have. Installing drivers for webcam. I already searched what chip it has and i know it's supported but when i try to compile i get this errors. I don't know where the problem is. Could you help me on this?
Im running ubuntu 7.04. Thanks in advance
Code:
fredzz@fredzz-desktop:/tmp/ov511-2.32$ make
Building OVCam drivers for 2.6 kernel.
make -C /lib/modules/2.6.20-15-generic/build SUBDIRS=/tmp/ov511-2.32 modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.20-15-generic'
CC [M] /tmp/ov511-2.32/ov511_core.o
/tmp/ov511-2.32/ov511_core.c: In function ‘ov51x_init_isoc’:
/tmp/ov511-2.32/ov511_core.c:3566: warning: assignment from incompatible pointer type
/tmp/ov511-2.32/ov511_core.c: In function ‘ov51x_open’:
/tmp/ov511-2.32/ov511_core.c:3818: warning: implicit declaration of function ‘video_devdata’
/tmp/ov511-2.32/ov511_core.c:3818: warning: initialization makes pointer from integer without a cast
/tmp/ov511-2.32/ov511_core.c:3819: warning: implicit declaration of function ‘video_get_drvdata’
/tmp/ov511-2.32/ov511_core.c:3819: warning: initialization makes pointer from integer without a cast
/tmp/ov511-2.32/ov511_core.c: In function ‘ov51x_release’:
/tmp/ov511-2.32/ov511_core.c:3885: warning: initialization makes pointer from integer without a cast
/tmp/ov511-2.32/ov511_core.c: In function ‘ov51x_do_ioctl’:
/tmp/ov511-2.32/ov511_core.c:3924: warning: initialization makes pointer from integer without a cast
/tmp/ov511-2.32/ov511_core.c:3944: warning: implicit declaration of function ‘v4l_print_ioctl’
/tmp/ov511-2.32/ov511_core.c:4303: error: dereferencing pointer to incomplete type
/tmp/ov511-2.32/ov511_core.c: In function ‘ov51x_ioctl’:
/tmp/ov511-2.32/ov511_core.c:4743: warning: initialization makes pointer from integer without a cast
/tmp/ov511-2.32/ov511_core.c:4749: warning: implicit declaration of function ‘video_usercopy’
/tmp/ov511-2.32/ov511_core.c: In function ‘ov51x_read’:
/tmp/ov511-2.32/ov511_core.c:4765: warning: initialization makes pointer from integer without a cast
/tmp/ov511-2.32/ov511_core.c: In function ‘ov51x_mmap’:
/tmp/ov511-2.32/ov511_core.c:4920: warning: initialization makes pointer from integer without a cast
/tmp/ov511-2.32/ov511_core.c: At top level:
/tmp/ov511-2.32/ov511_core.c:4974: error: ‘v4l_compat_ioctl32’ undeclared here (not in a function)
/tmp/ov511-2.32/ov511_core.c:4979: error: variable ‘vdev_template’ has initializer but incomplete type
/tmp/ov511-2.32/ov511_core.c:4980: error: unknown field ‘owner’ specified in initializer
/tmp/ov511-2.32/ov511_core.c:4980: warning: excess elements in struct initializer
/tmp/ov511-2.32/ov511_core.c:4980: warning: (near initialization for ‘vdev_template’)
/tmp/ov511-2.32/ov511_core.c:4981: error: unknown field ‘name’ specified in initializer
/tmp/ov511-2.32/ov511_core.c:4981: warning: excess elements in struct initializer
/tmp/ov511-2.32/ov511_core.c:4981: warning: (near initialization for ‘vdev_template’)
/tmp/ov511-2.32/ov511_core.c:4982: error: unknown field ‘type’ specified in initializer
/tmp/ov511-2.32/ov511_core.c:4982: warning: excess elements in struct initializer
/tmp/ov511-2.32/ov511_core.c:4982: warning: (near initialization for ‘vdev_template’)
/tmp/ov511-2.32/ov511_core.c:4983: error: unknown field ‘hardware’ specified in initializer
/tmp/ov511-2.32/ov511_core.c:4983: warning: excess elements in struct initializer
/tmp/ov511-2.32/ov511_core.c:4983: warning: (near initialization for ‘vdev_template’)
/tmp/ov511-2.32/ov511_core.c:4984: error: unknown field ‘fops’ specified in initializer
/tmp/ov511-2.32/ov511_core.c:4984: warning: excess elements in struct initializer
/tmp/ov511-2.32/ov511_core.c:4984: warning: (near initialization for ‘vdev_template’)
/tmp/ov511-2.32/ov511_core.c:4986: error: unknown field ‘release’ specified in initializer
/tmp/ov511-2.32/ov511_core.c:4986: error: ‘video_device_release’ undeclared here (not in a function)
/tmp/ov511-2.32/ov511_core.c:4986: warning: excess elements in struct initializer
/tmp/ov511-2.32/ov511_core.c:4986: warning: (near initialization for ‘vdev_template’)
/tmp/ov511-2.32/ov511_core.c:4988: error: unknown field ‘minor’ specified in initializer
/tmp/ov511-2.32/ov511_core.c:4988: warning: excess elements in struct initializer
/tmp/ov511-2.32/ov511_core.c:4988: warning: (near initialization for ‘vdev_template’)
/tmp/ov511-2.32/ov511_core.c: In function ‘cd_to_ov’:
/tmp/ov511-2.32/ov511_core.c:5543: warning: implicit declaration of function ‘to_video_device’
/tmp/ov511-2.32/ov511_core.c:5543: warning: initialization makes pointer from integer without a cast
/tmp/ov511-2.32/ov511_core.c:5544: warning: return makes pointer from integer without a cast
/tmp/ov511-2.32/ov511_core.c: In function ‘show_sensor’:
/tmp/ov511-2.32/ov511_core.c:5571: error: ‘senlist’ undeclared (first use in this function)
/tmp/ov511-2.32/ov511_core.c:5571: error: (Each undeclared identifier is reported only once
/tmp/ov511-2.32/ov511_core.c:5571: error: for each function it appears in.)
/tmp/ov511-2.32/ov511_core.c: In function ‘ov_create_sysfs’:
/tmp/ov511-2.32/ov511_core.c:5637: warning: implicit declaration of function ‘video_device_create_file’
/tmp/ov511-2.32/ov511_core.c: In function ‘ov51x_probe’:
/tmp/ov511-2.32/ov511_core.c:5815: warning: implicit declaration of function ‘video_device_alloc’
/tmp/ov511-2.32/ov511_core.c:5815: warning: assignment makes pointer from integer without a cast
/tmp/ov511-2.32/ov511_core.c:5819: error: dereferencing pointer to incomplete type
/tmp/ov511-2.32/ov511_core.c:5819: error: dereferencing pointer to incomplete type
/tmp/ov511-2.32/ov511_core.c:5819: error: dereferencing pointer to incomplete type
/tmp/ov511-2.32/ov511_core.c:5821: error: dereferencing pointer to incomplete type
/tmp/ov511-2.32/ov511_core.c:5823: warning: implicit declaration of function ‘video_set_drvdata’
/tmp/ov511-2.32/ov511_core.c:5829: warning: implicit declaration of function ‘video_register_device’
/tmp/ov511-2.32/ov511_core.c:5829: error: ‘VFL_TYPE_GRABBER’ undeclared (first use in this function)
/tmp/ov511-2.32/ov511_core.c:5835: error: dereferencing pointer to incomplete type
/tmp/ov511-2.32/ov511_core.c:5850: error: dereferencing pointer to incomplete type
/tmp/ov511-2.32/ov511_core.c:5856: error: dereferencing pointer to incomplete type
/tmp/ov511-2.32/ov511_core.c:5860: error: dereferencing pointer to incomplete type
/tmp/ov511-2.32/ov511_core.c:5882: error: dereferencing pointer to incomplete type
/tmp/ov511-2.32/ov511_core.c:5883: warning: implicit declaration of function ‘video_device_release’
/tmp/ov511-2.32/ov511_core.c:5885: warning: implicit declaration of function ‘video_unregister_device’
make[2]: *** [/tmp/ov511-2.32/ov511_core.o] Error 1
make[1]: *** [_module_/tmp/ov511-2.32] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.20-15-generic'
make: *** [default] Error 2
You do not have to torture yourself with this compilation. Drivers for your camera are included in the Linux kernel. I do not know if Ubuntu comes with this module (=kernel driver), you may try to load it with modprobe. If this does not work you need to enable it and rebuild your kernel. I insist this is much easier than finding correct driver for your kernel and building it the way you do.
Thank you Emerson.
That's right. The drivers come included. I load them with modprobe ov511. But after loading them. There is no /dev/video# created. In video0 i have a tuner card. Webcam should go to /dev/video1. But it does not get created when i load ov511 drivers.
So i created it as i read somewhere with mknod /dev/video1 c 81 0 and then "chmod 666 /dev/video1 " , But the result of this is /dev/video1 beeing also with tuner card. So now i have 2 identic devices: video0 e video1. Both with the tuner card. But no webcam.
I don't know what's the problem, because when i load the ov51x-jpeg that are hacked drivers with jpeg suport, it works perfectly in xawtv and soem more programs. But not for what i want to. Because aMSN doesn't support yet JPEG webcams.
That's why I was trying to use default drivers but it doesn't work.
Is there anything i could do?
You need to create new nodes with correct major and minor numbers. Major number refers to the driver, minor to the device. As usual, Google helps, here's one article I found:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.