Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
spca50x kernel module
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Vanquirius
Retired Dev
Retired Dev


Joined: 14 Jun 2002
Posts: 1297
Location: Ethereal plains

PostPosted: Sun Jan 04, 2004 5:57 pm    Post subject: spca50x kernel module Reply with quote

Hello,

I'm trying to make my Intel PC Easy Camera work with Linux. The spca50x drivers supposedely work with this camera, but I'm having trouble compiling them.
The last kernel version it is said to be working with is 2.4.21_pre5; I'm trying to compile it against 2.4.24_pre3. Trying against the 2.6 series just yields tons of errors, I might put some work on that if I can get this working with 2.4 in the first place.
Anyway, I get a linker error when I try to compile this baby:

Code:
nibiru cam # make KINCLUDE=/usr/src/linux-2.4.24-pre3/include
Compiling drivers/usb/jpegdecoder.c
Compiling drivers/usb/spca50x.c
Linking spca50x.o
ld: unrecognized option '--relocateable'
ld: use the --help option for usage information
make: *** [binary] Error 1


How can I proceed? If remove --relocateable from the Makefile...

Code:
# Setup link flags
LDFLAGS    = --strip-debug --relocateable


... I just get new errors, because it of course does not link properly:

Code:
nibiru cam # make KINCLUDE=/usr/src/linux-2.4.24-pre3/include
Compiling drivers/usb/jpegdecoder.c
Compiling drivers/usb/spca50x.c
Linking spca50x.o
ld: warning: cannot find entry symbol _start; defaulting to 0000000008048094
drivers/usb/spca50x.o(.text+0x40): In function `spca50x_reg_readwait':
: undefined reference to `irq_stat_Rf75176fe'
drivers/usb/spca50x.o(.text+0x46): In function `spca50x_reg_readwait':
: undefined reference to `irq_stat_Rf75176fe'
...
drivers/usb/spca50x.o(.data+0x1e40): undefined reference to `__this_module'
make: *** [binary] Error 1


The drivers are supposed to compile with gcc3.2, so the problem should not be in neither of the compilers I've tried:
Code:
[1] i686-pc-linux-gnu-3.2.3
[2] i686-pc-linux-gnu-3.3.2


Edit: changed title


Last edited by Vanquirius on Mon Jan 05, 2004 10:49 pm; edited 2 times in total
Back to top
View user's profile Send private message
coondog
n00b
n00b


Joined: 28 Sep 2003
Posts: 69
Location: Tallahassee, Florida

PostPosted: Mon Jan 05, 2004 3:00 am    Post subject: Reply with quote

well i have the same camera and have been trying to get it to work, what i did to fix that error in the 2.4 kernel is just replace the --relocatable in the makefile and then replace it with -r, it's weird i know but it'll work after that
Back to top
View user's profile Send private message
Vanquirius
Retired Dev
Retired Dev


Joined: 14 Jun 2002
Posts: 1297
Location: Ethereal plains

PostPosted: Mon Jan 05, 2004 7:17 pm    Post subject: Reply with quote

Awesome :-).
Compiled cleanly and beautifully.

Thanks a bunch!
Back to top
View user's profile Send private message
coondog
n00b
n00b


Joined: 28 Sep 2003
Posts: 69
Location: Tallahassee, Florida

PostPosted: Mon Jan 05, 2004 8:34 pm    Post subject: Reply with quote

Shit if you get the rest of it to work please let me know, i was able to get the module to compile but that was it

thanks
Back to top
View user's profile Send private message
Vanquirius
Retired Dev
Retired Dev


Joined: 14 Jun 2002
Posts: 1297
Location: Ethereal plains

PostPosted: Mon Jan 05, 2004 10:48 pm    Post subject: Reply with quote

I got to load videodev.o and spca50x.o cleanly, but no /dev/video is created. :(
Back to top
View user's profile Send private message
coondog
n00b
n00b


Joined: 28 Sep 2003
Posts: 69
Location: Tallahassee, Florida

PostPosted: Sat Jan 10, 2004 9:59 pm    Post subject: Reply with quote

you need to make a link between /dev/video0 and /dev/video my friend

ln -s /dev/video0 /dev/video,

tell me how things go i finally wasted a few minutes and now i'm developing the spca50x modules for those guys now ... lol
Back to top
View user's profile Send private message
Vanquirius
Retired Dev
Retired Dev


Joined: 14 Jun 2002
Posts: 1297
Location: Ethereal plains

PostPosted: Mon Jan 12, 2004 11:54 pm    Post subject: Reply with quote

Thanks for your help, I now have the camera working.

Plugged it in:
Code:
hub.c: new USB device 00:02.1-1, assigned address 2
usb.c: USB device 2 (vend/prod 0x8086/0x110) is not claimed by any active driver.


loaded modules:
Code:
modprobe videodev
modprobe spca50x


created the symlink:
Code:
ln -sf /dev/v4l/video0 /dev/video


distributed permissions around:
Code:
gpasswd -a username video
chgrp video /dev/video
chmod 666 /dev/video


tested with gqcam:
Code:
gqcam


It works! :-)

[edit]"enhanced" steps, putting down link for ebuild on bugs.gentoo.org:
https://bugs.gentoo.org/show_bug.cgi?id=38021 [/edit]
Back to top
View user's profile Send private message
Vanquirius
Retired Dev
Retired Dev


Joined: 14 Jun 2002
Posts: 1297
Location: Ethereal plains

PostPosted: Wed Jan 14, 2004 4:22 pm    Post subject: Reply with quote

Being able to use it with 2.4 is good, but not enough - rebooting is just tedious. Anyone willing to give me a hand with 2.6, please do so.

Here's a good site to start with.

I got a little further down the road with 2.6, here's a patch to where I got so far:

link to patch (my server)
link to patch (GeoCities)

Where I am stuck:
Code:
                spca50x->task.data = spca50x;
                spca50x->task.sync = 0;
                spca50x->task.routine = auto_bh;


should be defined in 2.6 as:
Code:
                INIT_WORK(&spca50x->cam_work, auto_bh, spca50x);


The problem is, I don't really know how to define the "cam_work" workspace.

I already tried "work_t cam_work;" but it didn't quite work. The header for the function work_t should be#include <linux/workqueue.h> correct? I only found this function in a ppp header, though. Anyone know how to get this working properly?
_________________
Hello.


Last edited by Vanquirius on Mon Jan 26, 2004 10:36 pm; edited 1 time in total
Back to top
View user's profile Send private message
coondog
n00b
n00b


Joined: 28 Sep 2003
Posts: 69
Location: Tallahassee, Florida

PostPosted: Fri Jan 16, 2004 5:32 pm    Post subject: Reply with quote

FOR ALL SPCA50X development go to the following links ...
http://www.unibay.biz
http://mxhaard.free.fr
Back to top
View user's profile Send private message
Vanquirius
Retired Dev
Retired Dev


Joined: 14 Jun 2002
Posts: 1297
Location: Ethereal plains

PostPosted: Fri Jan 16, 2004 5:57 pm    Post subject: Reply with quote

Hey there,

I took a quick look at "spca5xx_mx07012004", would you say it is better to start porting the driver to 2.6 from this version rather than spca50x-0.30? Separating spcadecoder.c does make it more readable...!

Did you start writing anything yet?
_________________
Hello.
Back to top
View user's profile Send private message
coondog
n00b
n00b


Joined: 28 Sep 2003
Posts: 69
Location: Tallahassee, Florida

PostPosted: Sat Jan 17, 2004 8:08 am    Post subject: Reply with quote

in my opinion take the latest source code from either of the two links and port it. If not you're loosing a lot of upgrades and bug fixes that you will start implementing in the next generation of the module. You know what that means if any copy paste occurs...uh oh

that's what i think ... mxhaard might say differently
Back to top
View user's profile Send private message
misterLu
Guru
Guru


Joined: 14 Sep 2003
Posts: 430
Location: Poland

PostPosted: Sat Mar 27, 2004 11:54 pm    Post subject: Reply with quote

Hi, i've compiled this driver, but I've no idea how to load it :(
Code:

 # make  KINCLUDE=/usr/src/linux-2.4.25/include/
Compiling drivers/usb/jpegdecoder.c
Compiling drivers/usb/spca50x.c
Linking spca50x.o
 #modules-update
 # modprobe spca50x
modprobe: Can't locate module spca50x


Please help !
Back to top
View user's profile Send private message
misterLu
Guru
Guru


Joined: 14 Sep 2003
Posts: 430
Location: Poland

PostPosted: Sun Mar 28, 2004 12:19 am    Post subject: Reply with quote

this must be some other problem:
Code:

 # cp drivers/usb/spca50x.o /lib/modules/2.4.25/kernel/drivers/media/video/
 # modules-update
depmod: *** Unresolved symbols in /lib/modules/2.4.25/kernel/drivers/media/video/spca50x.o


I have kernel 2.4.25. Does it mean i have nochance to run my camera ? :(
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum