Want to compile a driver, but keep having problems
DebianThis forum is for the discussion of Debian Linux.
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.
Want to compile a driver, but keep having problems
I keep trying to compile the qc-usb driver for my quick cam web camera. It said all I needed was the kernel source, gcc and v4l. I did the "apt-get install kernel-source-2.6.10" and then extracted the file to "/usr/src/linux-2.6.10" and made a symlink to the "/usr/src/linux". However, it kept getting errors. I figured it was because the source had not been compiled, so I got the kernel-source package from the mepis repositories and copied the files into the kernel source directory, overwriting any same files (and also copied the /boot/config-2.6.10 to /usr/src/linux/.config). That almost worked, but it needed the fixdep program... so I went into that direcotry and compiled it with "gcc fixdep.c". It got past that, but now it needs another file, modpost. I tried compiling that the same way as before, but got an error message saying that I didn't have "elfconfig.h". I suspect these programs will leave if I actually compile the kernel, but the last time I did that it was horrendous... Is there a way I can compile it without installing it to my computer?
I'm using Simply Mepis 3.3 (debian testing/unstable)
Since you have a 2.6 series kernel, you should be able to compile your kernel to the exact currently running settings. This command should do it (run it from the source directory):
Re: Want to compile a driver, but keep having problems
Quote:
Originally posted by justintime32 I keep trying to compile the qc-usb driver for my quick cam web camera. It said all I needed was the kernel source, gcc and v4l. I did the "apt-get install kernel-source-2.6.10" and then extracted the file to "/usr/src/linux-2.6.10" and made a symlink to the "/usr/src/linux". However, it kept getting errors. I figured it was because the source had not been compiled, so I got the kernel-source package from the mepis repositories and copied the files into the kernel source directory, overwriting any same files (and also copied the /boot/config-2.6.10 to /usr/src/linux/.config). That almost worked, but it needed the fixdep program... so I went into that direcotry and compiled it with "gcc fixdep.c". It got past that, but now it needs another file, modpost. I tried compiling that the same way as before, but got an error message saying that I didn't have "elfconfig.h". I suspect these programs will leave if I actually compile the kernel, but the last time I did that it was horrendous... Is there a way I can compile it without installing it to my computer?
I'm using Simply Mepis 3.3 (debian testing/unstable)
Why do you not compile and install the kernel source you have. Just copy the config for the running kernel then.
The last time I did that, there were all sorts of problems. None of the modules would load, including the NVidia one so I didn't have a graphical environment.
I'd like to do what rjlee suggested and compile an exact version of the kernel I'm running, but without installing it.
If you don't have the /proc/config.gz file, then you will need to find a copy of the .config file for your system and copy it to /usr/src/linux.
There might be one on the install disks for your distro; then again, there might not be — in which case you will probably have to recompile your kernel.
You can probably upgrade your kernel to a version that supports /proc/config.gz; in this case the make cloneconfig trick will work.
Sorry; that was a typo (fixed now in above post); you could probably have figured this out from the README.
Running “make” will only compile the kernel image; it won't set up dependencies, which is the most important step here. It also won't make modules IIRC.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.