Gentoo环境下裁剪、安装内核


硬件平台:TOSHIBA M600-02S

软件平台 :主机 Fedora 16 x86_64 虚拟机 VMware WorkStation 8.0.3     

主机Lspci结果:

  1. 00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)  
  2. 00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 02)  
  3. 00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02)  
  4. 00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)  
  5. 00:1a.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)  
  6. 00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)  
  7. 00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05)  
  8. 00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05)  
  9. 00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3 (rev 05)  
  10. 00:1c.3 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 4 (rev 05)  
  11. 00:1c.4 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 5 (rev 05)  
  12. 00:1d.0 USB Controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)  
  13. 00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)  
  14. 00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 05)  
  15. 00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 4 port SATA AHCI Controller (rev 05)  
  16. 00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)  
  17. 00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 05)  
  18. 01:00.0 VGA compatible controller: nVidia Corporation GT216 [GeForce GT 330M] (rev a2)  
  19. 02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)  
  20. 07:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)  
  21. 16:00.0 System peripheral: JMicron Technology Corp. SD/MMC Host Controller (rev 20)  
  22. 16:00.2 SD Host controller: JMicron Technology Corp. Standard SD Host Controller (rev 20)  
  23. 16:00.3 System peripheral: JMicron Technology Corp. MS Host Controller (rev 20)  
  24. 16:00.4 System peripheral: JMicron Technology Corp. xD Host Controller (rev 20)  
  25. ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)  
  26. ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)  
  27. ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)  
  28. ff:02.1 Host bridge: Intel Corporation Core Processor QPI Physical 0 (rev 02)  
  29. ff:02.2 Host bridge: Intel Corporation Core Processor Reserved (rev 02)  
  30. ff:02.3 Host bridge: Intel Corporation Core Processor Reserved (rev 02)  
VMware下lspic结果:
  1. 00:00.0 Host bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX Host bridge (rev 01)  
  2. 00:01.0 PCI bridge: Intel Corporation 440BX/ZX/DX - 82443BX/ZX/DX AGP bridge (rev 01)  
  3. 00:07.0 ISA bridge: Intel Corporation 82371AB/EB/MB PIIX4 ISA (rev 08)  
  4. 00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)  
  5. 00:07.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 08)  
  6. 00:07.7 System peripheral: VMware Virtual Machine Communication Interface (rev 10)  
  7. 00:0f.0 VGA compatible controller: VMware SVGA II Adapter  
  8. 00:10.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 01)  
  9. 00:11.0 PCI bridge: VMware PCI bridge (rev 02)  
  10. 00:15.0 PCI bridge: VMware PCI Express Root Port (rev 01)  
  11. 00:15.1 PCI bridge: VMware PCI Express Root Port (rev 01)  
  12. 00:15.2 PCI bridge: VMware PCI Express Root Port (rev 01)  
  13. 00:15.3 PCI bridge: VMware PCI Express Root Port (rev 01)  
  14. 00:15.4 PCI bridge: VMware PCI Express Root Port (rev 01)  
  15. 00:15.5 PCI bridge: VMware PCI Express Root Port (rev 01)  
  16. 00:15.6 PCI bridge: VMware PCI Express Root Port (rev 01)  
  17. 00:15.7 PCI bridge: VMware PCI Express Root Port (rev 01)  
  18. 00:16.0 PCI bridge: VMware PCI Express Root Port (rev 01)  
  19. 00:16.1 PCI bridge: VMware PCI Express Root Port (rev 01)  
  20. 00:16.2 PCI bridge: VMware PCI Express Root Port (rev 01)  
  21. 00:16.3 PCI bridge: VMware PCI Express Root Port (rev 01)  
  22. 00:16.4 PCI bridge: VMware PCI Express Root Port (rev 01)  
  23. 00:16.5 PCI bridge: VMware PCI Express Root Port (rev 01)  
  24. 00:16.6 PCI bridge: VMware PCI Express Root Port (rev 01)  
  25. 00:16.7 PCI bridge: VMware PCI Express Root Port (rev 01)  
  26. 00:17.0 PCI bridge: VMware PCI Express Root Port (rev 01)  
  27. 00:17.1 PCI bridge: VMware PCI Express Root Port (rev 01)  
  28. 00:17.2 PCI bridge: VMware PCI Express Root Port (rev 01)  
  29. 00:17.3 PCI bridge: VMware PCI Express Root Port (rev 01)  
  30. 00:17.4 PCI bridge: VMware PCI Express Root Port (rev 01)  
  31. 00:17.5 PCI bridge: VMware PCI Express Root Port (rev 01)  
  32. 00:17.6 PCI bridge: VMware PCI Express Root Port (rev 01)  
  33. 00:17.7 PCI bridge: VMware PCI Express Root Port (rev 01)  
  34. 00:18.0 PCI bridge: VMware PCI Express Root Port (rev 01)  
  35. 00:18.1 PCI bridge: VMware PCI Express Root Port (rev 01)  
  36. 00:18.2 PCI bridge: VMware PCI Express Root Port (rev 01)  
  37. 00:18.3 PCI bridge: VMware PCI Express Root Port (rev 01)  
  38. 00:18.4 PCI bridge: VMware PCI Express Root Port (rev 01)  
  39. 00:18.5 PCI bridge: VMware PCI Express Root Port (rev 01)  
  40. 00:18.6 PCI bridge: VMware PCI Express Root Port (rev 01)  
  41. 00:18.7 PCI bridge: VMware PCI Express Root Port (rev 01)  
  42. 02:00.0 USB controller: VMware USB1.1 UHCI Controller  
  43. 02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)  
  44. 02:02.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 02)  
  45. 02:03.0 USB controller: VMware USB2 EHCI Controller  

