Notices

Overclockers Forums > Software > Alternative Operating Systems
Alternative Operating Systems Linux, Mac, Unix Operating Systems and Applications
Forum Jump

What are kernel headers?

Post Reply New Thread Subscribe Search this Thread
 
 
Thread Tools
Old 06-29-10, 04:43 PM Thread Starter   #1
whooping_a_panda
Mr Slave Senior

 
whooping_a_panda's Avatar 

Join Date: Jul 2001
Location: Tucson, Arizona

10 Year Badge
 
What are kernel headers?


so i've been playing with a gentoo install to a good deal of success too! i'm trying to get a usb wifi dongle working right that has drivers, but the drivers were done in the 2.6.10-20 range of kernels. a few sites suggest installing the proper kernel headers and i did find how to emerge them through portage.

but what the heck are they?

__________________
That, my droogs, was real milanky horrorshow

I'm on the karma payment plan. -- My Heatware
whooping_a_panda is offline   QUOTE Thanks
Old 06-29-10, 08:38 PM   #2
Jorick
Registered



Join Date: Feb 2008

 
Quote:
Originally Posted by whooping_a_panda View Post
so i've been playing with a gentoo install to a good deal of success too! i'm trying to get a usb wifi dongle working right that has drivers, but the drivers were done in the 2.6.10-20 range of kernels. a few sites suggest installing the proper kernel headers and i did find how to emerge them through portage.

but what the heck are they?
Going ultra-basic, kernel headers are roadmaps to some of the internals of the kernel. Other software (drivers/etc) can use those roadmaps to get where they need to go in the kernel.

Think about it like a subway system..

Without a map of the subway system and the times that trains get to stations, you're pretty much hosed to get from point A to point B using the subway. With that stuff, you can pretty much know what trains to take when. You don't have to know how a train works, what the trains are made of, what the tracks are made of, etc. All you have to know is how to get on the train, which station to get on, and when to get on.

You're probably being told to get kernel headers to compile drivers for the kernel. Those drivers have to know how to interface to certain parts of the kernel. They can guess, but getting the headers (the roadmap) can help if there are issues.

__________________
MOBO : MSI Pro-E
CPU : i7-930
RAM : 6GB Corsair
<still building>
Jorick is offline   QUOTE Thanks
Old 06-30-10, 08:00 AM   #3
Shelnutt2
Overclockers Team Content Editor

 
Shelnutt2's Avatar 

Join Date: Jun 2005
Location: /home/

 
The headers are all of the .h files associated for the kernel. In gentoo you can't just pull in the headers. You'd have to pull in then entire source, but that won't work because the newer kernel will reject a module built for the older kernel.

What usb dongle are you trying to get? There might be a new kernel driver for it?

__________________
Build!.Borg!.Recruit!.Folding.for.Team.32!
Gigabyte P35-DS3R, E6300, 2x512MB Team Group DDR2 667, EVGA 7800GT Heat

Want to run the folding@home gpu client in linux?
www.linuxfah.info

Your teacher is a dumbass. The equation is exact. ~Frodo Baggins
Damn....It's 12:00 AM and I thought my 805 would be a magic pumkin and turn into a conroe.........boy was I fooled:) ~Stilletto
This is what I get for not only being a newb, but also disregarding instructions! ~ShadowPho
I hate women... but im not gay lol. ~MrCrowley
Love can fade but knowledge stays forever (unless you develop alzheimers). ~Constantinos
Shelnutt2 is offline Folding Profile   QUOTE Thanks
Old 06-30-10, 04:04 PM Thread Starter   #4
whooping_a_panda
Mr Slave Senior

 
whooping_a_panda's Avatar 

Join Date: Jul 2001
Location: Tucson, Arizona

10 Year Badge
 
