Gentoo内核编译选项说明

一、编译
现在的内核编译步骤真是简单极了
# make menuconfig
# make
# make modules_install
# make install
就这么两下,把以前繁杂的操作都包括了
# make modules
# make modules_install
# make install
# cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.14.3
# cp System.map /boot/System.map-2.6.14.3
# mkinitrd ……
# ln -s /boot/vmlinuz-2.6.14.3 /boot/vmlinuz
# ln -s /boot/System.map-2.6.14.3 /boot/System.map
#vim /boot/grub/menu.lst
上面这些都不用做了,真省事啊

主要就是make menuconfig这步了,这步说难也难,说不难也不难,总之呢就是按需配置
呵呵,按需配置,这下可没人能帮你了,得自己看着办了

二、可能出现的问题:

1、如果出现这样的错误进不去:Enforcing mode requested but no policy loaded
那是因为你原来系统启用了selinux的enforcing模式,你需要回到原来的系统关闭selinux就可以了,如果不需要selinux,那干脆编内核的时候就去掉。

2、启动错误提示:VFS:Unable to mount root fs on unknown-block(0,0)
请确保以下两项被编进内核
Device Drivers ---> Block devices --->
<*> RAM disk support
[*] Initial RAM disk (initrd) support
3、启动错误提示:
mkrootdev:lable /1 not found
mount:error 2 mounting ext3
mount:error 2 mounting none
switchroot:mount failed:22
Umount /initrd/dev failed:2
需要以下驱动支持:
Device Drivers ---> ATA/ATAPI/MFM/RLL support ---> [*]     PCI IDE chipset support

……有问题的话再加

三、关于一些编译选项

1、如果是自己用的桌面系统,别忘了打开内核抢占
Processor type and features ---> Preemption Model (Preemptible Kernel (Low-Latency Desktop)) --->
说明:抢占模式:
No Forced Preemption (Server),这种模式等同于没有使能抢占选项的标准内核,主要适用于科学计算等服务器环境。

Voluntary Kernel Preemption (Desktop),这种模式使能了自愿抢占,但仍然失效抢占内核选项,它通过增加抢占点缩减了抢占延迟,因此适用于一些需要较好的响应性的环境,如桌面环境,当然这种好的响应性是以牺牲一些吞吐率为代价的。

Preemptible Kernel (Low-Latency Desktop),这种模式既包含了自愿抢占,又使能了可抢占内核选项,因此有很好的响应延迟,实际上在一定程度上已经达到了软实时性。它主要适用于桌面和一些嵌入式系统,但是吞吐率比模式2更低。

Complete Preemption (Real-Time),这种模式使能了所有实时功能,因此完全能够满足软实时需求,它适用于延迟要求为100微秒或稍低的实时系统。

实现实时是以牺牲系统的吞吐率为代价的,因此实时性越好,系统吞吐率就越低。
2、支持4G内存,我的没有这么多,你的呢
Processor type and features ---> High Memory Support (off)

四、下面是部分选项说明,可以参考下< > ACPI0004,PNP0A05 and PNP0A06 Container Driver (EXPERIMENTAL)

APM (Advanced Power Management) BIOS Support --->
高级电源管理的支持,一般来说笔记本应该选上,台式机可以不选。

CPU Frequency scaling --->
这一选项允许改变CPU的主频,使CPU在低负荷或使用电池时降低主频,达到省电的目的。

Bus options (PCI, PCMCIA, EISA, MCA, ISA) --->

--- PCI support
PCI总线支持

PCI access mode (Any) --->
强列建议选Any,系统将优先使用MMConfig,然后使用BIOS,最后使用Direct检测PCI设备。

[ ] PCI Express support
PCI-E总线支持

[*] Legacy /proc/pci interface

[ ] PCI Debugging

[ ] ISA support
ISA总线,没有用就不要

[ ] MCA support

< > NatSemi SCx200 support

PCCARD (PCMCIA/CardBus) support --->
一般只有笔记本电脑上才会有PCMCIA插槽,如果你是台式机的话,可以不选这一项,然后跳过这一部份。

PCI Hotplug Support --->
一般来讲只有服务器上会有热插拔的设备,如果你使用的是台式机,你可以不选择此项并跳过这一部份。

Executable file formats --->
可执行文件格式

[*] Kernel support for ELF binaries
ELF是开放平台下最常用的二进制文件,它支持不同的硬件平台

< > Kernel support for a.out and ECOFF binaries

<*> Kernel support for MISC binaries
此选项允许插入二进制的封装层到内核中,当使用Java、.NET、Python、Lisp等语言编写的程序时非常有用

Networking --->
[*] Networking support

