LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-13-2009, 01:17 PM   #1
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Rep: Reputation: 36
Web cam driver GSPCA trouble compiling


I have a new webcam that gives the following output from lsusb


Code:
Bus 002 Device 007: ID 0c45:600d Microdia TwinkleCam USB camera

a quick google search suggested that the GSPCA kernel module would be appropiate and could be insalled in gspca-source from apt (ubuntu 9.04)

the readme file gives the following instructions to insatll the module

Code:
   m-a prepare
   m-a a-i gspca
the first stage working fine but the secoond command fails with this as the output log

Code:
gspca-source.buildlog.2.6.28-13-generic.1247507635
gspca-source.buildlog.2.6.28-13-generic.1247507938
mchi8ds2@mchi8ds2-desktop:/var/cache/modass$ cat gspca-source.buildlog.2.6.28-13-generic.1247507
gspca-source.buildlog.2.6.28-13-generic.1247507635
gspca-source.buildlog.2.6.28-13-generic.1247507938
mchi8ds2@mchi8ds2-desktop:/var/cache/modass$ cat gspca-source.buildlog.2.6.28-13-generic.1247507938 
dh_testdir
dh_testroot
dh_clean
/usr/bin/make -C /usr/src/modules/gspca clean
make[1]: Entering directory `/usr/src/modules/gspca'
rm -r -f *.o decoder/.gspcadecoder.o.cmd decoder/*.o \
	.gspca.o.cmd  *.o *.ko *.mod.* .[a-z]* core *.i \
	*.symvers *.err
make[1]: Leaving directory `/usr/src/modules/gspca'
/usr/bin/make  -f debian/rules kdist_clean kdist_config binary-modules
make[1]: Entering directory `/usr/src/modules/gspca'
dh_testdir
dh_testroot
dh_clean
/usr/bin/make -C /usr/src/modules/gspca clean
make[2]: Entering directory `/usr/src/modules/gspca'
rm -r -f *.o decoder/.gspcadecoder.o.cmd decoder/*.o \
	.gspca.o.cmd  *.o *.ko *.mod.* .[a-z]* core *.i \
	*.symvers *.err
make[2]: Leaving directory `/usr/src/modules/gspca'
for templ in ; do \
    cp $templ `echo $templ | sed -e 's/_KVERS_/2.6.28-13-generic/g'` ; \
  done
for templ in `ls debian/*.modules.in` ; do \
    test -e ${templ%.modules.in}.backup || cp ${templ%.modules.in} ${templ%.modules.in}.backup 2>/dev/null || true; \
    sed -e 's/##KVERS##/2.6.28-13-generic/g ;s/#KVERS#/2.6.28-13-generic/g ; s/_KVERS_/2.6.28-13-generic/g ; s/##KDREV##/2.6.28-13.45/g ; s/#KDREV#/2.6.28-13.45/g ; s/_KDREV_/2.6.28-13.45/g  ' < $templ > ${templ%.modules.in}; \
  done
dh_testdir
dh_testroot
dh_clean -k
# Build the module
/usr/bin/make -C /usr/src/modules/gspca KERNEL_VERSION=2.6.28-13-generic KERNELDIR=/usr/src/linux-headers-2.6.28-13-generic
make[2]: Entering directory `/usr/src/modules/gspca'
/usr/bin/make -C /usr/src/linux-headers-2.6.28-13-generic SUBDIRS=/usr/src/modules/gspca CC=gcc modules
make[3]: Entering directory `/usr/src/linux-headers-2.6.28-13-generic'
  CC [M]  /usr/src/modules/gspca/gspca_core.o
/usr/src/modules/gspca/gspca_core.c:54:27: error: asm/semaphore.h: No such file or directory
/usr/src/modules/gspca/gspca_core.c: In function ‘spca5xx_ioctl’:
/usr/src/modules/gspca/gspca_core.c:2463: error: implicit declaration of function ‘video_usercopy’
/usr/src/modules/gspca/gspca_core.c: At top level:
/usr/src/modules/gspca/gspca_core.c:2604: error: ‘v4l_compat_ioctl32’ undeclared here (not in a function)
/usr/src/modules/gspca/gspca_core.c:2609: error: unknown field ‘owner’ specified in initialiser
/usr/src/modules/gspca/gspca_core.c:2609: warning: initialisation from incompatible pointer type
/usr/src/modules/gspca/gspca_core.c:2611: error: unknown field ‘type’ specified in initialiser
/usr/src/modules/gspca/gspca_core.c: In function ‘spca50x_create_sysfs’:
/usr/src/modules/gspca/gspca_core.c:2769: error: implicit declaration of function ‘video_device_create_file’
/usr/src/modules/gspca/gspca_core.c:2780: error: implicit declaration of function ‘video_device_remove_file’
/usr/src/modules/gspca/gspca_core.c: In function ‘spca5xx_probe’:
/usr/src/modules/gspca/gspca_core.c:4301: error: incompatible types in assignment
make[4]: *** [/usr/src/modules/gspca/gspca_core.o] Error 1
make[3]: *** [_module_/usr/src/modules/gspca] Error 2
make[3]: Leaving directory `/usr/src/linux-headers-2.6.28-13-generic'
make[2]: *** [default] Error 2
make[2]: Leaving directory `/usr/src/modules/gspca'
make[1]: *** [binary-modules] Error 2
make[1]: Leaving directory `/usr/src/modules/gspca'
make: *** [kdist_build] Error 2
any ideas what i need to do to get this webcam woriking??
 
Old 07-13-2009, 02:43 PM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
It does not appear to be finding your kernel source in /usr/src/linux-2.6.28-13-generic/asm . You only downloaded the kernel headers.
Compile your kernel. Use the boot/config-<your_kernel>.
Run 'make headers check' if your /usr/src/linux-2.6.28-13-generic/asm directory is empty.
Do not run make clean
Make sure the link in /lib/modules/2.6.28-13-generic/build points to your kernel - not the headers.

Then, try to compile again. If it craps out, usu8ally hitting the uop arrow and return gives the error we need to see
 
Old 07-13-2009, 07:46 PM   #3
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Original Poster
Rep: Reputation: 36
ok lets take this one step at a time....
the closest ive come to building kernels is installing the NVIDIA modules (before apt did it for you) and that only needed the headers,


serched synaptic for the source code for my kernel (i just had headers before)

the closest was linux-source that gave me a tar.bz2 file called linux-source-2.6.28 and was versioned as 2.6.28.13.7 in apt.


unpacking this archive gives me /usr/src/linux-source-2.6.28 which has no ASM directory inside

running /boot/config-2.6.28-13-generic gives me no output at all and just returns me to the prompt


what do i do now?
 
Old 07-14-2009, 03:32 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Quote:
Originally Posted by dasy2k1 View Post
ok lets take this one step at a time....
the closest ive come to building kernels is installing the NVIDIA modules (before apt did it for you) and that only needed the headers,

the closest was linux-source that gave me a tar.bz2 file called linux-source-2.6.28 and was versioned as 2.6.28.13.7 in apt.
unpacking this archive gives me /usr/src/linux-source-2.6.28 which has no ASM directory inside

running /boot/config-2.6.28-13-generic gives me no output at all and just returns me to the prompt

what do i do now?
You can get kernel source from ftp://ftp.xx.kernel org, where 'xx' is your country code. Thge config file is a settings file - it should not run.

On the asm directory. My bad. It's actually include/asm. Change into the linux-2.6.28.7/ directory run these commands

cp /boot/config-2.6.28-13-generic ./.config (fullstops important)
make clean
make

This will run for a while and add about 200 megs of compiled files Grab a coffee. Your new kernel will be 2.6.28.13.7-generic
Now you are on 2.6.28.13. Make sure the /lib/modules/2.6.28.13-generic/build symlink points at your compiled kernel source.

NOW build the module
 
Old 07-15-2009, 02:07 PM   #5
dasy2k1
Member
 
Registered: Oct 2005
Location: 127.0.0.1
Distribution: Manjaro
Posts: 963

Original Poster
Rep: Reputation: 36
Ok i have compleated that step....
how do i point the module towards the sources to allow it to build
 
Old 07-16-2009, 03:59 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,260

Rep: Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321Reputation: 2321
Your module will get the kernel version by

1 running uname -r
2 Following the /lib/modules/2.6.28.13-generic/build symlink

make sure that when it does, it finds your kernel source. Then just build the module
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Web cam trouble.., ott0disk Linux - Hardware 6 12-21-2008 05:40 AM
web cam driver???? Mr.mick-duck Linux - Hardware 4 04-03-2008 04:14 PM
ploblems compiling quick cam driver twon Linux - Software 2 12-02-2006 05:28 AM
Cannot install Web Cam Driver! yty Fedora 4 05-08-2006 04:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 03:39 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration