手机版
你好,游客 登录 注册 搜索
背景:
阅读新闻

Debian Linux 2.6.23.8内核编译过程

[日期:2007-11-26] 来源:Linux公社  作者:Linux [字体:大 中 小]

Debian Linux 2.6.23.8内核编译全过程:

准备:
安装make ,gcc, make-kpkg,运行menuconfig等等和编译内核相关的工具。
apt-get install build-essential kernel-package libncurses5-dev
或者(?)
[apt-get install gcc make automake autoconf gawk m4 kernel-package initrd-tools]
[apt-get install build-essential bin86 kernel-package]
[apt-get install libqt3-headers libqt3-mt-dev]

下载内核:
http://www.kernel.org
cp ./linux-2.6.23.8.tar.bz2 /usr/src
tar -xvf linux-2.6.23.8.tar.bz2
ln -s ./linux-2.6.23.8 linux

make mrproper 清理以前编译的包

如果使用以前内核配置的话
cp /boot/config-`uname -r` ./.config 拷贝使用的内核的config

make config
或者 make menuconfig (需要libncurses5-dev) 或者 make xconfig (需要QT库)或者make gconfig (需要Gtk+)

推荐的有
Processor type and features 部分包含了处理器的特征。
Subarchitecture Type 必须选PC
Processor family 这就是问处理器了,选自己的。
preemption Model 根据自己的情况选 从上到下是服务器 桌面 低配置桌面。
High Memory Support 大内存支持,如果内存小于等于1g就使用off。
Timer frequency 建议改为1000hz。
kexec system call 这个是快速重启系统,启动它需要另外一个kexec-tool的支持,有机会再详细谈谈它的使用。

IO Schedulers 部分包含了IO的设置。
推荐关闭Anticipatory I/O scheduler Deadline I/O scheduler 仅仅留下CFQ。

Kernel hacking 部分里关闭kernel debugging

make-kpkg clean 清一次包

make-kpkg --append-to-version= <486> --initrd revision= kernel_image kernel_headers

耗时约一个半钟头。Athlon 2000+ 1.25G 256MB Mem

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款