Professional Web Applications Themes

Who is Kernel Headers ? - Linux Setup, Configuration & Administration

Which files make up "Kernel Headers" ? Are these are part of the Kernel source tree ? I am using a from scratch Linux build, and my source code may not be located in a particular place on my system. How can I tell the compiler where to find the headers ? The package I am trying to compile is lilo-20 I extract the source to a directory then run: make I get an error stating that the Kernel Headers are not installed. Thanks in advance to anyone who can help....

  1. #1

    Default Who is Kernel Headers ?

    Which files make up "Kernel Headers" ?

    Are these are part of the Kernel source tree ?

    I am using a from scratch Linux build, and my source code may not be
    located in a particular place on my system.

    How can I tell the compiler where to find the headers ?

    The package I am trying to compile is lilo-20

    I extract the source to a directory then run:

    make

    I get an error stating that the Kernel Headers are not installed.

    Thanks in advance to anyone who can help.


    Mark Guest

  2. #2

    Default Re: Who is Kernel Headers ?

    Mark Hobley <deletethisbit.com> wrote: 

    A lot of them.
     

    Yes.
     

    -I<where the .h are>

    Davide

    --
    | Q: Does Bill Gates use public domain software? A: Yes, as all of the
    | public has become Bill Gates' domain.
    Davide Guest

  3. #3

    Default Re: Who is Kernel Headers ?

    deletethisbit.com (Mark Hobley) tried to express: 

    do the following symlinks exist? ... create them!

    /usr/src/linux -> /usr/src/linux{currentversion}
    /usr/include/linux -> /usr/src/linux/include/linux/

    Wiseguy Guest

  4. #4

    Default Re: Who is Kernel Headers ?

    Mark Hobley wrote: 

    On an LFS system the kernel-headers were installed in both
    chapter 5 into the /tools/include directory and in chapter 6
    into /usr/include directory.

    The kernel-headers are the ".h" files in the
    /usr/include/{asm,asm-generic,linux} directories.

    --
    Confucius: He who play in root, eventually kill tree.
    Registered with The Linux Counter. http://counter.li.org/
    Slackware 9.1.0 Kernel 2.4.23 SMP i686 (GCC) 3.3.2
    Uptime: 11 days, 1:56, 1 user, load average: 1.04, 1.05, 1.06
    David Guest

  5. #5

    Default Re: Who is Kernel Headers ?

    Wiseguy wrote: 

    TO QUOTE: Linux Torvalds

    I would suggest that people who compile new kernels should:

    - not have a single symbolic link in sight (except the one that
    the kernel build itself sets up, namely the "linux/include/asm"
    symlink that is only used for the internal kernel compile itself)

    And yes, this is what I do. My /usr/src/linux still has the old
    2.2.13 header files, even though I haven't run a 2.2.13 kernel
    in a _loong_time. But those headers were what Glibc was compiled
    against, so those headers are what matches the library object files.

    And this is actually what has been the suggested environment for
    at least the last five years. I don't know why the symlink
    business keeps on living on, like a bad zombie. Pretty much every
    distribution still has that broken symlink, and people still
    remember that the linux sources should go into "/usr/src/linux"
    even though that hasn't been true in a _loong_ time.

    --
    Confucius: He who play in root, eventually kill tree.
    Registered with The Linux Counter. http://counter.li.org/
    Slackware 9.1.0 Kernel 2.4.23 SMP i686 (GCC) 3.3.2
    Uptime: 11 days, 2:11, 1 user, load average: 1.08, 1.20, 1.13
    David Guest

  6. #6

    Default Re: Who is Kernel Headers ?

    In comp.os.linux.help David <net> wrote: 

    Because it's _correct_, no matter what people choose to say. Or do you
    think it was just there for no reason at all for the five years
    previously? (and it's not your five years ..). And the reason is ...

    If you don't have /usr/include/linux as a SYMLINK pointing into the
    CORRECT KERNEL source, then you can't compile any user space application
    that uses ioctls. Because ...

    The ioctls change with the kernel, not with libc. And then there are a
    whole lot of other bits and bobs that change with kernel, and not with
    libc. And I haven't changed my libc in 5 years (:- well, I use glibc
    2.1), but I change my kernel daily.
     

    Tut tut.

    Peter
    P.T. Guest

  7. #7

    Default Re: Who is Kernel Headers ?

    Mark Hobley wrote: 

    All files in the kernel tree which end in .h
     

    Well, yes, then.
     

    Yes it will be.
    /usr/src/linux holds the kernel tree.
    If not, you are in over your head...
     

    If you follow the LFS instructions *to the letter*, you won't have to.

    I would strongly advise you to use a solid guide or manual for
    installing this sort of thing until you know enough to do it on your own.

    Installing an LFS system is *not* trivial - in the sense that I could
    not do it without the doentation, and neither can you if you have
    questions like these.

    Not meant as criticism, but please... walk first, run later ;-)
    Jeroen Guest

  8. #8

    Default Re: Who is Kernel Headers ?

    On Thu, 01 Jan 2004 01:57:34 +0100, Jeroen Geilman <net>
    wrote:
     

    yeah, I know. Im actually trying to change the directory structure
    altogether.

    My source code is not at that location 
    >
    >If you follow the LFS instructions *to the letter*, you won't have to.
    >[/ref]

    Mines a butchered version. Its not like in the manual.

    I have a machine which has several partitions. Compiles are done in
    one partition and transferred to another partition for testing.

    I'm actually using some sort of mish-mashed hybrid.

    I started out with Debian. Then I applied some stuff from the LFS
    manual. I have changed and edited some files and moved some stuff
    around.

    I also have packages that I have compiled from source.

    Some of my linux stuff is actually stored on a network drive, This is
    downloaded and transferred to the butched machine for compilation and
    test.

    I'm actually building a totally customized system on a spare
    partition.

    The target build will not be using the standard directory layout, and
    to add further complication, the /lib stuff is being relocated.

    My mish-mashed linux has stuff moving around, and changes applied to
    try and mimic the target.

    I'm actually hoping to relocate some of the lib stuff on the target
    machine, so I'm not sure whether all this will work yet.

    It may all go bang at the end.

    (I am hoping that the kernel is written properly so that the path
    names are just a compile time parameter, or a one line code change)
     

    Yeah, I know what you mean. I'm just in such an awful hurry.

    I'm actually an assembly language programmer from the MSDOS days. I am
    new to Linux, so I am having to learn everything at once.

    You guys have helped me shed loads !

    Thanks once again for all your help !
    Mark Guest

Similar Threads

  1. Kernel panic: No init found. Try passing init = option to kernel
    By Liviu in forum Linux Setup, Configuration & Administration
    Replies: 2
    Last Post: October 31st, 03:56 PM
  2. RH9.0 - kernel source directory and kernel config ?
    By Marcio in forum Linux Setup, Configuration & Administration
    Replies: 7
    Last Post: October 12th, 08:49 AM
  3. Replies: 2
    Last Post: September 12th, 04:47 AM
  4. kernel-source versus kernel-patch
    By Ismael Valladolid Torres in forum Debian
    Replies: 1
    Last Post: July 14th, 06:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139