内核编译定制说明(部分)

发表于:2007-07-04来源:作者:点击数: 标签:
设定编译模式: 目前的 Kernel 可以允许多种编译的模式,包括了: make config :这种模式需要逐行输入所需要设定的项目,无法往前修改设定,所以目前很少使用这种方式来设定 Kernel 的项目了; make xconfig :这种模式则是使用 X-Window 为主要环境的设定模
设定编译模式:
目前的 Kernel 可以允许多种编译的模式,包括了:
    make config :这种模式需要逐行输入所需要设定的项目,无法往前修改设定,所以目前很少使用这种方式来设定 Kernel 的项目了;
    make xconfig :这种模式则是使用 X-Window 为主要环境的设定模式!除非你有 X-Window 在执行,否则没有办法使用这种模式;
    make menuconfig :这种模式有点像是文字界面的选单模式,较为简便,而且可以在纯文字界面下面执行编辑动作!是目前最常使用的模式。

开始设定:
    底下的设定项目非常的多,其中,如果您使用的是比 2.4.18 还要新的版本时,那么有可能会出现更多的选项!如果不确定选项的内容是什么?请千万以 Help 进入看一下该项目的设定值,如果还是不清楚怎么办?那么就直接以 Kernel 的预设值保留即可!我在底下的设定中,仅列出个人认为比较重要的项目,其他的项目您就得自己看一下罗?其实,基本上,只要底下这些项目您都了解之後,那么核心编译大抵上就没有很严重的困扰罗!
  [root @test linux]# make mrproper   <==去除 .o 的编译过的档案
[root @test linux]# make menuconfig  <==以文字选单的模式进行编译!
底下开始编译!
Code maturity level options  --->                  <==关於核心测试功能的 code 开启项目;
        [ ] Prompt for development and/or incomplete code/drivers  <==因为我们没有要研发核心,所以不选
Loadable module support  --->                    <==这个就是我们之前说的『模组』啦!
    [*] Enable loadable module support              <==让核心可以载入模组项目(必选)
        [ ]   Set version information on all module symbols      <==这个除非你要使用旧版本的资料,通常不选!
    [*]   Kernel module loader                 <==也是必选啦!
Processor type and features  --->                  <==选择 CPU 的型号项目
        (Pentium-MMX) Processor family               <==请依照您的实际情况选择您的 CPU 型号
        < > Toshiba Laptop support                  <==底下这两个有使用到(笔记型电脑)才选择!
        < > Dell laptop support
        <M> /dev/cpu/microcode - Intel IA32 CPU microcode support  <==如果是使用 Intel 的,可以编译成模组
        <M> /dev/cpu/*/msr - Model-specific register support    <==如果是使用 Intel 的,可以编译成模组
        <M> /dev/cpu/*/cpuid - CPU information support       <==如果是使用 Intel 的,可以编译成模组
        (off) High Memory Support                  <==这个东西跟你的 RAM 有关系,RAM小於 1 GB 则使用 off 即可
        [ ] Math emulation                      <==是否需要数值模拟?当然不需要!我们的 CPU 都够强了!
        [ ] MTRR (Memory Type Range Register) support         <==P6 (PII等级以上) 并且要跑 X-Window 才加上吧,与 AGP 有关
    [ ] Symmetric multi-processing support            <==如果是双 CPU 的主机板才选择!否则就不要选了!
        [*] Local APIC support on uniprocessors (NEW)         <==如果你的 CPU 有支援 APIC 则选择!通常可以选择起来啦!
        [*] IO-APIC support on uniprocessors             <==跟上面的理由一致!选择起来吧!
