您的位置:首页 > 其它

Documentation/make/headers_install.txt

2013-11-06 14:36 295 查看
Chinese translated version of Documentation/filesystems/ecryptfs.txt
If you have any comment or update to the content, please contact the
original document maintainer directly. However, if you have a problem
communicating in English you can also ask the Chinese maintainer for
help. Contact the Chinese maintainer if this translation is outdated
or if there is a problem with the translation.
Chinese maintainer: 谢尚敬 <1479201451@qq.com>
---------------------------------------------------------------------
Documentation/make/headers_install.txt的中文翻译
如果想评论或更新本文的内容,请直接联系原文档的维护者。如果你使用英文
交流有困难的话,也可以向中文版维护者求助。如果本翻译更新不及时或者翻
译存在问题,请联系中文版维护者。
中文版维护者: 谢尚敬 <1479201451@qq.com>
中文版翻译者: 谢尚敬 <1479201451@qq.com>
中文版校译者: 谢尚敬 <1479201451@qq.com>
以下为正文
---------------------------------------------------------------------

Exporting kernel headers for use by userspace

将内核头文件导到用户空间中使用

=============================================

The "make headers_install" command exports the kernel's header files in a form suitable for use by userspace programs.

" make headers_install "命令可以将适合使用窗体的内核头文件导到用户空间的程序中。

The linux kernel's exported header files describe the API for user space programs attempting to use kernel services. These kernel header files are used by the system's C library (such as glibc
or uClibc) to define available system calls, as well as constants and structures to be used with these system calls. The C library's header files include the kernel header files from the "linux" subdirectory. The system's libc headers are usually installed
at the default location /usr/include and the kernel headers in subdirectories under that (most notably /usr/include/linux and /usr/include/asm).

Linux 内核导出的头文件描述了,用于用户空间的程序,在试图使用内核服务的 API。通过系统的 C 库 (如 glibc 或 uClibc),这些内核头文件既可以用于定义可用的系统调用以及常数和结构,也可用于这些系统的调用。C 库的头文件包含了在"linux"的子目录里德内核头文件。该系统的 libc 标头,通常安装在默认位置为/usr/include,而内核头文件是在子目录当中 (特别注意/usr/include/linux和
/usr/include/asm)。


Kernel headers are backwards compatible, but not forwards compatible. This means that a program built against a C library using older kernel headers should run on a newer kernel (although it
may not have access to new features), but a program built against newer kernel headers may not work on an older kernel.

内核头文件不是向前兼容,而是向后兼容的。这就意味着,反对使用旧内核头文件的 C 库,其构建的程序应该运行在一个较新的内核中,(即便它不可以使用新功能),但生成针对较新内核头文件的程序,将可能无法在旧的内核上工作了。

The "make headers_install" command can be run in the top level directory of the kernel source code (or using a standard out-of-tree build). It takes two optional arguments:

"make headers_install"命令可以在,有内核源代码 (或者可以用标准输出树生成) 的顶级目录中运行。它有两个可选参数:

make headers_install ARCH=i386 INSTALL_HDR_PATH=/usr/include

ARCH indicates which architecture to produce headers for, and defaults to the current architecture. The linux/asm directory of the exported kernel headers is platform-specific, to see a complete
list of supported architectures use the command:

ARCH指示了哪部分结构产生了标头,并将其默认为当前的体系结构。导出的内核头文件 linux/asm 的目录是平台特定的,接着来看看支持完整列表的结构,所使用的命令:

ls -d include/asm-* | sed 's/.*-//'

INSTALL_HDR_PATH indicates where to install the headers. It defaults to "./usr/include".

INSTALL_HDR_PATH 指示了标头的安装位置。其默认值为"./usr/include"。

The command "make headers_install_all" exports headers for all architectures simultaneously. (This is mostly of interest to distribution maintainers, who create an architecture-independent
tarball from the resulting include directory.) You also can use HDR_ARCH_LIST to specify list of architectures. Remember to provide the appropriate linux/asm directory via "mv" or "ln -s" before building a C library with headers exported this way.

命令"make headers_install_all",同时输出了,所有体系结构的标头。(这是各个创建了,一个独立的体系结构的、包括目录的压缩包的维护者的一个兴趣.)您还可以使用 HDR_ARCH_LIST 来指定列表中的体系结构。记住,在生成带有头的 C 库用这种方式输出前,需要提供 linux/asm 目录中相应的"mv"或者"ln-s"。

The kernel header export infrastructure is maintained by David Woodhouse<dwmw2@infradead.org>.

内核头输出的基础设施,是由大卫 · 伍德豪斯 < dwmw2@infradead.org > 来维护的。

原文地址:http://lxr.linux.no/linux+v3.11.6/Documentation/make/headers_install.txt
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: