kernel headers

Richard rkm at usol.com
Fri Sep 6 04:22:41 PDT 2002


  I am a newbie at LFS and Linux in general, but I have
what I think might be a related question. I think I installed
LFS 3.3 according to the book. When I configured the kernel
I chose to implement loadable module support -- in my .config
file the following lines are set:

CONFIG_MODULES=y
CONFIG_MODVERSIONS=y
CONFIG_KMOD=y

I am now trying to do the first example in the "Linux Kernel
Module Programming Guide" by Ori Pomerantz. This example
requires linking to the following header files:

<linux/kernel.h>
<linux/module.h>
<linux/modversions.h>

I assumed that these header files should be in the directory
/usr/include/linux, but when I looked there I couldn't find any
of these files. The only place I could find them was in the
source code used to build the kernel (and modutils I believe).
I tried copying the header files temporarily to /usr/include/linux,
but the compilation of the module failed.

  Is the fact that these files are missing an indication that
I did something wrong with the installation? Or do I just have
to somehow link to the header files in the source code, without
moving them to another directory?

Thanks,

Richard

On 2002.09.05 23:29 Greg Schafer wrote:
> On Thu, Sep 05, 2002 at 11:18:43PM +0100, Mark Ellis wrote:
> > I have a minor concern about how we install the kernel headers at
> the
> > start of chapter 6, or rather what we dont install later on. At
> present
> > /usr/include/linux/autoconf.h is an empty file created with touch
> after
> > copying the headers from an essentially unconfigured kernel tree.
> >
> > I just came across a missing define used by microcode_ctl, the Intel
> 
> > microcode update utility, CONFIG_X86_L1_CACHE_SHIFT, which should
> come
> > from autoconf.h (via linux/config.h via asm/processor.h). I wouldn't
> 
> > even have noticed this, since the makefile includes
> > /usr/src/linux/include, if the kernel tree top dir hadn't been
> changed
> > to linux-$VERSION.
> >
> > Probably not a big deal since its never come up before, but for a
> sense
> > of tidiness i propose copying autoconf.h, and while we're there
> > compile.h, to /usr/include/linux after the kernel build in chapter
> 8.
> >
> > Any thoughts ?
> 
> http://archive.linuxfromscratch.org/mail-archives/lfs-dev/2002/03/0439.html
> 
> (read the whole thread)
>
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message



More information about the lfs-dev mailing list