码迷,mamicode.com
首页 > 系统相关 > 详细

linux 内核手动编译

时间:2015-09-05 16:14:07      阅读:144      评论:0      收藏:0      [点我收藏+]

标签:

手动编译内核
1.uname -r 先查看内核版本
2.yum groupinstall "Development Libraries" " Development Tools"
      安装开发工具和库文件 可先yum grouplist 来查看
3.下载kernel  www.kernel.org
4. tar xf linux-2.6.28.10.tar.gz -C/usr/src/
5.cd /usr/src
6.ln -sv linux-2.6.28.10 linux 创建个链接
7.cd linux
8.将原本的模块配置文件覆盖到当下的目录
cp /boot/config-2.6.32-504.23.4.el6.x86_64 /usr/src/linux/.config

9.make menuconfig 一定在内核目录下
报错:[root@localhost linux]# make menuconfig
 *** Unable to find the ncurses libraries or the
 *** required header files.
 *** make menuconfig requires the ncurses libraries.
 *** 
 *** Install ncurses (ncurses-devel) and try again.
 *** 
make[1]: *** [scripts/kconfig/dochecklxdialog] 错误 1


解决:yum install ncurses-devel
再次执行make menuconfig

10.进入选择模块
用空格键选择  最后连安两下ESC键盘 保存退出
会生成一个.config的文件

12.编译
make 
make modules_install  安装内核模块
make install
13.重启 选择新内核


二次编译时需清理
make clean
make mrproper
如有需要请提前备份.config文件

 

 

linux 内核手动编译

标签:

原文地址:http://www.cnblogs.com/sysk/p/4783236.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!