lotus



previous page: 111. What Is a .gz File? And a .tgz? And .bz2? And... ?
  
page up: Linux FAQ
  
next page: 113. Configuring Emacs' Default Settings

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




Description

This article is from the Frequently Asked Questions for Linux, the Free/Open Source UNIX-like operating system kernel that runs on many modern computer systems. Maintained by David C. Merrill with numerous contributions by others. (v1.0).

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

A: 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 for 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-<architecture> /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.

 

Continue to:















TOP
previous page: 111. What Is a .gz File? And a .tgz? And .bz2? And... ?
  
page up: Linux FAQ
  
next page: 113. Configuring Emacs' Default Settings