its a d-link dwl-g122 based on a ralink 2570 chipset. been trying to get this driver to work as it supports some nifty features i'd like to learn how to play with. but it fails the make, which makes sense to me now as to why the kernel headers were suggested at other forums i've read. i would be open to just starting with a working fix, but i haven't really tried hard to get just anything to work yet.

gentoo specifics aside would the header files for a particular kernel version match or is it standard practice to install say 2.6.19 headers onto a 2.6.32 kernel? i only ask because as i was looking through portage it seems not every kernel has headers available to it (through portage at least). my 2.6.32 is not listed for instance.

http://www.gentoo-portage.com/sys-kernel/linux-headers

__________________
That, my droogs, was real milanky horrorshow

I'm on the karma payment plan. -- My Heatware
whooping_a_panda is offline   QUOTE Thanks
Old 06-30-10, 09:34 PM   #5
Shelnutt2
Overclockers Team Content Editor

 
Shelnutt2's Avatar 

Join Date: Jun 2005
Location: /home/

 
No you would want to have the particular kernel version. I don't know but my theory has always been the linux-headers package is not always up todate because gentoo expects the defacto is to just have the whole sources.

It seem a few things:
1) There is support in the kernel for your card, under device drivers -> wireless lan -> ralink driver support . I'm not sure if this driver supports the features you are looking for or not?
2) The website you linked says version 1.6.4 adds support for kernel 2.6.29. While that kernel is getting old, it's more up to date then 2.6.20. Maybe you can go with that version?

__________________
Build!.Borg!.Recruit!.Folding.for.Team.32!
Gigabyte P35-DS3R, E6300, 2x512MB Team Group DDR2 667, EVGA 7800GT Heat

Want to run the folding@home gpu client in linux?
www.linuxfah.info

Your teacher is a dumbass. The equation is exact. ~Frodo Baggins
Damn....It's 12:00 AM and I thought my 805 would be a magic pumkin and turn into a conroe.........boy was I fooled:) ~Stilletto
This is what I get for not only being a newb, but also disregarding instructions! ~ShadowPho
I hate women... but im not gay lol. ~MrCrowley
Love can fade but knowledge stays forever (unless you develop alzheimers). ~Constantinos

Last edited by Shelnutt2; 06-30-10 at 09:43 PM.
Shelnutt2 is offline Folding Profile   QUOTE Thanks
Old 07-01-10, 02:04 AM Thread Starter   #6
whooping_a_panda
Mr Slave Senior

 
whooping_a_panda's Avatar 

Join Date: Jul 2001
Location: Tucson, Arizona

10 Year Badge
 
Quote:
Originally Posted by Shelnutt2 View Post

It seem a few things:
1) There is support in the kernel for your card, under device drivers -> wireless lan -> ralink driver support . I'm not sure if this driver supports the features you are looking for or not?
2) The website you linked says version 1.6.4 adds support for kernel 2.6.29. While that kernel is getting old, it's more up to date then 2.6.20. Maybe you can go with that version?
this is probably what i'll end up doing, and i might build a 2nd kernel of 2.6.29 just to play around with some of the wifi tools mostly i was just curious as to the kernel headers and their function. i'm pretty green with linux, knowing just enough to be dangerous haha, but i'm having a lot of fun learning. and gentoo is just rough enough on newbs for my liking

i imagine i'll have to keep the earlier kernel on its own partition with its own system as there will probably be a lot of other compilation problems as this one.

which i guess brings up a question in itself. i have a partition dedicated to swap space (2GB) if i built another system with the 2.6.29 would it use that same swap space or would it need its own swap partition? either way i'll be in vegas for the week so all the linux i'll be doing will be attempting an install on a macbook pro. and i can't wait to see what kind of hardware compatibility crapstorm i'll run into with this

__________________
That, my droogs, was real milanky horrorshow

I'm on the karma payment plan. -- My Heatware
whooping_a_panda is offline   QUOTE Thanks
Old 07-01-10, 06:55 AM   #7
Shelnutt2
Overclockers Team Content Editor

 
Shelnutt2's Avatar 