下面进入正题:

1、参照http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml一步步执行,执行到

  1. make menuconfig  
2、内核功能:
  能够完成系统的基本功能,上网,收发邮件等,支持xwindows图形界面。
  在menuconfig中配置:
  详细介绍内核配置选项及删改情况

           第一部分:Genral setup——>         除以下选项,其他全部删除                 其中:                        System V IPC (IPC:Inter Process Communication)是组系统调用及函数库,它能让程序彼此间同步进行交换信息。某些程序以及DOS模拟环境都需要它。为进程提供通信机制,这将使系统中各进程间有交换信息与保持同步的能力。有些程序只有在选Y的情况下才能运行,所以不用考虑,这里一定要选。                   Support for paging of anonymous memory (swap),如果不编译进内核,系统启动时会出现错误
  1. Active /dev/sda[0-9] swap  
  2. swapon fails  function not implemented  
因此将其编入内核。

  第二部分 : [*] Enable loadable module support  ——>           除以下选项,其它全部删除                  这个选项可以让内核动态加载或卸载模块,所以选上。         
        第三部分:-*- Enable the block layer  ——>          全部删除
        块设备
  
        第四部分:Processor type and features  ——>                 它会对每种CPU做最佳化,让它跑的好又快,一般来说,你是什么型号的就选什么型号的就好。我的处理器是i5 520M,所以选择这个选项。
  
        第五部分:Power management and ACPI options  ——>         除以下选项,其它全部删除
                                 ACPI Support ---〉高级电源接口配置支持,如果BIOS支持,建议选上这项
  []Button 这个选项用于注册基于电源按钮的事件,比如power, sleep等,当你按下按钮时事件将发生,一个守护程序将读取/proc/acpi/event,并执行用户在这些事件上定义的动作比如让系统关机。可以不选择,根据自己的需求。
  
        第六部分:Bus options (PCI etc.)  ——>         除以下选项,其它全部删除
  
  
        第七部分:Executable file formats / Emulations  ——>           除以下选项,其它全部删除
  
        Kernel support for ELF binaries ELF是开放平台下最常用的二进制文件,它支持不同的硬件平台。一定要选。
                    第八部分:-*- Networking support  ——>         除以下选项,其它全部删除         
                                 
  • 1
  • 2
  • 下一页

相关内容