General setup  --->                         <==一般设定部分
    [*] Networking support                 <==底下四个一定要选,跟基本的硬体装置有关!
    [*] PCI support
        (Any)   PCI aclearcase/" target="_blank" >ccess mode
    [*] PCI device name database
        [ ] EISA support                   <==底下这两个则与主机板上面的插槽有关!除非笔记型,否则不选
        [ ] MCA support
        [*] Support for hot-pluggable devices         <==有点类似随插即用吧!可以选择呦!
        PCMCIA/CardBus support  --->
                < > PCMCIA/CardBus support          <==因为我没有笔记型,所以不选,若为笔记型电脑,请选择!
        PCI Hotplug Support  --->
        [*] System V IPC                   <==底下这三个东西对於效能都不错!可以选择呦!
        [*] BSD Process Accounting
        [*] Sysctl support
        (ELF) Kernel core (/proc/kcore) format        <==底下这几个东西可以编译成模组啦!但是我直接编到核心罗!
        <*> Kernel support for a.out binaries
        <*> Kernel support for ELF binaries
        <*> Kernel support for MISC binari
        [*] Power Management support
        < >   Advanced Power Management BIOS support     <==如果你想要你的 BIOS 接管电源管理,可以选择!我是不选的啦!
Memory Technology Devices (MTD)  --->
        < > Memory Technology Device (MTD) support      <==没必要就不要选吧!
Parallel port support  --->
    < > Parallel port support        <==由於我的主机上面并没有接印表机,所以没选!如果你有印表机的话,一定要选择
Plug and Play configuration  --->
        <*> Plug and Play support        <==底下两个随插即用! 马上勾选!
        <*>   ISA Plug and Play support     
Block devices  --->               <==一些比较冷门的储存机器!如果不确定的话,直接编译成模组吧!没关系的!
        <*> Normal PC floppy disk support
       < > XT hard disk support
        < > Compaq SMART2 support
        < > Compaq Smart Array 5xxx support
        < > Mylex DAC960/DAC1100 PCI RAID Controller support
        < > Loopback device support
        < > Network block device support
        < > RAM disk support
Multi-device support (RAID and LVM)  --->
        [ ] Multiple devices driver support (RAID and LVM)   <==除非要完 RAID (磁碟阵列)与 LVM ,否则不用选!
Networking options  --->                  <==这一部份是最重要的除非特别强调,否则能编成模组就编成模组!
    <*> Packet socket
        [*]   Packet socket: mmapped IO
        <M> Netlink device emulation (NEW)
        [*] Network packet filtering (replaces ipchains)
        [ ]   Network packet filtering debugging (NEW)
        [*] Socket Filtering
        <*> Unix domain sockets
        [*] TCP/IP networking
        [*]   IP: multicasting
        [*]   IP: advanced router
        [*]     IP: policy routing (NEW)
        [*]       IP: use netfilter MARK value as routing key (NEW)
        [*]       IP: fast network address translation (NEW)
        [*]     IP: equal cost multipath (NEW)
        [*]     IP: use TOS value as routing key (NEW)
        [*]     IP: verbose route monitoring (NEW)
        [ ]     IP: large routing tables (NEW)
        [*]   IP: kernel level autoconfiguration
        [*]     IP: DHCP support (NEW)
        [*]     IP: BOOTP support (NEW)
        [*]     IP: RARP support (NEW)
       <M>   IP: tunneling
        <M>   IP: GRE tunnels over IP
        [*]     IP: broadcast GRE over IP (NEW)
        [*]   IP: multicast routing
        [*]     IP: PIM-SM version 1 support (NEW)
        [*]     IP: PIM-SM version 2 support (NEW)
        [*]   IP: TCP Explicit Congestion Notification support
        [*]   IP: TCP syncookie support (disabled per default)
          IP: Netfilter Configuration  --->            <==这就是防火墙机制里头的 iptables 啦!都编成模组!
                <M> Connection tracking (required for masq/NAT) (NEW)
                <M>   FTP protocol support (NEW)
                <M>   IRC protocol support (NEW)
                <M> IP tables support (required for filtering/masq/NAT) (NEW)
                <M>   limit match support (NEW)
                <M>   MAC address match support (NEW)
                <M>   netfilter MARK match support (NEW)
                <M>   Multiple port match support (NEW)
                <M>   TOS match support (NEW)
                <M>   AH/ESP match support (NEW)
                <M>   LENGTH match support (NEW)
                <M>   TTL match support (NEW)
                <M>   tcpmss match support (NEW)
                <M>   Connection state match support (NEW)
                <M>   Packet filtering (NEW)
                <M>     REJECT target support (NEW)
                <M>   Full NAT (NEW)
                <M>     MASQUERADE target support (NEW)
                <M>     REDIRECT target support (NEW)
                <M>   Packet mangling (NEW)
                <M>     TOS target support (NEW)
                <M>     MARK target support (NEW)
                <M>   LOG target support (NEW)
                <M>   TCPMSS target support (NEW)
                <M> ipchains (2.2-style) support (NEW)
                <M> ipfwadm (2.0-style) support (NEW)
        <M> The IPX protocol
        [ ]   IPX: Full internal IPX network (NEW)
        < > Appletalk protocol support
        < > DECnet Support
        < > 802.1d Ethernet Bridging
        QoS and/or fair queueing  --->
                [ ] QoS and/or fair queueing
