LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-22-2006, 09:40 AM   #1
mhuman1
LQ Newbie
 
Registered: May 2006
Posts: 7

Rep: Reputation: 0
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?
 
Old 05-22-2006, 10:00 AM   #2
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
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:

kernel-headers-2.4.27-2-386
kernel-headers-2.4.27-2-586tsc
kernel-headers-2.4.27-2-686
kernel-headers-2.4.27-2-686-smp
kernel-headers-2.4.27-2-k6
kernel-headers-2.4.27-2-k7
kernel-headers-2.4.27-2-k7-smp
 
Old 05-22-2006, 10:45 AM   #3
Lotharster
Member
 
Registered: Nov 2005
Posts: 144

Rep: Reputation: 18
If you need the source (some modules require it), you can download it with apt:
Code:
apt-get install kernel-source-2.4.27-2-386
or something similar, depending on the kernel version you are running. You can find that out with:
Code:
uname -a
 
Old 05-22-2006, 11:30 AM   #4
mhuman1
LQ Newbie
 
Registered: May 2006
Posts: 7

Original Poster
Rep: Reputation: 0
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?
 
Old 05-23-2006, 09:43 AM   #5
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
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.
 
  


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
Compiling Modules BBPS Linux - Software 1 05-12-2006 07:47 AM
Compiling as modules: useful always? itzfritz Linux - General 2 11-17-2004 07:57 PM
compiling software from source...how do i delete the folder w/ source? webazoid Linux - Software 2 07-01-2004 09:09 PM
after compiling 2.6.3 modules... c0rderr0y Linux - Newbie 1 02-23-2004 02:48 AM
Modules not Compiling BlakeB395 Linux - Software 0 02-08-2004 03:06 AM

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

All times are GMT -5. The time now is 07:21 AM.

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
Open Source Consulting | Domain Registration