The Linux Headers package contains the “sanitized” kernel 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-sparc64,asm-sparc,asm} cp -av include/asm-sparc64/* /usr/include/asm-sparc64 cp -av include/asm-sparc/* /usr/include/asm-sparc cp -av include/asm-sparc64-biarch/* /usr/include/asm
Ensure that all the headers are owned by root:
chown -Rv root:root /usr/include/{asm,asm-generic,asm-sparc,asm-sparc64,linux,mtd,scsi}
Make sure the users can read the headers:
find /usr/include/{asm,asm-generic,asm-sparc,asm-sparc64,linux,mtd,scsi} -type d -exec chmod -v 755 {} \; find /usr/include/{asm,asm-generic,asm-sparc,asm-sparc64,linux,mtd,scsi} -type f -exec chmod -v 644 {} \;