Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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'm a Windows technician most days, but very new to Linux-only a couple of weeks experience.
I'm trying to get a Hauppauge PVR-150 capture card working in KnoppMyth R5A12 (Debian Testing, kernel 2.6.9 variant).
I untarred the kernel sources, but when I try to compile ivtv, I get this error:
Code:
root@box:/ivtv-0.3.2s/driver# make
make CONFIG_VIDEO_IVTV=m -C /lib/modules/2.6.9-chw-4/build M=/ivtv-0.3.2s/driver/modules
make: *** /lib/modules/2.6.9-chw-4/build: No such file or directory. Stop.
make: *** [all} Error 2
I'd appreciate it if someone could suggest something, including an explanation, as I'm trying to learn and not just learn to type commands.
I'm not an expert but I also had to get ivtv working on linux (though a different distribution). It took a while since the documentation is rather sparse but I did finally manage to get it working.
Important: you probably want to use the ivtv source being worked on by Chris Kennedy. He seems to be the main (only?) one doing active development these days. Unfortunately, there is no one keeping the documentation up to date.
It wants to build new kernel modules so it looks for the source for the currently running kernel in /lib/modules/`uname -r`/build
When you compile a new kernel and do make modules_install it creates an symbolic link in /lib/modules/`uname -r`/build pointing at the kernel source. If you enter the command uname -r into a terminal it will return the name of the currently running kernel. Compiling the kernel is hard. Getting a TV card to work can be hard (I have a Hauppauge WinTV Nova-T DVB-T), so it may a steep learning curve that you face. Hard, but not impossible Good luck
Appreciate the info. guys, but I'm still not clear.
I've already downloaded the ivtv source, and untarred the kernel source.
I'm pretty sure I need to compile the driver only, NOT the kernel.
Are you saying that compiling ivtv is going to trigger a kernel compile? That doesn't sound right to me. As far as I've read, all the Makefile does is look at the kernel source for info. and compile ivtv. That's it.
I guess what I need to ask is, why is the Makefile not finding the directory when it's there?
Someone suggested to me that it can't find the right folder, or that it's finding a different version than it's expecting.
Is it a symlink problem?
Do I need to modify the Makefile? Should a beginner even consider modifying a Makefile for a driver?
Please elaborate. The endless loop of symlinks here has me very confused.
You should be able to get it working without recompiling the kernel, but the ivtv source is going to want to find the kernel source for your currently running kernel in the state it was in just after the kernel was compiled. So downloading a vanila kernel from kernel.org won't do. I'm not familiar with KnoppMyth. You haven't said how you installed the kernel source or where it is. Does /lib/modules/2.6.9-chw-4/build exist? Is it a symbolic link? What's it pointing at?
Thanks for your reply. Yeah, I figured downloading a vanilla kernel wouldn't work, since this kernel has been customized. The KnoppMyth installer did the kernel install for me. Yes,
/lib/modules/2.6.9-chw-4/build does exist. It is a symlink that points to /usr/src/linux
I'm guessing that might be the problem. /usr/src/linux points to /kernel-source-2.6.9-chw ,
a directory which does exist. However...
according to the author's comments, "By default, the build is done against the running kernel version..." I assume that means that the makefile will look for /kernel-source-2.6.9-chw-4 ?
Since /usr/src/linux points to kernel-source-2.6.9-chw , but the Makefile looks for 2.6.9-chw-4 ,
I'm guessing that's the problem.
Does that sound right, (coming from a Windows guy) ?
How would one go about fixing something like that?
BTW, in case you haven't guessed, KnoppMyth is Knoppix customized for MythTV PVR/entertainment software. It makes MythTV much easier to install, though you'd never know it from my posts.
Thanks again,
newmoon
Quote:
Originally posted by Andrew Benton You should be able to get it working without recompiling the kernel, but the ivtv source is going to want to find the kernel source for your currently running kernel in the state it was in just after the kernel was compiled. So downloading a vanila kernel from kernel.org won't do. I'm not familiar with KnoppMyth. You haven't said how you installed the kernel source or where it is. Does /lib/modules/2.6.9-chw-4/build exist? Is it a symbolic link? What's it pointing at?
From the way that you've described the chain of symbolic links things should be OK. The fact that the folder is called kernel-source-2.6.9-chw shouldn't matter as the ivtv source should think it's called /lib/modules/2.6.9-chw-4/build. I think it checks what version the source is by looking in the Makefile. You can check the chain of symlinks is sane and see what is in the kernel makefile with the command
cat /lib/modules/2.6.9-chw-4/build/Makefile | more
Well it shows that /lib/modules/2.6.9-chw-4/build isn't pointing at your kernel source because, as the error message says, /lib/modules/2.6.9-chw-4/build/Makefile doesn't exist. Where is your kernel source? Is it in /usr/src/kernel-source-2.6.9-chw
If so
Well, I was so sure that this made sense, and that it would work. But when I tried it, it didn't. Exact same error message as before.
Any ideas where to go from here?
newmoon
Quote:
Originally posted by Andrew Benton Well it shows that /lib/modules/2.6.9-chw-4/build isn't pointing at your kernel source because, as the error message says, /lib/modules/2.6.9-chw-4/build/Makefile doesn't exist. Where is your kernel source? Is it in /usr/src/kernel-source-2.6.9-chw
If so
Now Make ran fine, with the exception of one error. In stage 2, I got error:
Code:
Building modules, stage 2.
MODPOST
Warning: could not find versions for .tmp_versions/ivtv.mod
Thanks for sticking with me so far, Andrew. I posted on other boards, and people
just dropped by for one comment or gave me totally misleading info. altogether.
Any idea what that error is?
newmoon
Quote:
Originally posted by Andrew Benton Well it shows that /lib/modules/2.6.9-chw-4/build isn't pointing at your kernel source because, as the error message says, /lib/modules/2.6.9-chw-4/build/Makefile doesn't exist. Where is your kernel source? Is it in /usr/src/kernel-source-2.6.9-chw
If so
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.