<< Back to man.ChinaUnix.net

5.7. Linux-2.6.8.1 Headers

The Linux kernel package contains the kernel source as well as the header files used by Glibc.

Approximate build time: 0.1 SBU

Required disk space: 186 MB

Linux Headers installation depends on: Coreutils and Make

5.7.1. Installation of the Kernel Headers

Because some packages need to refer to the kernel header files, now is a good time to unpack the kernel archive, set it up, and copy the required files to a place where gcc can locate them later.

Prepare for the header installation with:

make mrproper

This ensures that the kernel tree is absolutely clean. It is recommended that this command be issued prior to each kernel compilation. Do not assume that the source tree is automatically clean after un-tarring.

Create the include/linux/version.h file:

make include/linux/version.h

Create the platform-specific include/asm symlink:

make include/asm

Install the platform-specific header files:

mkdir /tools/glibc-kernheaders
cp -HR include/asm /tools/glibc-kernheaders
cp -R include/asm-generic /tools/glibc-kernheaders

Finally, install the cross-platform kernel header files:

cp -R include/linux /tools/glibc-kernheaders

Details on this package are located in Section 8.3.2, “Contents of Linux.”