5.5. Linux-Headers-3.4.17

The Linux Kernel contains a make target that installs “sanitized” kernel headers.

5.5.1. Installation of Linux-Headers

For this step you will need the kernel tarball.

Install the kernel header files:

install -dv /tools/include
make mrproper
make ARCH=mips headers_check
make ARCH=mips INSTALL_HDR_PATH=dest headers_install
cp -rv dest/include/* /tools/include

The meaning of the make commands:

make mrproper

Ensures that the kernel source dir is clean.

make ARCH=mips headers_check

Sanitizes the raw kernel headers so that they can be used by userspace programs.

make ARCH=mips INSTALL_HDR_PATH=dest headers_install

Normally the headers_install target removes the entire destination directory (default /usr/include) before installing the headers. To prevent this, we tell the kernel to install the headers to a directory inside the source dir.

Details on this package are located in Section 10.5.2, “Contents of Linux-Headers.”