Where Are linux/*.h and asm/*.h?

Where Are linux/*.h and asm/*.h?

The files /usr/include/linux/ and /usr/include/asm/ are often soft
links to the directories where the kernel headers are. They are
usually under /usr/src/kernel*/.

If you don't have the kernel sources, download them. Refer to the
answer: ("How To Upgrade/Recompile a Kernel.")

Then, use rm to remove any garbage, and ln to create the links:

$ rm -rf /usr/include/linux /usr/include/asm
$ ln -sf /usr/src/linux/include/linux /usr/include/linux
$ ln -sf /usr/src/linux/include/asm- /usr/include/asm

The assembly language files reside in architecture-specific
directories, so you need to link /usr/src/include/asm to
/usr/src/linux/include/asm-i386 on PC compatible systems, to
/usr/src/linux/include/asm-sparc on Sun Sparc systems, to
/usr/src/linux/include/asm-ppc on PPC systems, and so on.

You'll also find that you may need to do `make config' as in a
newly-unpacked kernel source tree, to create linux/autoconf.h.



Home
FAQ