Telephony Support  --->            <==这东西我也不知道怎么玩~~
        < > Linux telephony support
ATA/IDE/MFM/RLL support  --->      <==储存界面的选择!当然 IDE 一定要选的啦!! 里面如果有看到属於您的晶片组,请记得将他选择起来!例如如果使用 VIA 的晶片组,那么最後一项VIA82CXXX chipset support就一定要选择起来呢!如果你是跟 VBird 一样,使用较老旧的主机板,那么就用系统预设值也就可以了!
        <*> ATA/IDE/MFM/RLL support
        IDE, ATA and ATAPI Block devices  --->
                <*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
                <*>   Include IDE/ATA-2 DISK support
                [*]     Use multi-mode by default
                <*>   Include IDE/ATAPI CDROM support
                ---- IDE chipset support/bugfixes
                [*]   CMD640 chipset bugfix/support
                [*]   RZ1000 chipset bugfix/support
                [*]   Generic PCI IDE chipset support
               [*]     Sharing PCI IDE interrupts support
                [*]     Generic PCI bus-master DMA support
                [*]       Use PCI DMA by default when available
                [*]     Intel PIIXn chipsets supportt
                [*]       PIIXn Tuning supportt
SCSI support  --->        <==我的旧机器上并没有安装 SCSI 卡!我确定我不会使用到 SCSI ,但是如果你可能会安装的话,请编译!
        < > SCSI support
Fusion MPT device support  --->
I2O device support  ---> 
        < > I2O support
Network device support  --->  <==仔细的将你的网路设备编译进来吧!这个也很重要的!
        [*] Network device support
        <*> Dummy net driver support  <==这个一定要装!但是请注意!如果你之前已经使用了 MRTG 了!这个装完之後 MRTG 要重跑一次!
        <M> Bonding driver support
        <M> EQL (serial line load balancing) support
        <M> Universal TUN/TAP device driver support
        <M> General Instruments Surfboard 1000
        Ethernet (10 or 100Mbit)  ---> <==这里面有相当多的卡,我只列出我要的卡而已!请选择你自己的网路卡呦!
                [*] Ethernet (10 or 100Mbit)
                [*]   EISA, VLB, PCI and on board controllers
                <*>     EtherExpressPro/100 support
                <M>     RealTek RTL-8139 PCI Fast Ethernet Adapter support
                [*]       Use PIO instead of MMIO
                [*]       Support for older RTL-8129/8130 boards
                <M>     VIA Rhine support  <==这就是传说中的 D-Link 530 那块卡的驱动程式啦!
        <*> PPP (point-to-point protocol) support   <==这个一定要编进核心!不然就无法使用 ADSL 的 rp-pppoe 拨接罗!
        [*]   PPP filtering (NEW)
        <M>   PPP support for async serial ports (NEW)
        <M>   PPP support for sync tty ports (NEW)
        <M>   PPP Deflate compression (NEW)
        <M>   PPP BSD-Compress compression (NEW)
        <M>   PPP over ATM (EXPERIMENTAL) (NEW)
Amateur Radio support  --->   <==底下这四个应该不需要安装吧!?
IrDA (infrared) support  --->
ISDN subsystem  --->
Old CD-ROM drivers (not SCSI, not IDE)  --->
Input core support  --->  <==这个也编成模组就好罗!
        <M> Input core support
        <M>   Keyboard support
        <M>   Mouse support
        (1024)    Horizontal screen resolution (NEW)
        (768)    Vertical screen resolution (NEW)
        <M>   Joystick support
        <M>   Event interface support
