Do I need the entire source for compiling modules?
Linux - NewbieThis 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
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.
Do I need the entire source for compiling modules?
I've downloaded the kernel source for the version of linux I am running (Debian 2.4.27)
I've put the source in usr/src/linux. I've also noticed that the include/linux directory in the source does not have the version.h file and the module.h file is not correct as well.
The asm does not exist, although the folder for the architecture is there (x86).
In short, I can't compile because many errors relating to the above files and folders.
Do I really need the entire source for modules? Or can I just download the appropriate kernel headers and accomlish the same thing?
If I do need the source, where can I get one that has the right header files?
Install a package called "linux-headers-2.4.27-*", where the star indicates the exact kernel version you have installed. From what I can see in aptitude, this could be any of the following:
I downloaded the kernel headers and that let my module compile just fine. Thanks for that.
I did get the source using the apt-get, but the header files contained are not the same ones as the kernel-headers-2.4.27-2-386. Do I have to compile the kernel first before the source will contain the right header files?
The kernel headers package is the set of headers that were used in order to compile the kernel that you are using, assuming you are using one of the packaged kernels.
If you compile one of your own kernels, then the headers from that kernel are the ones that will apply for any additional modules that you might want later.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.