5.1. Linux API Headers 7.0

Linux API headers are the exported kernel-to-userspace interface definitions (constants, structs, flags, and syscall-related declarations) that userland software compiles against. We install them early in the target tree so libc, toolchains, and other userspace packages including clang/llvm build against a consistent ABI contract.

Input assumption: linux-7.0.tar.xz is already present from the chapter 4 manifest fetch step.

Earlier, linux-7.0 was downloaded from sources.manifest. This section installs the kernel's exported Linux API headers into the target tree so subsequent userspace builds have the interface definitions they require.

Extract and Enter the Kernel Source Tree

cd "$LBI_SOURCES"
tar -xf linux-7.0.tar.xz
cd linux-7.0

Install Headers

Run the headers install step with the target install path under LBI_ROOT/system/headers so later userspace packages can build against the installed Linux API headers.:

make INSTALL_HDR_PATH=/tmp/linux/usr headers_install
mv -v /tmp/linux/usr/include/* "$LBI_ROOT"/system/headers/

This places the exported Linux headers under the target tree so later userspace packages can build against them.