LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   kernel headers (https://www.linuxquestions.org/questions/linux-newbie-8/kernel-headers-94535/)

Imiro 09-19-2003 11:27 AM

kernel headers
 
Hiya,

My system is RedHat 9 kernel-2.4.20-20.9 and I'm installing software that has to be compiled in order to make it work. The list of needed stuff:
--
rpm -q binutils
rpm -q cpp
rpm -q glibc-devel
rpm -q gcc
rpm -q kernel-headers
rpm -q kernel-source
--
kernel source I installed ok.
rpm -q kernel-headers says not installed.

Q1) What are kernel headers?

Q2) I'm not able to find the headers.rpm of the exact same version as kernel. Is it critical to find the match or could I use any 2.4-header version?

Q3) I'm a bit confused by the many kernel-source.rpm distributions, some with i386-i686 and others with athlon/intel written in them too. I have AMD 3000+ cpu, which i guess means it's i686. Is there a good rule of thumb here?

Mara 09-19-2003 03:28 PM

Re: kernel headers
 
Quote:

Originally posted by Imiro

Q1) What are kernel headers?

Part of kernel files (.h). Thay're needed to compile many programs. Note here: kernel-source should work as well here. Kernel-headers package is a part of kernel-source (kernel-headers is much smaller). You should be able to handle this by symlinking include/ directory in your kernel source to /usr/include (or just symlink the kernel source to /usr/src/linux).

Quote:

Q2) I'm not able to find the headers.rpm of the exact same version as kernel. Is it critical to find the match or could I use any 2.4-header version?
Find closest maching package. For example, when you have 2.4.20-something kernel, all 2.4.20-something_else headers should be OK. But you shouldn't need them (see above).

Quote:

Q3) I'm a bit confused by the many kernel-source.rpm distributions, some with i386-i686 and others with athlon/intel written in them too. I have AMD 3000+ cpu, which i guess means it's i686. Is there a good rule of thumb here?
For Athlon, get *athlon or (if there's no *athlon) i686.

Imiro 09-19-2003 07:46 PM

Thanks for your reply Mara, it cleared things. I was just left wondering if you actually mean symlinking the contents of kernel-src/include to usr/include instead of the directory (resulting --> usr/include/include)? My money would be on the first option, but trying to be really carefull not to mess up :)

And what if there allready are files/dirs of same name; are they over-written and if so would it be ok?

Mara 09-20-2003 05:41 PM

I meant the contents. It's even bette to copy it, in fact (because you may forget and delete /usr/src/linux).

If you have files of the same name, don't modify them. Headers for an older version usually work just fine (headers have list of functions, kernel variables etc, they don't change as often as other kenel files).


All times are GMT -5. The time now is 12:22 AM.