10.5. Linux-Headers-2.6.17.4-07112006

#### Cross-Compiled Linux From Scratch - Version 1.0.0rc2-PowerPC64-Multilib

### Chapter 10. Installing Basic System Software

- Prev

  Temporary Perl-5.8.8

- Next

  Glibc-2.4 32 Bit Libraries

- Up.
- Home

# 10.5. Linux-Headers-2.6.17.4-07112006

The Linux Headers package contains the “sanitized” kernel headers.

## 10.5.1. Installation of linux-Headers

For years it has been common practice to use “raw” kernel headers (straight from a kernel tarball) in `/usr/include`, but over the last few years, the kernel developers have taken a strong stance that this should not be done. This gave birth to the Linux-Libc-Headers Project, which was designed to maintain an API stable version of the Linux headers. Recently this project stopped producing updates, so the Cross-LFS team started development on our own project to sanitize the headers.

Install the header files that are common to all architectures:

    install -dv /usr/include/{asm,asm-generic,linux,net,mtd,scsi,sound}
    cp -av include/asm-generic/* /usr/include/asm-generic
    cp -av include/linux/* /usr/include/linux
    cp -av include/mtd/* /usr/include/mtd
    cp -av include/net/* /usr/include/net
    cp -av include/scsi/* /usr/include/scsi
    cp -av include/sound/* /usr/include/sound

Install the header files that are specific to this architecture:

    install -dv /usr/include/asm-ppc
    cp -av include/asm-powerpc/* /usr/include/asm
    cp -av include/asm-ppc/* /usr/include/asm-ppc

Ensure that all the headers are owned by `root`:

    chown -Rv root:root /usr/include/{asm,asm-generic,asm-ppc,linux,mtd,net,scsi,sound}

Make sure the users can read the headers:

    find /usr/include/{asm,asm-generic,asm-ppc,linux,mtd,net,scsi,sound} -type d -exec chmod -v 755 {} \;
    find /usr/include/{asm,asm-generic,asm-ppc,linux,mtd,net,scsi,sound} -type f -exec chmod -v 644 {} \;

## 10.5.2. Contents of Linux-Headers

Installed headers: /usr/include/{asm,linux}/*.h

### Short Descriptions

`/usr/include/{asm,linux}/*.h` | The Linux API headers

- Prev

  Temporary Perl-5.8.8

- Next

  Glibc-2.4 32 Bit Libraries

- Up.
- Home.