1. 安装必须的包
apt-get install kernel-package libncurses5-dev fakeroot wget bzip2
2. 下载内核源码包
www.kernel.org
e.g. linux-2.6.18.1.tar.bz2
cd /usr/src
wget http://www.kernel.org/pub/linux/kernel/ ... .1.tar.bz2
tar xjf linux-2.6.18.1.tar.bz2
ln –s linux-2.6.18.1 linux
cd /usr/src/linux
3. 配置内核
建议用老的配置文件/boot/config-xxxxx
cp /boot/config-`uname –r` ./.config
make menuconfig
导入现有配置文件后, 修改你所需要的参数, 保存退出
4. 编译内核
make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
5. 安装内核
成功编译后, 在/usr/src下会有两个.deb 的安装包
dpkg -i linux-image-2.6.18.1-custom_2.6.18.1-custom-10.00.Custom_i386.deb
dpkg -i linux-headers-2.6.18.1-custom_2.6.18.1-custom-10.00.Custom_i386.deb
检查/boot/grub/menu.list
重启检测
完
谢谢
[分享]看到一篇E文的编译内核的好文, 编辑后分享给大家
-
- 帖子: 12
- 注册时间: 2007-02-16 11:10
- ericzb
- 帖子: 441
- 注册时间: 2006-11-16 21:34
- 来自: Bridge View
- 联系:
viewtopic.php?t=44740
似乎很早很早以前。。。
似乎很早很早以前。。。
- xhy
- 帖子: 3916
- 注册时间: 2005-12-28 1:16
- 系统: Ubuntu 12.10 X64
- 来自: 火星