一个Linux爱好者的2.6.11内核编译过程(3)

2008-02-23 07:25:03来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折


[ ] Message Signaled Interrupts (MSI and MSI-X)
[ ] Legacy /proc/pci interface
[ ] PCI device name database
[ ] ISA support
[*] EISA support
[*] Vesa Local Bus priming
[*] Generic PCI/EISA bridge
[*] EISA virtual root device
[ ] EISA device name database
[ ] MCA support
< > NatSemi SCx200 support
PCCARD (PCMCIA/CardBus) support --->
PCI Hotplug Support --->

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

PCI Hotplug Support --->
< > Support for PCI Hotplug (EXPERIMENTAL)

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

可执行文件格式,

[*] Kernel support for ELF binaries
ELF是开放平台下最常用的二进制文件,它支持不同的硬件平台
< > Kernel support for a.out and ECOFF binaries
<*> Kernel support for MISC binaries

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

  硬件设备相当复杂,看得偶头晕,大家针对自己的设备慎重选择(手边最好准备一本汉英字典:)如果想使用adsl,记得网络部分除了TCP/IP协议还得把ppp部分编译进内核,想当初偶就是把这个给忘了,郁闷了许久。

文件系统,
<*> Second extended fs support
[*] Ext2 extended attributes
[*] Ext2 POSIX Access Control Lists
[*] Ext2 Security Labels
<*> Ext3 journalling file system support
[*] Ext3 extended attributes
[*] Ext3 POSIX Access Control Lists
[*] Ext3 Security Labels
[ ] JBD (ext3) debugging support
<*> Reiserfs support
[ ] Enable reiserfs debug mode
[ ] Stats in /proc/fs/reiserfs
[*] ReiserFS extended attributes
[*] ReiserFS POSIX Access Control Lists
[*] ReiserFS Security Labels
JFS filesystem support
[*] JFS POSIX Access Control Lists
[ ] JFS debugging
[ ] JFS statistics
XFS filesystem support
[*] Realtime support (EXPERIMENTAL)
[*] Quota support
[*] Security Label support
[*] POSIX ACL support
< > Minix fs support
< > ROM file system support
[*] Quota support
< > Old quota format support
Quota format v2 support
[*] Dnotify support
< > Kernel automounter support
< > Kernel automounter version 4 support (also supports v3)
CD-ROM/DVD Filesystems --->
DOS/FAT/NT Filesystems --->
Pseudo filesystems --->
Miscellaneous filesystems --->
Network File Systems --->
Partition Types --->
Native Language Support --->
Profiling support --->
Kernel hacking --->
Security options --->
Cryptographic options --->
Library routines --->

  这个东东你要是搞不来就不要搞,默认的也可以的。先学习一下怎么样编译内核,等成功了,有了经验了在改也没有事的!

编译内核:
# cd /usr/src/linux
# make dep -----链接程序代码与函数库.
# make clean -----删除不必要的模块和文件.
# make bzImage -----开始编译系统内核.
# make modules -----开始编译外挂模块.
# make modules_install -----安装编译完成的模块.
要好常时间的,我洗了一件衣服,抽了N根白沙之后,总算完成了,好激动呀!
# su -
# /sbin/depmod -a -----创建模块的链接.

更换内核:
# cd /boot -----切换到引导分区/boot.
# rm System.map vmlinuz -----删除旧的符号链接.
# mv /usr/src/linux/System.map System.map
# mv /usr/src/linux/arch/i386/boot/bzImage vmlinuz

如果你用GRUB来管理开机,简单点就是你装了win还装了linux就要修改/boot/grub下的menu.1st文件:
# vi /boot/grub/menu.1st
键入i进入编辑模式:


# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,1)
# kernel /boot/vmlinuz-version ro root=/dev/hda2
# initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title Fedora Core(2.6.11)
root (hd0,1)
kernel /boot/vmlinuz ro root=/dev/hda2 ---你的linux所在的分区
title DOS
rootnoverify (hd0,0)
chainloader 1


title Fedora Core(2.4.22)
root (hd0,1)
kernel /boot/vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/ hdd=ide-scsi rhgb
initrd /boot/initrd-2.4.22-1.2115.nptl.img
这样还可以保留旧版本的内核以防编译新内核失败进不了系统

  重启电脑,好了,进去了。网上说新内核速度好快的,我怎么感觉快不了多少呢。无所谓了,反正是成功了。呵呵,我可是失败了很多次才成功的。好高兴,2点了,穿衣服去吃东西了。

rpm没法用了,怎么办?
在/usr/lib/rpm/macros里面寻找代码:
%__dbi_cdb create cdb mpool mp_mmapsize=16Mb mp_size=1Mb
修改成代码:
%__dbi_cdb create cdb mpool mp_mmapsize=16Mb mp_size=1Mb private

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Linux 核心--8.中断与中断处理

下一篇:安全基础 Linux必学的系统安全命令