Character devices  --->   <==周边设备的选项!最重要的地方在 AGP 的设定项目!因为我没有 AGP 所以没有设定!
        [*] Virtual terminal
        [*]   Support for console on virtual terminal
        <*> Standard/generic (8250/16550 and compatible UARTs) serial support
        [*] Unix98 PTY support
        <M> Mouse Support (not serial and bus mice)
        [*]   PS/2 mouse (aka "auxiliary device") support
        < > /dev/agpgart (AGP Support)  <==这个相当的重要!就是 AGP 显示卡的支援核心!请选择(若你有 AGP 的话!)
        [ ]   Intel 440LX/BX/GX and I815/I830M/I840/I850 support  <==下面的选项要上面的打勾之後才会出现!
        [ ]   Intel I810/I815/I830M (on-board) support               请特别留意选择你的适合的主机板晶片组呢!
        [ ]   VIA chipset support 
        [ ]   AMD Irongate, 761, and 762 support 
        [ ]   Generic SiS support 
        [ ]   ALI chipset support 
        [ ]   Serverworks LE/HE support 
        [ ] Direct Rendering Manager (XFree86 DRI support)
        [ ]   Build drivers for old (XFree 4.0) DRM (NEW) 
        --- DRM 4.1 drivers 
        < >   3dfx Banshee/Voodoo3+ 
        < >   ATI Rage 128 
        < >   ATI Radeon 
        < >   Intel I810 
        < >   Matrox g200/g400 
        < >   SiS (NEW) 
        [ ] Direct Rendering Manager (XFree86 DRI support)
Multimedia devices  --->
File systems  --->      <==底下的选项主要在提供核心支援的档案格式!相当的重要!如果忘记编入的话,系统可是会读不到东西!
        [*] Quota support    <==没有他! Quota 就无法起来!请选择呦!
        <M> Kernel automounter support
        <*> Kernel automounter version 4 support (also supports v3)
        <M> Ext3 journalling file system support (EXPERIMENTAL)
        <M> DOS FAT fs supportt
        <M>   MSDOS fs supportt
        <M>     UMSDOS: Unix-like file system on top of standard MSDOS fss
        <M>   VFAT (Windows-95) fs supportt
        <M> Compressed ROM file system support
        [*] Virtual memory file system support (former shm fs)
        <*> ISO 9660 CDROM file system support   <==在 Red Hat 7.2 这里就是被编成模组了!才需要每次载入!
        [*]   Microsoft Joliet CDROM extensionss
        <M> Minix fs support
        <M> NTFS file system support (read only)
        [*] /proc file system support
        [*] /dev/pts file system for Unix98 PTYs
        <*> Second extended fs support
        <M> System V/Xenix/V7/Coherent file system support
        Network File Systems  --->
                <M> Coda file system support (advanced network fs)
                <*> NFS file system support  <==NFS 也是需要的呦!
                <M> SMB file system support (to mount Windows shares etc.)  <==网芳总是需要的吧!
                [*]   Use a default NLS (NEW)
                        Default Remote NLS Option: "cp950" (NEW)   <==支援中文的语系!
        Partition Types  --->
        Native Language Support  ---> <==除了底下说的几个 * 的之外,其他的全部都编译成为模组!(以备不时之需!)
                     Default NLS Option: "iso8859-1" (NEW)
                <*> Traditional Chinese charset (Big5) (NEW)
                <*> NLS ISO 8859-1  (Latin 1; Western European Languages) (NEW)
                <M> for others
Console drivers  --->
        [*] VGA text console
Sound  --->
        < > Sound card support  <==你有音效卡吗?那就编译他吧!
USB support  --->
        <M> Support for USB
Kernel hacking  --->

    好了!编译完成之後选择『Save Configuration to an Alternate File』然後写成一个你喜欢的档名,这个档案内容就是你刚刚编译完成的资料啦!然後选择 <Exit> 之後,再储存一次到系统当中!接著下来就准备要编译罗!

原文转自:http://www.ltesting.net