-   Slackware (
-   -   Upgrading slackware kernel headers (

archlyn 06-18-2004 08:27 AM

Upgrading slackware kernel headers
Okay, Here's the deal. I'm running (apparently, according to the changelog) slackware 10.0 RC1
and I have the kernel headers for kernel version 2.4.22..

Problem is that I have the 2.6.6 kernel, and would like to use the recently released kernel headers instead of the 2.4.22 ones.

How do I upgrade them?

FYI The the headers can be found here:

The announcement is here:

keefaz 06-18-2004 08:51 AM

Why this need for kernel headers?
I succeed in compile a custom kernel module for 2.6 with kernel header pakage for 2.4.22 (just because they're not used but include come from /lib/modules/$(uname -r)/build instead).

It is not a problem have these header files installed. But make sure to not make a confusion between kernel-sources and kernel-header package, only the first is update needed and is important, the second are more or less standart include files and if program need accurate kernel header, it will find them in /lib/modules/$(uname -r)/build/include

Worstje 06-18-2004 10:56 AM

Find a slackware mirror, find testing/kernel-headers-2.6.7-i386-1.tgz or whatever its called, and simply wget and upgradepkg it. :)

But usually its not a good idea to upgrade kernel-headers as everything will work just fine anyway. Pat V. posted a nice warning in the testing/ subdirectory concerning upgrading the headers. It stopped me heh :) It comes down to "if you don't have any specific reason you need it, leave it." :)

archlyn 06-18-2004 01:11 PM

Honestly, I can't say for certain that headers will do the trick but I want to try this just to see if it fixes a couple of little issues that I've had with slackware (I won't go into details here)

I'll try to find a slackware testing site, thanks :)

Minderbinder 06-18-2004 01:20 PM

I think the kernel headers are needed to install nvidia's binary drivers. I have tried upgrading my kernel before but I couldn't get the video driver to install. If I install the kernel from source can I use the kernel-headers package in /testing as long as the versions are matched?

archlyn 06-18-2004 01:46 PM

I should think so, I've used the 2.6 series kernels with the 2.4 series headers with nVidia's drivers for ages though, so I don't think the versions have to match. I upgraded my kernel headers a few minutes ago, I'll recompile the nVidia module and tell you how it goes :)

nortonlui 01-26-2010 06:26 AM

using kernel headers from kernel source

# ln -sf /usr/src/kernelname /usr/src/linux

# cd /usr/include
# ln -sf /usr/src/linux/include/linux linux
# ln -sf /usr/src/linux/include/asm-generic asm-generic
# ln -sf /usr/src/linux/arch/x86/include/asm/ asm-x86
# ln -sf asm-x86 asm

It's work on Slackware 13 and Kernel

Tested on qemu 0.12.1

Norton Luiz.

gnashley 01-26-2010 08:32 AM

Uh... Hello! Why did you drag up a thread which is nearly 6 years old? And then you gave the wrong advice...

nortonlui 01-27-2010 03:24 AM

Hi, gnashley

I don't understand what is wrong with my advice. I tested compiling and works.Can you tell me more. It's late for this thread, i agree but i'm study unix/linux and many doubts about unix/linux.



nortonlui 01-27-2010 03:35 AM

I visited links you send me and agree about source - tgz. I forget this !!


gnashley 01-27-2010 04:08 AM

Software for your system should be compiled using the same headers as were used to compile the glibc for your system, not against the headers for the kernel you are running. glibc is the 'mother' of the whole system -not the kernel. Often, glibc is compiled against kernel headers for a completely different version of the kernel than what the system runs -even when starting from scratch. kernel-headers should only be upgraded when glibc is upgraded and the new kernel-headers should be exactly the same headers as used to compile glibc with.

nortonlui 01-27-2010 06:04 AM

Building a Linux Kernel from source ( Alien Wiki )

Thanks again !!!!!!!

gnashley 01-27-2010 09:08 AM

Linking /usr/src/linux to the current kernel sources is convenient for compiling external kernel modules which need to know which kernel sources to use -they often will simply use /usr/src/linux -otherwise, they will use 'uname' to figure out which kernel is running and then llok for the link /lib/modules/$KVERS/build to tell them where the current kernel sources are.

*But*, this refers to building out-of-tree kernel modules and not to building regular software. When building regular software, they look for the kernel headers under /usr/include/linux which is where the headers in the kernel-headers package are installed. Again, only upgrade the kernel-headers package when upgrading glibc.

All times are GMT -5. The time now is 01:38 AM.