Linux From Scratch: Version 5.0-pre1
Prev | Chapter 5. Preparing the LFS system | Next

# Installing Linux-2.4.22 headers

    Estimated build time:           0.1 SBU
    Estimated required disk space:  142 MB

## Contents of Linux

(Last checked against version 2.4.18.)

The Linux kernel is at the core of every Linux system. It's what makes Linux tick. When a computer is turned on and boots a Linux system, the very first piece of Linux software that gets loaded is the kernel. The kernel initializes the system's hardware components: serial ports, parallel ports, sound cards, network cards, IDE controllers, SCSI controllers and a lot more. In a nutshell the kernel makes the hardware available so that the software can run.

Linux installs the following files:

### Program Files

kernel and kernel headers

##

## Linux Installation Dependencies

(Last checked against version 2.4.17.)

Bash: sh
Binutils: ar, as, ld, nm, objcopy
Coreutils: basename, cat, cp, date, expr, ln, md5sum, mkdir, mv,
pwd, rm, sort, stty, tail, touch, uname, whoami, yes
Findutils: find, xargs
Gawk: awk
GCC: cc1, collect2, cpp0, gcc
Grep: grep
Gzip: gzip
Make: make
Modutils: depmod, genksyms
Net-tools: dnsdomainname, hostname
Sed: sed

##

## Installation of the kernel headers

As some packages need to refer to the kernel header files, we're going to unpack the kernel archive now, set it up, and copy the required files to a place where `gcc` can later find them.

Prepare for the header installation with:

    make mrproper

This ensures that the kernel tree is absolutely clean. The kernel team recommends that this command be issued prior to each kernel compilation. You shouldn't rely on the source tree being clean after untarring.

Create the `include/linux/version.h` file:

    make include/linux/version.h

Create the platform-specific `include/asm` symlink:

    make symlinks

Install the platform-specific header files:

    mkdir /tools/include/asm
    cp include/asm/* /tools/include/asm
    cp -R include/asm-generic /tools/include

Install the cross-platform kernel header files:

    cp -R include/linux /tools/include

There are a few kernel header files which make use of the `autoconf.h` header file. Since we do not yet configure the kernel, we need to create this file ourselves in order to avoid compilation failures. Create an empty `autoconf.h` file:

    touch /tools/include/linux/autoconf.h

Prev | Home | Next
Installing GCC-3.3.1 - Pass 1 | Up | Installing Glibc-2.3.2