Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2109887
  • 博文数量: 333
  • 博客积分: 10161
  • 博客等级: 上将
  • 技术积分: 5238
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-19 08:59
文章分类

全部博文(333)

文章存档

2017年(10)

2014年(2)

2013年(57)

2012年(64)

2011年(76)

2010年(84)

2009年(3)

2008年(37)

分类: LINUX

2010-12-09 15:22:44

内核编译步骤:
1.准备将要编译的内核,版本一定要比当前使用的版本号先进。可在下载
本次编译使用的内核版本号位2.6.26
2.将linux-2.6.26.tar.gz cp /usr/src
3.tar -xzvf linux.2.6.26.tar.gz
4.ln -s linux.2.6.26 linux 建立软链接
  pwd 确定在/usr/src/linux目录中
5.make mrproper 确定系统中没有.*和.o文件,假如以前编译过内核,会产生上述文件,将会造成编译的失败。
6.make config 传统的文本内核编译模式,但出错后无法返回。
  make menuconfig 基于文本的内核编译模式,出错可返回,建议使用此等模式。
  make xconfig  基于图形化的内核编译模式
  make oldconfig 只对当前内核稍作修改
7.make dep 确定依赖关系、
8.make clean 确定内核源码文件中没有文件
< make bzImage (big zimage)编译大内核避免编译的内核过大造成失败
  make zImage 编译小内核时使用。>以上两命令推荐选前者。
9.make modules 编译内核模块
10.make modules_install安装编译完的内核模块
11.depmod -a 创建模块链接
      make install  安装内核模块
12.建立新的链接:
cd /usr/src/linux
cp System.map /boot/System.map-2.6.26
cp arch/i386/boot/bzImage /boot/vmlinuz
cd /boot
new-kernel-pkg --mkinitrd --depmod --install 2.6.26
13.vi /boot/grub/menu.lst修改使用grub引导的配置文件
   vi /boot/lilo.conf 修改使用LILO引导的配置文件,现在一般没有使用LILO引导的linux了。
14. init 6 重新启动系统。
15. uname -r 查看内核版本。

阅读(1152) | 评论(1) | 转发(0) |
给主人留下些什么吧!~~

chinaunix网友2010-12-10 16:09:21

很好的, 收藏了 推荐一个博客,提供很多免费软件编程电子书下载: http://free-ebooks.appspot.com