Hello
I did not get "compiling the module only" to work yet. I tried a few more things but i did not see anything meaningful and I moved to another project.
As noted above i was able update/patch gspca_main by recompiling the whole kernal again.
I'm still interested (stubborn) enough to try some new ideas as I learned a few things on the way.
My thinking (warning !) is that gspca is pretty deeply embedded into the kernal with lots of dependecies so recompiling the whole kernal is the only solution. I have no proof for that so don't take that as an expert opinion.
-
- Posts: 117
- Joined: Wed Jan 09, 2013 12:14 pm
-
- Posts: 117
- Joined: Wed Jan 09, 2013 12:14 pm
Re: compiling module
BTW
Thanks to everyone that help me get as far asi did.
Cheers
Thanks to everyone that help me get as far asi did.
Cheers
Re: compiling module
I was finally successful
Basically I followed your guide:
then, I proceed with compilation of new drivers...
and after reboot, (or depmod and modprobe) my webcam came back online
I didn't found a right purpose of file Module.symvers, but I guess, this file needs to be "compatible" with currently running kernel. Last week when I compiled my kernel (or downloaded Module.symvers from git), my modules didn't work. (I didn't apply whole compiled kernel, only my modules)
But 4 days ago, new kernel on git was compiled and released (2012-03-18 17:34), so after next rpi-update, Module.symvers (probably) became compatible with new kernel and my modules after compilation started to work

Basically I followed your guide:
Code: Select all
cd /usr/src
wget https://github.com/raspberrypi/linux/archive/rpi-3.6.y.tar.gz
tar xvfz rpi-3.6.y.tar.gz
mv linux-rpi-3.6.y linux
ln -s /usr/src/linux /lib/modules/3.6.11+/build
cd /lib/modules/3.6.11+/build
make mrproper
gzip -dc /proc/config.gz > .config
make modules_prepare
wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers
Code: Select all
cd /usr/src/
wget http://moinejf.free.fr/gspca-2.15.18.tar.gz
tar xvfz gspca-2.15.18.tar.gz
cd gspca-2.15.18
make
make install

Code: Select all
[ 7.879301] Linux video capture interface: v2.00
[ 8.055274] gspca_main: [b]v2.15.18[/b] registered
[ 8.439714] gspca_main: pac207-2.15.18 probing 093a:2468
[ 8.723530] gspca_pac207: Pixart Sensor ID 0x27 Chips ID 0x00
[ 8.729311] gspca_pac207: Pixart PAC207BCA Image Processor and Control Chip detected (vid/pid 0x093A:0x2468)<6>
[ 9.006612] input: pac207 as /devices/platform/bcm2708_usb/usb1/1-1/1-1.2/input/input0
[ 9.143152] gspca_main: video0 created
But 4 days ago, new kernel on git was compiled and released (2012-03-18 17:34), so after next rpi-update, Module.symvers (probably) became compatible with new kernel and my modules after compilation started to work

-
- Posts: 117
- Joined: Wed Jan 09, 2013 12:14 pm
Re: compiling module
Good news, well done.
Re: compiling module
Congratulations! I only started the blog because I keep forgetting things like this. Really pleased it has helped someone out.blackdot wrote:I was finally successful![]()
-
- Posts: 117
- Joined: Wed Jan 09, 2013 12:14 pm
Re: compiling module
Hello
well I managed to sort this one out. As hexelpdkk pointed out earlier, the problem was with my Make command.
The one I was using was provided by the vendor of the camera to rebuild/make after their patch was installed. As it turns out using this command
overwrites the Module.symvers. It was with the example from blackdot that I was able to narrow down and solve my problem. Apparently the M= option retains the original Module.symvers
In the end this is what I used
while investigating this one, I also set up a cross-compiling environment which is not as painful as it sounds. In fact, it was very easy and I should have done it long ago. On a 3 year old PC with a very modest spec, the kernal compiles in 30 minutes and transferring images/files between the 2 platforms is straightforward. This page is a little old, but it still worked for me http://mitchtech.net/raspberry-pi-kernel-compile/
I've not mastered this subject, but I think I'm a little further along now. Once again thanks for the help on this one everyone.
well I managed to sort this one out. As hexelpdkk pointed out earlier, the problem was with my Make command.
The one I was using was provided by the vendor of the camera to rebuild/make after their patch was installed. As it turns out using this command
Code: Select all
make drivers/media/video/gspca/gspca/gspca_main.ko
In the end this is what I used
Code: Select all
make -C /lib/modules/3.6.11+/build M=/usr/src/linux/drivers/media/video/gspca modules
install -c -m 0644 drivers/media/video/gspca/*.ko /lib/modules/3.6.11+/kernel/drivers/media/video/gspca
depmod -a
I've not mastered this subject, but I think I'm a little further along now. Once again thanks for the help on this one everyone.
