You are not logged in.

#1 2016-08-19 19:21:40

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Linux Kernel Headers

So I was looking about some past help threads and noticed that a few required installation of linux kernel headers. Such as:
https://packages.debian.org/jessie/linu … .0-4-amd64

I just chose the amd64 version cause it's what I'm using. Anyway my question is, are these headers built into the current kernel that I'm running? Or are these sort of an "expanded universe" of extra's that didn't make it into the 3.16 kernel but are avaiable? I ask because when I run apt-cache policy..


kingghidorah@kingghidorah:~$ sudo apt-cache policy linux-headers-3.16.0-4-amd64 
[sudo] password for kingghidorah: 
linux-headers-3.16.0-4-amd64:
  Installed: (none)
  Candidate: 3.16.7-ckt25-2+deb8u3
  Version table:
     3.16.7-ckt25-2+deb8u3 0
        500 http://security.debian.org/ jessie/updates/main amd64 Packages
     3.16.7-ckt25-2 0
        500 http://httpredir.debian.org/debian/ jessie/main amd64 Packages
        500 http://httpredir.debian.org/debian/ jessie-updates/main amd64 Packages

Which tells me I don't have any of the kernel headers installed.


We can see a list of files included in the header package here:

https://packages.debian.org/jessie/amd6 … 4/filelist

So are these already compiled into the kernel and i don't need to install the headers unless something goes wrong? Or are they left out to support other 3rd party devices and programs that need compiling?

Lastly, how and when do you know if a person is having an issue with something, that it's a missing kernel header file?

Thanks everyone! As always, any response, leads and hints are appreciated.


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#2 2016-08-19 20:31:08

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Linux Kernel Headers

https://unix.stackexchange.com/question … el-headers

Generally speaking, the headers are only required for custom kernel modules such as the proprietary ATI & NVIDIA drivers.


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#3 2016-08-19 21:11:08

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Linux Kernel Headers

Hmm I see... so then if these are for using specific drivers.. why not just package the needed linux-header file with the driver?  If i'm writing a driver based off of the a proprietary nvidia card, why don't I just include the header file that i used with the package, and not leave it up to the user to obtain?


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#4 2016-08-19 21:12:27

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 8,759
Website

Re: Linux Kernel Headers

Horizon_Brave wrote:

why not just package the needed linux-header file with the driver?

Because you would then have to package all of the potential headers that could be needed.

Also, this isn't Windows tongue


“Et ignotas animum dimittit in artes.” — Ovid, Metamorphoses, VIII., 18.

Forum Rules   •   How to report a problem   •   Software that rocks

Offline

#5 2016-08-19 22:22:50

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Linux Kernel Headers

Head_on_a_Stick wrote:

Also, this isn't Windows tongue


I knew I took a wrong turn someplace! I'm out of here!  tongue

Hmm okay, just to recap, if the user is needing a custom module (driver) to support some function on an nVidia card. He downloads the correct driver that's written for his fancy card, but it still doesn't work, or is spotty in it's usage. This is most likely the result that the header file needed for a certain function in the driver is missing. So the user would go and download the specific header (.h) file? or would he have to go and install all of the headers in the entire   linux-headers-3.16.x.x.x-amd64   package?   Besides that last question, I think I get it...


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#6 2016-08-20 00:03:56

PackRat
jgmenu user Numero Uno
Registered: 2015-10-02
Posts: 1,496

Re: Linux Kernel Headers


You must unlearn what you have learned.
    -- yoda

Offline

#7 2016-08-20 00:45:08

Horizon_Brave
Operating System: Linux-Nettrix
Registered: 2015-10-18
Posts: 1,473

Re: Linux Kernel Headers

Horizon_Brave wrote:
Head_on_a_Stick wrote:

Also, this isn't Windows tongue


I knew I took a wrong turn someplace! I'm out of here!  tongue

Hmm okay, just to recap, if the user is needing a custom module (driver) to support some function on an nVidia card. He downloads the correct driver that's written for his fancy card, but it still doesn't work, or is spotty in it's usage. This is most likely the result that the header file needed for a certain function in the driver is missing. So the user would go and download the specific header (.h) file? or would he have to go and install all of the headers in the entire   linux-headers-3.16.x.x.x-amd64   package?   Besides that last question, I think I get it...


I ask the above question because here: 
https://wiki.debian.org/NvidiaGraphicsD … tification

It says that to install the propritary drivers for nvidia:

Install Linux headers for the kernel you are using. If you are using the 3.16 Linux kernel in Debian Jessie:

# apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')

Isn't that a bit heavy handed? I mean I linked in my first post what all comes with the linux-headers package. There are a TON of files in there. Why is it suggested that you installed tons and tons of headers that you don't need if you're only looking for a few?

On my system, installing the entire linux-headers-3.16.x.x-amd64 package requires 101 MB ( granted a few other libs are tossed in as well)


"I have not failed, I have found 10,000 ways that will not work" -Edison

Offline

#8 2016-08-20 03:33:22

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,429
Website

Re: Linux Kernel Headers

In my experience up to now, kernel headers have had to be installed when some compiling is to be done. The VirtualBox Guest Additions need them to build kernel modules via dkms, for example. It's usually a big install, but a lot of these *-dev packages are.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

Board footer

Powered by FluxBB