[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Kernel Headers (was: Re: Where can I order the source-code of Knoppix?)



On Thu, Aug 03, 2006 at 12:56:59PM +0300, Markus Laire wrote:
> On 8/2/06, Klaus Knopper <debian-knoppix@knopper.net> wrote:
> >On Wed, Aug 02, 2006 at 09:04:11PM +0300, Markus Laire wrote:
> >> That site doesn't include all knoppix-specific packages. At least
> >> "linux-kernel-headers-knoppix" is missing.
> >
> >This is actually an empty dummy package that just does a
> >
> >ln -snf /usr/src/linux/include/{linux,asm} /usr/include/
> >
> >(i.e., the real kernel headers are used instead of Debian's version).
> 
> According to KPackage that includes a lot more symlinks than just those two.
> (e.g. /usr/include/{apm.h,do_timer.h} )
> 
> Also according to KPackage most of those symlinks are missing so it's
> impossible to know where they should be pointing to. (For some
> symlinks it seems that KPackage is giving false information - the
> symlinks are present, only the files they point to are missing).
> 
> >
> >The source package contained no files and was probably therefore never
> >uploaded to alioth. But you are right, it SHOULD be there. Mea culpa.
> >I will fix it when I'm back home.
> 
> "linux-kernel-headers-knoppix" says that it provides "linux-kernel-headers".
> So where are these headers if it only contains symlinks?

A little longer explanation (therefore the subject change):

dpkg -L linux-kernel-headers-knoppix

shows the symlinks. You are right, they are more than they should have
been. But at least on 5.0.1, I can see the link targets without a
problem. Could it be that kpackage is confused? For a symlink, it does
not matter if the symlinks target is missing, since it is symbolic, i.e.
refers to a name rather than to a files content.

Anyways. linux-kernel-headers-knoppix is supposed to do the following
things (or hacks):

- avoid the need to have your own kernel headers that possibly don't
match the kernel you used to build your system with, by

- just symlinking /usr/include/linux and /usr/include/asm (and
apparently more of these, don't remember why I did this) to the real
kernel source at /usr/src/linux/include/*, and

- provide a "Provides: linux-kernel-headers" field for the Debian
package database, so packages that use/require "linux-kernel-headers" as
dependency won't deinstall themselves.

Advantage: You don't need to rebuild the kernel packages when testing a
new kernel, just replace /usr/src/linux by a symlink to your own kernel
sources, and you are set (i.e. the kernel-specific includes in
/usr/include/... automatically point to the right files).

Disadvantage: The package contents of linux-kernel-headers-knoppix is
confusing. ;-) More serious: Since /usr/src/linux is not indexes in the
package database, you may remove its contents without noticing that your
kernel include files are gone as well.

The reason I created linux-kernel-headers-knoppix was, that some
third-party kernel-modules would not compile with Debian's
kernel-headers (or required a lot of patches to do so). Rather than
fixing the mdules, I found that the compilation worked beter (and the
resulting modules crashed less likely) when I used the vanilla
kernel.org kernel headers instead of glibc/Debian kernel headers. Maybe,
because Debians kernels were quite old at that time.

> >Anything else missing?
> >
> 
> Yes, the actual kernel-headers, which are provided by
> "linux-kernel-headers-knoppix"

See /usr/src/linux/include (which is not in a package, but present on
both the DVD and CD version).

> If I'm supposed to download them from kernel.org, then there are few 
> problems:
> 
> 0. "linux-kernel-headers-knoppix" claims to provide them, but doesn't,
> so this should be clearly documented somewhere.
> 
> >From /usr/src/knoppix-kernel.README
> 1. What was the "currentmost STABLE vanilla Linux kernel" at the time
> you created Knoppix 4.0.2 CD?
> 2. Where to get proper xfs-patch (There are no patches at www.xfs.org )
> 3. After patching kernel-source, how/where am I supposed to "install"
> the headers. (I could probably figure this out after I get all the
> symlinks which linux-kernel-headers-knoppix includes)

The XFS patch (and the documentation for it) is obsolete.
Sorry, I should have removed this in the README.


Anyways. The headers you are searching for are on your CD, in /usr/src/linux/include .
The COMPLETE Kernel source is on the DVD edition of Knopix with the same version number.

-Klaus



Reply to: