-
-
Save cell13/2d7658042f99272a5908 to your computer and use it in GitHub Desktop.
Revisions
-
laozhu revised this gist
Mar 19, 2013 . 1 changed file with 44 additions and 52 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,104 +31,96 @@ 配置菜单包括以下几个大项: [*] 64-bit kernel # 64bit 支持 General setup ---> # 基本设置 [*] Enable loadable module support ---> # 模块加载支持 -*- Enable the block layer ---> # 块设备层支持 Processor type and features ---> # 处理器类型和特性选择 Power management and ACPI options ---> # 电源管理功能 Bus options (PCI etc.) ---> # 总线选项 Executable file formats / Emulations ---> # 可执行文件格式 -*- Networking support ---> # 网络支持 Device Drivers ---> # 设备驱动 Firmware Drivers ---> # 固件驱动 File systems ---> # 文件系统 Kernel hacking ---> # 内核技巧 Security options ---> # 安全选项 -*- Cryptographic API ---> # 密码相关API [*] Virtualization ---> # 虚拟化 Library routines ---> # 函式库 基本设置 ======== [ ] Prompt for development and/or incomplete code/drivers # 尚未完成开发的代码或驱动,求稳不选 ( ) Cross-compliler tool prefix # 交叉编译前缀,用不到不选 ( ) Local version - append to kernel release [ ] Automatically append version infomation to the version string # 以上两项用于自定义内核的版本描述,无意义不设 Kernel compression mode (XZ) ---> # 内核压缩算法,有 Gzip,Bzip2,LZMA,XZ,LZO 几个选项 # 选择了较新的 XZ ,有较高的压缩比和解压缩速度 ( ) Default hostname # 用户未设置 hostname 时的默认值,无意义不设 [*] Support for paging of anonymous memory (swap) # swap 虚拟内存支持,必选 [*] System V IPC # 进程间通信,必选 [ ] Open by fhandle syscalls # 支持通过文件句柄的系统调用,开发文件系统时可能用到,一般用户可不选 [ ] Auditing support [ ] Enable system-call auditing support [ ] Make audit loginuid immutable # 审计支持,安装 SELinux 必选,但会拖慢系统,一般用户可不选 IRQ Subsystem ---> # 中断请求子系统,64位系统下面木有选项,免选了 Timers Subsystem ---> [*] Tickless System (Dynamic Ticks) # 计时子系统,Tickless系统可降能耗,选上 [ ] High Resolution Timer Support # 高精度计时器需要硬件支持,一般硬件不支持,不选 CPU/Task time and stats accounting ---> Cputime accounting (Simple tick based cputime accounting) ---> (X) Simple tick based cputime accounting ( ) Fine granularity task level IRQ time accounting # 统计进程占用CPU时间的方式,这里选择 Simple tick 方式 [*] BSD Process Accounting # 将进程的统计信息写入文件,支持用户级系统调用,必选 [*] BSD Process Accounting version 3 file format # 使用第三版文件格式,不兼容老版本,淘汰老文件格式,选了 [ ] Export task/process statistics through netlink (EXPERIMENTAL) # 通过netlink接口向用户空间导出统计信息,可不选 [ ] Enable per-task delay accounting (EXPERIMENTAL) # 在统计信息中包含进程等待资源所花费的时间,可不选 [ ] Enable extended accounting over taskstats (EXPERIMENTAL) [ ] Enable pre-task storage I/O accounting (EXPERIMENTAL) # 在统计信息中包含额外的信息,可不选 -
laozhu revised this gist
Mar 19, 2013 . 1 changed file with 35 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,25 +31,58 @@ 配置菜单包括以下几个大项: [*] 64-bit kernel # 64bit 机器请选 General setup ---> # 基本设置 [*] Enable loadable module support ---> # 模块加载支持 -*- Enable the block layer ---> # 块设备层支持 Processor type and features ---> # 处理器类型和特性选择 Power management and ACPI options ---> # 电源管理功能 Bus options (PCI etc.) ---> # 总线选项 Executable file formats / Emulations ---> # 可执行文件格式 -*- Networking support ---> # 网络支持 Device Drivers ---> # 设备驱动 Firmware Drivers ---> # 固件驱动 File systems ---> # 文件系统 Kernel hacking ---> # 内核技巧 Security options ---> # 安全选项 -*- Cryptographic API ---> # 密码相关API [*] Virtualization ---> # 虚拟化 Library routines ---> # 函式库 基本设置 ======== [ ] Prompt for development and/or incomplete code/drivers # 建议不选,我们不需要使用尚未完成开发的代码或驱动 -
laozhu revised this gist
Mar 19, 2013 . 1 changed file with 12 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,30 +4,31 @@ 1. **确定** 的功能一定编译进内核 2. **可能** 的功能编译为模块 3. **不确定** 的功能保留默认值,或编译为模组 4. 选择 **双号** 版本内核,忽略 **单号** 内核 准备工作 ======== # 下载Linux内核源代码(Gentoo) emerge -av vanilla-sources # 切换到所需内核源代码 eselect kernel list eselect kernel set 2 cd /usr/src/linux # 删除之前的核心功能配置文件 make mrproper # 清理编译过程中的中间文件,不删除配置文件 make clean 配置内核 ======== make menuconfig 配置菜单包括以下几个大项: [*] 64-bit kernel General setup ---> -
laozhu revised this gist
Mar 19, 2013 . 1 changed file with 13 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,10 @@ 编译原则 ======== 1. **确定** 的功能一定编译进内核 2. **可能** 的功能编译为模块 3. **不确定** 的功能保留默认值,或编译为模组 4. 选择 **双号** 版本内核编译,忽略单号内核 清理工作 ======== @@ -14,13 +14,20 @@ # 清理编译过程中的中间文件,不删除配置文件 make clean # 下载Linux内核源代码(Gentoo) emerge -av vanilla-sources eselect kernel list eselect kernel set 2 开始编译 ======== cd /usr/src/linux make menuconfig make && make modules_install 本文基于的内核版本是基于 `vanilla-sources-3.8.3` 完成的,配置菜单包括以下几个大项: [*] 64-bit kernel General setup ---> -
laozhu revised this gist
Mar 15, 2013 . 1 changed file with 53 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,9 +1,9 @@ 编译原则 ======== 1. [确定] 的功能一定编译进内核 2. [可能] 的功能编译为模块 3. [不确定] 的功能保留默认值,或编译为模组 4. 选择双号内核编译,忽略单号内核 清理工作 @@ -40,4 +40,54 @@ [*] Virtualization ---> Library routines ---> General setup ============= [ ] Prompt for development and/or incomplete code/drivers # 建议不选,我们不需要使用尚未完成开发的代码或驱动 ( ) Cross-compliler tool prefix # 交叉编译前缀,用不到不选 (funtoo) Local version - append to kernel release [*] Automatically append version infomation to the version string # 按照以上设定,执行 uname -r 将看到 3.8.2-funtoo Kernel compression mode (XZ) ---> # 内核压缩算法,有 Gzip,Bzip2,LZMA,XZ,LZO 几个选项 # 选择了较新的 XZ ,有比较高的压缩比和解压缩速度 (funtoo) Default hostname # 用户未设置 hostname 时的默认值,自行设置 [*] Support for paging of anonymous memory (swap) # 支持 swap 空间,必选 [*] System V IPC # 进程间通信,必选 [ ] Open by fhandle syscalls # 支持通过文件句柄的系统调用,不大明白,保持默认不选 [ ] Auditing support [ ] Enable system-call auditing support [ ] Make audit loginuid immutable # 审计支持,安装 SELinux 需要,会拖慢系统,一般用户可不选 IRQ Subsystem ---> 中断请求子系统,64位系统下面木有选项,免选 Timers Subsystem ---> [*] Tickless System (Dynamic Ticks) [*] High Resolution Timer Support 计时子系统,Tickless系统和高精度计时支持,可降能耗,勾选 CPU/Task time and stats accounting ---> Cputime accounting (Simple tick based cputime accounting) ---> (X) Simple tick based cputime accounting ( ) Fine granularity task level IRQ time accounting [*] BSD Process Accounting [*] BSD Process Accounting version 3 file format -*- Export task/process statistics through netlink (EXPERIMENTAL) -*- Enable per-task delay accounting (EXPERIMENTAL) [*] Enable extended accounting over taskstats (EXPERIMENTAL) -
laozhu revised this gist
Mar 15, 2013 . 1 changed file with 24 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,10 @@ 编译原则 ======== 1. [确定]的功能一定编译进内核 2. [可能]的功能编译为模块 3. [不确定]的功能保留默认值,或编译为模组 4. 选择双号内核编译,忽略单号内核 清理工作 ======== @@ -21,3 +21,23 @@ make menuconfig 本文基于的内核版本是 `3.8.2` ,配置菜单包括以下几个大项: [*] 64-bit kernel General setup ---> [*] Enable loadable module support ---> -*- Enable the block layer ---> Processor type and features ---> Power management and ACPI options ---> Bus options (PCI etc.) ---> Executable file formats / Emulations ---> -*- Networking support ---> Device Drivers ---> Firmware Drivers ---> File systems ---> Kernel hacking ---> Security options ---> -*- Cryptographic API ---> [*] Virtualization ---> Library routines ---> -
laozhu created this gist
Mar 15, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ 编译原则 ======== - [**确定**]的功能一定编译进内核 - [**可能*×]的功能编译为模块 - [**不确定**]的功能保留默认值,或编译为模组 - [**选择**]双号内核编译,忽略单号内核 清理工作 ======== # 删除之前的核心功能配置文件 make mrproper # 清理编译过程中的中间文件,不删除配置文件 make clean 开始编译 ======== make menuconfig 本文基于的内核版本是 `3.8.2` ,配置菜单包括以下几个大项: