LinuxQuestions.org
Review your favorite Linux distribution.
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 06-16-2005, 03:56 PM   #1
stabu
Member
 
Registered: Mar 2004
Location: dublin IRL
Distribution: Slackv12.1, Slamd64v12.1,Xubuntu v8.10_64, FC8_64
Posts: 438
Blog Entries: 5

Rep: Reputation: 32
headers


When installing modules, I'm frequently asked for headers, kernel headers that is.

Often, their names have to be as specific as hell.

But what happens if you've recompiled, or (even easier) renamed your kernel so that what uname -r says is no longer right?

Are headers so specific to a certain (distro) kernel? Can they be generated with the appropriate source and config file? What are they in any case? some sort of executive summary of the kernel? They have me a quandry, that's for sure.
 
Old 06-16-2005, 04:40 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Ubuntu
Posts: 8,507

Rep: Reputation: 124Reputation: 124
Headers are a bunch of files (ending in .h, for header) that essentially describe the programming functions available to userspace programs. (OK, I lied a bit, they also describe things internal to the kernel, but that's only needed for kernel compilation).

Basically, the headers say: "I have this function available, and this function, and this value" and so forth.

Now, on to your question:
If you have kernel source (or headers) for the proper revision installed, the exact name should not be terribly important.

If your current kernel is 2.6.11, have some 2.6.11 headers installed. Just make sure the symlink /lib/modules/`uname -r`/build points to the installed headers, and you should be good to go.
 
Old 06-16-2005, 04:51 PM   #3
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
Quote:
Originally posted by Matir


If your current kernel is 2.6.11, have some 2.6.11 headers installed. Just make sure the symlink /lib/modules/`uname -r`/build points to the installed headers, and you should be good to go.
i think that's actually suposed to be the real build directory not just bare source files but i wouldn't swear to it.

But what happens if you've recompiled, or (even easier) renamed your kernel so that what uname -r says is no longer right?

uname -r is always the current running kernel which is what you need for compiling kernel space junk like modules. it can't be wrong or made wrong in any way (the kernel knows who it is)
 
Old 06-16-2005, 05:47 PM   #4
stabu
Member
 
Registered: Mar 2004
Location: dublin IRL
Distribution: Slackv12.1, Slamd64v12.1,Xubuntu v8.10_64, FC8_64
Posts: 438
Blog Entries: 5

Original Poster
Rep: Reputation: 32
so maitr you're saying that header files only depend on the version kernel you're using? i.e. the distro doesn't matter? (given that your /lib/modules/.../build symlink is correctly pointed).

That's a revelation. I thought that headers would at least be distro-dependent and even kernel-recompile dependent.

I take your points foo_bar_foo, thanks.
 
  


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
How to get kernel headers? pingu Linux - Software 5 11-25-2004 04:08 AM
mdk 10 headers horatiu_v Linux - Newbie 3 10-06-2004 09:10 AM
kernel-headers warmongr Red Hat 6 03-19-2004 12:34 PM
kernel-headers for 2.6 uday Slackware 2 02-14-2004 11:03 AM
what are headers? mep]-[isto Linux - Newbie 7 12-14-2003 06:26 PM

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

All times are GMT -5. The time now is 10:03 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