Join Date: Jun 2005
Location: /home/

 
Actually with gentoo and really any distro you are fine having multiple kernels. Just edit grub and make sure you pick the one you want in grub . The only limitation of this is you can't mix 2.4 and 2.6 kernels and some of the early 2.6 kernels probably will be lacking features need.

However having 2.6.29 and other's won't be a problem at all.

Just do emerge -av =sys-kernel/gentoo-sources-2.6.29-r6 (or -r5 if you aren't doing a testing install).
That will put the sources in /usr/src/linux-2.6.29-r5-gentoo . Make sure you don't use the symlink flag or else it'll symlink it to /usr/src/linux too.

Then compile it like in the gentoo handbook, don't forget make modules && make modules_install. Also you know about the -j flag for make right?

Edit grub and then reboot and select your new kernel .

__________________
Build!.Borg!.Recruit!.Folding.for.Team.32!
Gigabyte P35-DS3R, E6300, 2x512MB Team Group DDR2 667, EVGA 7800GT Heat

Want to run the folding@home gpu client in linux?
www.linuxfah.info

Your teacher is a dumbass. The equation is exact. ~Frodo Baggins
Damn....It's 12:00 AM and I thought my 805 would be a magic pumkin and turn into a conroe.........boy was I fooled:) ~Stilletto
This is what I get for not only being a newb, but also disregarding instructions! ~ShadowPho
I hate women... but im not gay lol. ~MrCrowley
Love can fade but knowledge stays forever (unless you develop alzheimers). ~Constantinos
Shelnutt2 is offline Folding Profile   QUOTE Thanks
Old 07-01-10, 11:54 AM Thread Starter   #8
whooping_a_panda
Mr Slave Senior

 
whooping_a_panda's Avatar 

Join Date: Jul 2001
Location: Tucson, Arizona

10 Year Badge
 
cool i keep a stable and a test kernel and with pointers in my grub.conf in case i bork something so this is a pretty simple extension then

using -j8 in my MAKEOPTS for my Q6600, the documentation i found said -j = cores+1 but i also found some evidence making it a subjective selection, though i'm not really sure of the reasoning besides the "-j flag is just a guestimate"

i did run into issues with parallel-fetch creating lock files that would not self remove as expected and stop portage dead in its tracks (manually removing the lock file and re emerging would fix it but that got old every 5-10 packages).

__________________
That, my droogs, was real milanky horrorshow

I'm on the karma payment plan. -- My Heatware
whooping_a_panda is offline   QUOTE Thanks
Old 07-01-10, 06:06 PM   #9
cyberfish
Member



Join Date: May 2008
Location: Vancouver, BC

 
It's typical to install multiple kernels on the same system. No need to have a partition for each.

I have about 10 installed I think. Too lazy to remove old ones when I get new ones.

A kernel is just an entry in menu.lst, and a kernel image file in /boot, that gets copied to memory on startup. The rest can be shared.

No need for separate swap, too. The swap is effectively wiped out every boot (except if you do hibernate to disk, in which case your hibernation image will be wiped out if you try to boot a different kernel).
cyberfish is offline Heatware Profile   QUOTE Thanks

Post Reply New Thread Subscribe


Overclockers Forums > Software > Alternative Operating Systems
Alternative Operating Systems Linux, Mac, Unix Operating Systems and Applications
Forum Jump

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Mobile Skin
All times are GMT -5. The time now is 09:38 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
You can add these icons by updating your profile information to include your Heatware ID, Benching Profile ID or your Folding/SETI profile ID. Edit your profile!
X

Welcome to Overclockers.com

Create your username to jump into the discussion!

New members like you have made this the best community on the Internet since 1998!


(4 digit year)

Why Join Us?

  • Share experience
  • Max out your hardware
  • Best forum members anywhere
  • Customized forum experience

Already a member?