Networking options --->
需要什么协议、功能的自己选吧

[ ] Amateur Radio support --->
业余电台

< > IrDA (infrared) subsystem support --->
红外接口

< > Bluetooth subsystem support --->
蓝牙

< > Generic IEEE 802.11 Networking Stack

Device Drivers --->
驱动

Generic Driver Options --->
Connector - unified userspace <-> kernelspace linker --->
Memory Technology Devices (MTD) --->
Parallel port support --->
并口

Plug and Play support --->
即插即用

Block devices --->
< > Normal floppy disk support   //软驱支持
Compaq SMART2 support
Compaq Smart Array 5xxx support
[ ] SCSI tape drive support for Smart Array 5xxx
< > Mylex DAC960/DAC1100 PCI RAID Controller support
< > Micro Memory MM5415 Battery Backed RAM support (EXPERIMENTAL)
Loopback device support
Cryptoloop Support
Network block device support
< > Promise SATA SX8 support
< > Low Performance USB Block driver
<*> RAM disk support
(16) Default number of RAM disks
(16384) Default RAM disk size (kbytes)
[*] Initial RAM disk (initrd) support
[*] Support for Large Block Devices
< > Packet writing on CD/DVD media
IO Schedulers --->
< > Anticipatory I/O scheduler
< > Deadline I/O scheduler
< > CFQ I/O scheduler
< > ATA over Ethernet support

ATA/ATAPI/MFM/RLL support --->
<*> ATA/ATAPI/MFM/RLL support
<*>   Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
---     Please see Documentation/ide.txt for help/info on IDE drives
[ ]     Support for SATA (deprecated; conflicts with libata SATA driver)
[ ]     Use old disk-only driver on primary interface
<M>     Include IDE/ATA-2 DISK support
[*]     Use multi-mode by default
<M>     Include IDE/ATAPI CDROM support
< >     Include IDE/ATAPI TAPE support (EXPERIMENTAL)
< >     Include IDE/ATAPI FLOPPY support
<M>     SCSI emulation support
[ ]     IDE Taskfile Access
---     IDE chipset support/bugfixes
<*>     generic/default IDE chipset support    //使用IDE设备的这项要打*
[ ]     CMD640 chipset bugfix/support
[ ]     PNP EIDE support
[*]     PCI IDE chipset support
[*]       Sharing PCI IDE interrupts support
[ ]       Boot off-board chipsets first support
<M>       Generic PCI IDE Chipset Support
< >       OPTi 82C621 chipset enhanced support (EXPERIMENTAL)
< >       RZ1000 chipset bugfix/support
[*]       Generic PCI bus-master DMA support
[ ]         Force enable legacy 2.0.X HOSTS to use DMA
[*]         Use PCI DMA by default when available
[ ]           Enable DMA only for disks
< >         AEC62XX chipset support
< >         ALI M15x3 chipset support
< >         AMD and nVidia IDE support
< >         ATI IXP chipset IDE support
< >         CMD64{3|6|8|9} chipset support
< >         Compaq Triflex IDE support
< >         CY82C693 chipset support
< >         Cyrix CS5510/20 MediaGX chipset support (VERY EXPERIMENTAL)
< >         Cyrix/National Semiconductor CS5530 MediaGX chipset support
< >         HPT34X chipset support
< >         HPT36X/37X chipset support
< >         National SCx200 chipset support
< >         Intel PIIXn chipsets support
< >         IT821X IDE support
< >         NS87415 chipset support
< >         PROMISE PDC202{46|62|65|67} support
< >         PROMISE PDC202{68|69|70|71|75|76|77} support
< >         ServerWorks OSB4/CSB5/CSB6 chipsets support
< >         Silicon Image chipset support
< >         SiS5513 chipset support
< >         SLC90E66 chipset support
< >         Tekram TRM290 chipset support
< >         VIA82CXXX chipset support
[ ]     IGNORE word93 Validation BITS

SCSI device support --->
Multi-device support (RAID and LVM) --->
Fusion MPT device support --->
IEEE 1394 (FireWire) support --->
I2O device support --->
Network device support --->
ISDN subsystem --->
Telephony Support --->
Input device support --->
Character devices --->
I2C support --->
Dallas's 1-wire bus --->
Hardware Monitoring support --->
Misc devices --->
Multimedia Capabilities Port drivers --->
Multimedia devices --->
Graphics support --->
Sound --->
USB support --->
MMC/SD Card support --->
InfiniBand support --->
SN Devices --->

File systems --->

Profiling support --->

Kernel hacking --->

Security options --->

Cryptographic options --->

Library routines --->

Code maturity level options (代码成熟度选项)

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/22742.html