<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<atom:link href="http://gentoo-zh.org/extern.php?action=feed&amp;tid=2&amp;type=rss" rel="self" type="application/rss+xml" />
		<title><![CDATA[Gentoo中文社区 / linux内核裁剪选项说明]]></title>
		<link>http://www.gentoo-zh.org/viewtopic.php?id=2</link>
		<description><![CDATA[linux内核裁剪选项说明 最近发表的帖子。]]></description>
		<lastBuildDate>Wed, 03 May 2023 15:31:59 +0000</lastBuildDate>
		<generator>FluxBB</generator>
		<item>
			<title><![CDATA[Re: linux内核裁剪选项说明]]></title>
			<link>http://www.gentoo-zh.org/viewtopic.php?pid=796#p796</link>
			<description><![CDATA[<p>还记得自己第一次配置内核，用了一周阿时间。。。。</p>]]></description>
			<author><![CDATA[dummy@example.com (MercenaryMatrix)]]></author>
			<pubDate>Wed, 03 May 2023 15:31:59 +0000</pubDate>
			<guid>http://www.gentoo-zh.org/viewtopic.php?pid=796#p796</guid>
		</item>
		<item>
			<title><![CDATA[Re: linux内核裁剪选项说明]]></title>
			<link>http://www.gentoo-zh.org/viewtopic.php?pid=520#p520</link>
			<description><![CDATA[<div class="quotebox"><cite>一季落叶 说：</cite><blockquote><div><p>我是来学习的，这方面纯小白</p></div></blockquote></div><p>我也是啥也不会，一起跟坛主学习</p>]]></description>
			<author><![CDATA[dummy@example.com (ＴＭＤ)]]></author>
			<pubDate>Wed, 02 Nov 2022 06:01:29 +0000</pubDate>
			<guid>http://www.gentoo-zh.org/viewtopic.php?pid=520#p520</guid>
		</item>
		<item>
			<title><![CDATA[Re: linux内核裁剪选项说明]]></title>
			<link>http://www.gentoo-zh.org/viewtopic.php?pid=519#p519</link>
			<description><![CDATA[<div class="quotebox"><cite>一季落叶 说：</cite><blockquote><div><p>我是来学习的，这方面纯小白</p></div></blockquote></div><p>欢迎欢迎！一起学习</p>]]></description>
			<author><![CDATA[dummy@example.com (batsom)]]></author>
			<pubDate>Wed, 02 Nov 2022 03:43:31 +0000</pubDate>
			<guid>http://www.gentoo-zh.org/viewtopic.php?pid=519#p519</guid>
		</item>
		<item>
			<title><![CDATA[Re: linux内核裁剪选项说明]]></title>
			<link>http://www.gentoo-zh.org/viewtopic.php?pid=518#p518</link>
			<description><![CDATA[<p>我是来学习的，这方面纯小白</p>]]></description>
			<author><![CDATA[dummy@example.com (一季落叶)]]></author>
			<pubDate>Wed, 02 Nov 2022 03:37:36 +0000</pubDate>
			<guid>http://www.gentoo-zh.org/viewtopic.php?pid=518#p518</guid>
		</item>
		<item>
			<title><![CDATA[linux内核裁剪选项说明]]></title>
			<link>http://www.gentoo-zh.org/viewtopic.php?pid=2#p2</link>
			<description><![CDATA[<p>cd /usr/src/linux<br />make menuconfig</p><p>linux内核裁剪选项说明</p><p>配置内核的命令是：</p><p># make config 文本配置方式</p><p># make menuconfig 菜单配置方式</p><p># make xconfig 图形界面配置方式（安装qt）</p><p>我们可以采用任何一个命令配置内核，一般推荐使用make menuconfig来配置内核。</p><p>一．代码成熟度选项</p><p>Code maturity level options&#160; ---&gt;</p><p>Prompt for development and/or incomplete code/drivers</p><p>&#160; &#160;Select only drivers expected to compile cleanly</p><p>在内核中包含了一些不成熟的代码和功能，如果我们想使用这些功能，想打开相关的配置选项，就必需打开这一选项。</p><p>二．通用设置选项</p><p>General setup&#160; ---&gt;</p><p>()&#160; Local version - append to kernel release</p><p>&#160; Automatically append version information to the version string</p><p>&#160; Support for paging of anonymous memory (swap)</p><p>&#160; System V IPC</p><p>&#160; POSIX Message Queues</p><p>&#160; BSD Process Accounting</p><p>&#160; BSD Process Accounting version 3 file format</p><p>&#160; Sysctl support</p><p>[ ]&#160; Auditing support</p><p>&#160; Support for hot-pluggable devices</p><p>&#160; Kernel Userspace Events</p><p>&#160; Kernel .config support</p><p>&#160; Enable access to .config through /proc/config.gz</p><p>()&#160; &#160;Initramfs source file(s)</p><p>&#160; Configure standard kernel features (for small systems)&#160; ---&gt;</p><p>&#160; &#160; &#160; &#160; &#160;--- Configure standard kernel features (for small systems)</p><p>&#160; &#160; &#160; &#160; &#160;[ ]&#160; &#160;Load all symbols for debugging/kksymoops</p><p>&#160; &#160; &#160; &#160; &#160;[ ]&#160; &#160; Do an extra kallsyms pass</p><p>&#160; &#160; &#160; &#160; &#160;[ ]&#160; &#160; Enable support for prinlk</p><p>&#160; &#160; &#160; &#160; &#160;[ ]&#160; &#160; BUG()support</p><p>&#160; &#160; &#160; &#160; &#160;[ ]&#160; &#160;Enable full-sinzed data structures for core</p><p>&#160; &#160; &#160; &#160; &#160; &#160; Enable futex support</p><p>&#160; &#160; &#160; &#160; &#160; &#160; Enable eventpoll support</p><p>&#160; &#160; &#160; &#160; &#160; &#160; Optimize for size</p><p>&#160; &#160; &#160; &#160; &#160; &#160; Use full shmem filesystem</p><p>&#160; &#160; &#160; &#160; &#160;(0)&#160; &#160;Function alignment</p><p>&#160; &#160; &#160; &#160; &#160;(0)&#160; &#160;Label alignment</p><p>&#160; &#160; &#160; &#160; &#160;(0)&#160; &#160;Loop alignment</p><p>&#160; &#160; &#160; &#160; &#160;(0)&#160; &#160;Jump alignment</p><p>Local version - append to kernel release：这里填入的是64字符以内的字符串，你在这里填上的字符口串可以用uname -a命令看到。</p><p>Support for paging of anonymous memory (swap)：这是使用交换分区或者交换文件来做为虚拟内存的，当然要选上了。</p><p>System V IPC：表示系统5的Inter Process Communication，它用于处理器在程序之间同步和交换信息，如果不选这项，很多程序运行不起来的。</p><p>POSIX Message Queues：这是POSIX的消息队列，它同样是一种IPC。建议你最好将它选上。</p><p>BSD Process Accounting：这是充许用户进程访问内核将账户信息写入文件中的。这通常被认为是个好主意，建议你最好将它选上。</p><p>Sysctl support：这个选项能不重新编译内核修改内核的某些参数和变量，如果你也选择了支持/proc，将能从/proc/sys存取可以影响内核的参数或变量。建议你最好将它选上。</p><p>Auditing support：审记支持，用于和内核的某些子模块同时工作，例如SELinux。只有选择此项及它的子项，才能调用有关审记的系统调用。</p><p>Support for hot-pluggable devices：是否支持热插拔的选项，肯定要选上。不然USB、PCMCIA等这些设备都用不了。</p><p>Kernel Userspace Events：内核中分为系统区和用户区，这里系统区和用户区进行通讯的一种方式，选上。</p><p>Kernel .config support：将.config配置信息保存在内核中，选上它及它的子项使得其它用户能从/proc中得到内核的配置。</p><p>Configure standard kernel features (for small systems)：这是为了编译某些特殊的内核使用的，通常你可以不选择这一选项，你也不用对它下面的子项操心了。</p><p>Load all symbols for debugging/kksymoops：是否装载所有的调试符号表信息，如果你不需要对内核调试，不需要选择此项。</p><p>Enable futex support：不选这个内核不一定能正确的运行使用glibc的程序，当然要选上。</p><p>Enable eventpoll support：不选这个内核将不支持事件轮循的系统调用，最好选上。</p><p>Optimize for size：这个选项使gcc使用-Os的参数而不是-O2的参数来优化编译，以获得更小尺寸的内核，建议选上。</p><p>Use full shmem filesystem：除非你在很少的内存且不使用交换内存时，才不要选择这项。</p><p>后面的这四项都是在编译时内存中的对齐方式，0表示编译器的默认方式。使用内存对齐能提高程序的运行速度，但是会增加程序对内存的使用量。</p><p>三．可加载模块</p><p>Loadable module support&#160; ---&gt;<br />Enable loadable module support<br />Module unloading<br />[ ]&#160; &#160; &#160;Forced module unloading<br />Module versioning support (EXPERIMENTAL)<br />[ ] Source checksum for all modules<br />Automatic kernel module loading</p><p>Enable loadable module support，很多人喜欢将全部功能、硬件支持一股脑的编进内核，而不是使用模块的方式。这样做非常不好（个人觉得）。其实我也做过嵌入式的开发，在针对特定硬件的平台下尽可能将内核编小，将始终是支持模块加载的。例如我们开发的防火墙就是做为内核的模块被加载的。使用模块支持，你的系统能具有更好的可扩充性。还有一个原因就是自己编写的功能模块、设备驱动模块（假设编写的质量不高）以模块方式工作引起Kernel Panic的机率要远远低于不支持模块全部编进内核的方式。讲了这么多，终于可以理直气壮的选上这一功能了。</p><p>Module unloading，不选这个功能，加载的模块就不能卸载。没什么需要多解释的，建议最好选上。</p><p>Forced module unloading，这个选项能强行卸载模块，即使内核认为这样并不安全，也就是说你可以把正在使用中的模快卸载掉。如果你不是内核开发人员或者骨灰级的玩家，不要选择这个选项。</p><p>Module versioning support (EXPERIMENTAL)，这个功能可以让你使用其它版本的内核模块，由于我自己写一些模块，所以我会用到这个选项，因为内核更新太快了，我的头文件更新根本赶不上内核的更新。还有，虽然我在Gentoo下开发，但实际真实环境用的却是从kernel.org下载的内核。虽然我选择了这个选项，不过建议你不要选择这个选项。</p><p>Source checksum for all modules，这个功能是为了防止更改了内核模块的代码但忘记更改版本号而造成版本冲突。我估计现在没有哪家公司在开发中还没使用版本控制工具，所以不需要这项了。如果你不是自己写内核模块，那就更不需要这一选项了。</p><p>Automatic kernel module loading，这个选项能让内核自动的加载部份模块，建议你最好选上。举个例子说明一下，如模块eth1394依赖于模块ieee1394。如果选择了这个选项，可以直接加载模块eth1394；如果没有选择这个选项，必需先加载模块ieee1394，再加载模块eth1394，否则将出错。</p><p>四．总线支持配置</p><p>Bus support ---&gt;</p><p>&#160; &#160; &#160; &#160;PCCARD (PCMCIA/CardBus) support&#160; ---&gt;</p><p>&#160; &#160; &#160; &#160; &#160; &#160;[ ]&#160; Enable PCCARD debugging</p><p>&#160; &#160; &#160; &#160; &#160; &#160;[ ]&#160; 16-bit PCMCIA support (NEW)</p><p>&#160; &#160; &#160; &#160; &#160; &#160;[ ]&#160; &#160; Load CIS updates from userspace (EXPERIMENTAL)(NEW)</p><p>&#160; &#160; &#160; &#160; &#160; &#160;[ ]&#160; &#160; PCMCIA control ioctl (obsolete) (NEW)</p><p>&#160; &#160; &#160; &#160; &#160; &#160;--- PC-card bridges</p><p>PCCard (PCMCIA/CardBus) support，你的计算机是否支持PCMCIA卡</p><p>Enable PCCARD debugging，通常不需要选择调试PCMCIA设备，除非你是设备驱动的开发人员。</p><p>16-bit PCMCIA support，16位的PCMCIA总线支持。</p><p>五．支持的可执行文件格式</p><p>Userspace binary formats -à<br />Kernel support for ELF binaries<br />Kernel support for a.out and ECOFF binaries<br />Kernel support for MISC binaries<br />RISC OS personality</p><p>Kernel support for ELF binaries，ELF是开放平台下最常用的二进制文件，它支持不同的硬件平台。</p><p>Kernel support for a.out and ECOFF binaries，这是早期UNIX系统的可执行文件格式，目前已经被ELF格式取代。</p><p>Kernel support for MISC binaries，此选项允许插入二进制的封装层到内核中，当使用Java、.NET、Python、Lisp等语言编写的程序时非常有用。</p><p>六，文件系统</p><p>File systems</p><p>&#160; &#160; &#160; &#160;&lt;*&gt; Second extended fs support</p><p>&#160; &#160; &#160; &#160; &#160; Ext2 extended attributes</p><p>&#160; &#160; &#160; &#160; &#160; &#160; Ext2 POSIX Access Control Lists</p><p>&#160; &#160; &#160; &#160; &#160; &#160; Ext2 Security Labels</p><p>&#160; &#160; &#160; &#160;&lt;*&gt; Ext3 journalling file system support</p><p>&#160; &#160; &#160; &#160; &#160; Ext3 extended attributes</p><p>&#160; &#160; &#160; &#160; &#160; &#160; Ext3 POSIX Access Control Lists</p><p>&#160; &#160; &#160; &#160; &#160; &#160; Ext3 Security Labels</p><p>&#160; &#160; &#160; &#160;[ ] JBD (ext3) debugging support</p><p>&#160; &#160; &#160; &#160;&lt;*&gt; Reiserfs support</p><p>&#160; &#160; &#160; &#160;[ ]&#160; &#160;Enable reiserfs debug mode</p><p>&#160; &#160; &#160; &#160;[ ]&#160; &#160;Stats in /proc/fs/reiserfs</p><p>&#160; &#160; &#160; &#160; &#160; ReiserFS extended attributes</p><p>&#160; &#160; &#160; &#160; &#160; &#160; ReiserFS POSIX Access Control Lists</p><p>&#160; &#160; &#160; &#160; &#160; &#160; ReiserFS Security Labels</p><p>&#160; &#160; &#160; &#160;JFS filesystem support</p><p>&#160; &#160; &#160; &#160; &#160; JFS POSIX Access Control Lists</p><p>&#160; &#160; &#160; &#160;[ ]&#160; &#160;JFS debugging</p><p>&#160; &#160; &#160; &#160;[ ]&#160; &#160;JFS statistics</p><p>&#160; &#160; &#160; &#160;XFS filesystem support</p><p>&#160; &#160; &#160; &#160; &#160; Realtime support (EXPERIMENTAL)</p><p>&#160; &#160; &#160; &#160; &#160; Quota support</p><p>&#160; &#160; &#160; &#160; &#160; Security Label support</p><p>&#160; &#160; &#160; &#160; &#160; POSIX ACL support</p><p>&#160; &#160; &#160; &#160;&lt; &gt; Minix fs support</p><p>&#160; &#160; &#160; &#160;&lt; &gt; ROM file system support</p><p>&#160; &#160; &#160; &#160; Quota support</p><p>&#160; &#160; &#160; &#160;&lt; &gt;&#160; &#160;Old quota format support</p><p>&#160; &#160; &#160; &#160;Quota format v2 support</p><p>&#160; &#160; &#160; &#160; Dnotify support</p><p>&#160; &#160; &#160; &#160;&lt; &gt; Kernel automounter support</p><p>&#160; &#160; &#160; &#160;&lt; &gt; Kernel automounter version 4 support (also supports v3)</p><p>&#160; &#160; CD-ROM/DVD Filesystems&#160; ---&gt;</p><p>&#160; &#160; DOS/FAT/NT Filesystems&#160; ---&gt;</p><p>&#160; &#160; Pseudo filesystems&#160; ---&gt;</p><p>&#160; &#160; Miscellaneous filesystems&#160; ---&gt;</p><p>&#160; &#160; Network File Systems&#160; ---&gt;</p><p>&#160; &#160; Partition Types&#160; ---&gt;</p><p>&#160; &#160; Native Language Support&#160; ---&gt;</p><p>Second extended fs support，标准的Linux文件系统，建议将这种文件系统编译进内核。</p><p>Ext2 extended attributes，Ext2文件系统的结点名称、属性的扩展支持。</p><p>Ext2 POSIX Access Control Lists，POSIX系统的访问权限列表支持。也就是 Owner/Group/Others的Read/Write/Execute权限。请参考Unix标准文件系统权限。</p><p>Ext2 Security Labels，扩展的安全标签，例如SElinux之类的安全系统会使用到这样的扩展安全属性。</p><p>Ext3 journalling file system support，如果你熟悉Redhat Linux，你一定会习惯Ext3文件系统。</p><p>Ext3 extended attributes，Ext3文件系统的结点名称、属性的扩展支持。</p><p>Ext3 POSIX Access Control Lists，POSIX系统的访问权限列表支持。</p><p>Ext3 Security Labels，扩展的安全标签支持。</p><p>JBD (ext3) debugging support，Ext3的调试。除非你是文件系统的开发者，否则不要选上这一项。</p><p>Reiserfs support，如果你熟悉Suse Linux，你一定会习惯Reiserfs文件系统。</p><p>Enable reiserfs debug mode，Reiserfs的调试。除非你是文件系统的开发者，否则不要选上这一项。</p><p>Stats in /proc/fs/reiserfs，在/proc/fs/reiserfs文件中显示Reiserfs文件系统的状态。一般来说不需要选择这一项。</p><p>ReiserFS extended attributes，Reiserfs，文件系统的结点名称、属性的扩展支持。</p><p>ReiserFS POSIX Access Control Lists，POSIX系统的访问权限列表支持。</p><p>ReiserFS Security Labels，扩展的安全标签支持。</p><p>JFS filesystem support，JFS是IBM公司设计用于AIX系统上的文件系统。后来这一文件系统也能应用于Linux系统。</p><p>JFS POSIX Access Control Lists，POSIX系统的访问权限列表支持。</p><p>JFS debugging，JFS的调试。除非你是文件系统的开发者，否则不要选上这一项。</p><p>JFS statistics，在/proc/fs/jfs文件中显示Reiserfs文件系统的状态。一般来说不需要选择这一项。</p><p>XFS filesystem support，XFS是SGI公司为其图形工作站设计的一种文件系统，后来这一文件系统也能应用于Linux系统。</p><p>Realtime support (EXPERIMENTAL)，实时卷的支持，能大幅提高大文件的读写速度。不过并不太安全，建议暂时不要选择这一选项。</p><p>Quota support，XFS文件系统的配额支持。</p><p>Security Label support，扩展的安全标签支持。</p><p>POSIX ACL support，POSIX系统的访问权限列表支持。</p><p>Minix fs support，Minix可能是最早的Linux系统所使用的文件系统。后来被Ext2文件系统所取代。</p><p>ROM file system support，内存文件系统的支持。除非你是嵌入式系统的开发者，明确知道你要干什么，否则不要选这一项。</p><p>Quota support，配额支持。也就是说限制某个用户或者某组用户的磁盘占用空间。</p><p>Old quota format support，旧版本的配额支持。</p><p>Quota format v2 support，新版本（第二版）的配额支持。</p><p>Dnotify support，基于目录的文件变化的通知机制。</p><p>Kernel automounter support，内核自动加载远程文件系统的支持。</p><p>Kernel automounter version 4 support (also supports v3)，新的（第四版）的内核自动加载远程文件系统的支持，也支持第三版。()</p>]]></description>
			<author><![CDATA[dummy@example.com (batsom)]]></author>
			<pubDate>Wed, 03 Aug 2022 14:26:49 +0000</pubDate>
			<guid>http://www.gentoo-zh.org/viewtopic.php?pid=2#p2</guid>
		</item>
	</channel>
</rss>
