LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 09-02-2006, 04:34 PM   #1
deiz92
Member
 
Registered: Aug 2006
Distribution: Suse 10.2
Posts: 32

Rep: Reputation: 15
adventures compiling, installing, and insmod?


hi all,

i recently been trying to get drivers/kernel modules working for my webcam, they were compiled and all that but whenever i type something at the bash prompt nothing much happens, it either says wrong command in which case i work it out and put the right one in but even then nothing much happens, it just goes back to the prompt, how do i know if something happens?

EXAMPLE: i downloaded the spcaxx tar file for the logitech fusion webcam and extracted it to the desktop through gnome, all was done, then i go to Konsole and i get this...

deian@linux-vsvw:~/Desktop/spca5xx-20060501> l
total 125
drwxr-xr-x 3 deian users 384 2006-05-01 00:04 ./
drwxr-xr-x 5 deian users 496 2006-09-02 20:10 ../
-rw-r--r-- 1 deian users 48252 2006-04-29 16:39 CHANGELOG
-rwx------ 1 deian users 372 2005-09-10 19:17 cutlog.py*
drwxr-xr-x 3 deian users 72 1970-01-01 01:00 drivers/
-rwx------ 1 deian users 1487 2006-02-28 09:37 INSTALL*
-rw-r--r-- 1 deian users 17992 2002-12-06 14:23 LICENSE
-rw-r--r-- 1 deian users 6970 2006-04-29 18:01 Makefile
-rwx------ 1 deian users 21290 2006-02-28 09:05 README*
-rw-r--r-- 1 deian users 739 2006-04-02 21:45 README-KERNEL-UPTO-2.6.16
-rwx------ 1 deian users 478 2005-09-10 17:34 README-SONIX*
-rwx------ 1 deian users 513 2005-12-31 21:49 README-TV8532*
-rwx------ 1 deian users 828 2005-09-25 10:09 RGB-YUV%2fmodule-setting*
deian@linux-vsvw:~/Desktop/spca5xx-20060501>

and i type INSTALL at the prompt, command not found, however when i type ./INSTALL something happens:

deian@linux-vsvw:~/Desktop/spca5xx-20060501> INSTALL
bash: INSTALL: command not found
deian@linux-vsvw:~/Desktop/spca5xx-20060501> ./INSTALL
./INSTALL: line 1: Module: command not found
./INSTALL: line 2: kernel: command not found
./INSTALL: line 3: be: command not found
./INSTALL: line 4: Kernel: command not found
./INSTALL: line 5: configure: command not found
make: *** No rule to make target `dep'. Stop.
./INSTALL: line 7: go: command not found
./INSTALL: line 8: syntax error near unexpected token `('
./INSTALL: line 8: ` make clean (to be sure)'
deian@linux-vsvw:~/Desktop/spca5xx-20060501>

TOTALLY LOST NOW! I do have the kernel souces and all. Then i try:

./Makefile

bash: ./Makefile: Permission denied

THEN i try Make and i got this:

linux-vsvw:/home/deian/Desktop/spca5xx-20060501 # make
Building SPCA5XX driver for 2.5/2.6 kernel.
Remember: you must have read/write access to your kernel source tree.
make -C /lib/modules/`uname -r`/build SUBDIRS=/home/deian/Desktop/spca5xx-20060501 CC=cc modules
make[1]: Entering directory `/usr/src/linux-2.6.16.13-4-obj/i386/default'
make -C ../../../linux-2.6.16.13-4 O=../linux-2.6.16.13-4-obj/i386/default modules
CC [M] /home/deian/Desktop/spca5xx-20060501/drivers/usb/spca5xx.o
CC [M] /home/deian/Desktop/spca5xx-20060501/drivers/usb/spcadecoder.o
/home/deian/Desktop/spca5xx-20060501/drivers/usb/spcadecoder.c: In function ‘fun_D’:
/home/deian/Desktop/spca5xx-20060501/drivers/usb/spcadecoder.c:809: warning: value computed is not used
LD [M] /home/deian/Desktop/spca5xx-20060501/spca5xx.o
Building modules, stage 2.
MODPOST
CC /home/deian/Desktop/spca5xx-20060501/spca5xx.mod.o
LD [M] /home/deian/Desktop/spca5xx-20060501/spca5xx.ko
make[1]: Leaving directory `/usr/src/linux-2.6.16.13-4-obj/i386/default'

THEN i write insmod spca5xx.ko and the hard drive churns a bit and i HOPE it works?!?!

Any pointers would be good.

Thanks so much.
 
Old 09-02-2006, 10:01 PM   #2
lurko
Member
 
Registered: Jun 2006
Location: Ontario, Canada
Distribution: Debian
Posts: 448

Rep: Reputation: 35
ok I'm a total noob here, and I'm pretty suck at compiling source code so I can't go into much detail (in fact I expect I would have some troubles trying to get this setup myself), but hopefully I can point you in the right direction at least.

OK, the file INSTALL is instructions on how to install, err, compile and install, not an installer file:
Code:
Module compile outside the kernel tree but need the source of your running kernel installed and configured.
be sure your kernel include usb and v4l stuff
Kernel 2.4.x 
	configure your kernel
	make dep
	go to the spca5xx directories
	make clean (to be sure)
	make
	if all goes right as root :
	make install
Kernel 2.6.x
	make clean
	make
	if all goes right as root :
	make install
	
To test please use the command line spcaview tool.
You need libsdl installed with the header from your distro or goto http://www.libsdl.org
/*******************************************************************************************/
	SPCAVIEW is the only V4L1 Apps for testing your SPCA5XX webcam.
	IF THAT WORK WITH SPCAVIEW ALL OTHERS V4L1 APPS SHOULD WORK !!!
	DON'T ASK ME ABOUT :
	XAWTV GNOMEMEETING MOTION EKIGA AMSN ZONEMINDER CAMORAMA CAMSTREAM
	VIDEODOG PALANTIR SPOKE CAMSOURCE MPLAYER VLC FFMPEG MPEG4IP .....
		ASK THE AUTHORS. YOU SHOULD GET A BETTER ANSWER !!!
/*******************************************************************************************/

plug the cam
as root :
	lsmod
	spca5xx should be load with videodev, if not, somethings goes wrong,
	verify that your cam is supported if not and you are sure for a Sunplus
	chip goto irc.freenode.net channel #spca50x and ask for help
	if yes run spcaview with this parameters (maybe read the readme is the
	best)
	spcaview -d /dev/video0 -f yuv 
	if you have a bttv card use change the video0 to video1
	that should work
	Enjoy !!
I can't explain it any better than that without promoting confusion. What distro are you using? this site that I got the source package from has binary packages (already compiled) for 18 different distros, you might want to try using one of them, as it should be as simple as one command (which command would depend on the distro). Though I believe you will still need the USB and VideoForLinux in your kernel for it to work (they're probably there by default, but I don't know for certain).

also, According to another txt file in the source code tarball, there are now modules supporting some of the hardware this driver supports right in the kernel..

anyway, it's not always as simple as ./configure, make, make install. I usually give up in the end out of frustration when it's not. Hope this info helps.
 
Old 09-02-2006, 10:07 PM   #3
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 14.2 Solus
Posts: 2,264

Rep: Reputation: 51
In most packages the install file contains instructions on how to compile and install it. Read it.

For a good many packages it's really as simple as ./configure && make && make install but it depends and can vary. Read the install instructions.
 
Old 09-03-2006, 05:27 AM   #4
deiz92
Member
 
Registered: Aug 2006
Distribution: Suse 10.2
Posts: 32

Original Poster
Rep: Reputation: 15
lurco masonm, good work, how silly of me to think there was a seperate installer when i installed it myself, all is clear now, i do have a bttv tv card too, so i need to make it video1, also i will need spcaview too to text it, ur not as much of a noob as i am obviously. you sussed that out well!

do i need v4l too, i can't see that in the list of loaded kernel devices unless it's loaded inside the kernel itself.

how do i change the cam to video1?

thanks
 
Old 09-03-2006, 05:57 AM   #5
lurko
Member
 
Registered: Jun 2006
Location: Ontario, Canada
Distribution: Debian
Posts: 448

Rep: Reputation: 35
I'm afraid I'm not qualified to comment on your new questions, I have zero experience with video devices beyond my nvidia card.

however as far as determining whether v4l is in your kernel, you could look in /boot for a config text file that corresponds to the kernel you're using. Look for the mulitmedia section(about 2/3 the way down in my 2.6.17.11 config file).

if it looks like this (with all =y), then you've got v4l right in the kernel.
CONFIG_VIDEO_DEV=y
CONFIG_VIDEO_V4L1=y
CONFIG_VIDEO_V4L1_COMPAT=y
CONFIG_VIDEO_V4L2=y
 
Old 09-03-2006, 06:50 AM   #6
deiz92
Member
 
Registered: Aug 2006
Distribution: Suse 10.2
Posts: 32

Original Poster
Rep: Reputation: 15
HMMM... that explains all, i don't have anything under Video for Linux! Gutted! Another obstacle to overcome! Thats what happens when u get open source suse, it's very limited due to licencing restrictions... i will search for a post on installing video for linux, failing that i will post

thanks for your help guys
 
Old 09-03-2006, 07:10 AM   #7
lurko
Member
 
Registered: Jun 2006
Location: Ontario, Canada
Distribution: Debian
Posts: 448

Rep: Reputation: 35
what you want is a kernel-(re)compile guide so you can enable the v4l support. It might also be possible to patch it in, but I don't know anything about that yet, and it's quite possible I'm wrong about the patching bit. You should definitely be able to enable v4l with kernel compile though.

Last edited by lurko; 09-03-2006 at 07:11 AM.
 
Old 09-03-2006, 08:15 AM   #8
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 14.2 Solus
Posts: 2,264

Rep: Reputation: 51
Just recompile your kernel and compile in everything you need, including the V4L options.
 
Old 09-03-2006, 01:49 PM   #9
deiz92
Member
 
Registered: Aug 2006
Distribution: Suse 10.2
Posts: 32

Original Poster
Rep: Reputation: 15
how do i go about doing that, anyone got any good sites or guides or step by step on how to do it, i won't worry too much about fudging it up as the install is quite new, as long as i can get into windows after.
 
Old 09-03-2006, 02:06 PM   #10
lurko
Member
 
Registered: Jun 2006
Location: Ontario, Canada
Distribution: Debian
Posts: 448

Rep: Reputation: 35
it depends on the distro(I think), google "kernel compile" and the name of your distro, there'll be a bunch of guides I'm sure. I know the debian forum has a kernel compile guide stickied, it's likely some of the other distro-specific forums do too.

this is the guide I used to learn, it should be good for anyone to learn the basics, but there may be required steps in other distros that that guide doesn't cover. edit: btw I completely ignore the first section, "X and su".

Last edited by lurko; 09-03-2006 at 02:08 PM.
 
Old 09-03-2006, 02:11 PM   #11
masonm
Senior Member
 
Registered: Mar 2003
Location: Following the white rabbit
Distribution: Slackware64 14.2 Solus
Posts: 2,264

Rep: Reputation: 51
There are several threads on the forums about compiling your kernel.

In a nutshell you go to the source directory "usually /usr/src/kernel-version

do a make menuconfig
select your options
save
do a make
do a make modules_install
then you can either do a make install or manually copy the bzimage file to your /boot directory named whatever you want (usually vmlinuz) and edit your bootloader.

Make sure to create a backup copy of your current vmlinuz in /boot and edit your bootloader to allow you to boot using that in case the new kernel doesn't work.


This is all very generic and there are some variances depending on the distro.
 
Old 09-03-2006, 10:53 PM   #12
lurko
Member
 
Registered: Jun 2006
Location: Ontario, Canada
Distribution: Debian
Posts: 448

Rep: Reputation: 35
just browsing around the site and came across this guide in news-->syndicated news:

LXer: Howto: build Linux kernel module against installed kernel w/o full kernel source tree.

it wouldn't be a bad idea to learn full-kernel compiling anyway though...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Problems installing ALSA: insmod snd-intel8x0 fails. BWebb Linux - Newbie 21 01-04-2007 11:01 AM
insmod fails after compiling new kernel Brotherswing Linux - Hardware 4 02-18-2006 12:51 AM
Insmod command not found after installing pctel-0.9.6 under rh8 Bensoft Kill MS Linux - Software 7 11-16-2003 08:38 PM
Compiling a kernel module results in "insmod" version mvega Linux - General 2 07-30-2003 10:03 AM
Adventures in Woody-land (compiling and installing modules) iraysyvalo Debian 1 07-16-2003 10:13 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:17 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration