您的位置:首页 > 运维架构 > Linux

linux 内核手动编译

2015-09-05 14:53 477 查看
手动编译内核

编译时后应安装的支持
yuminstallperl
yuminstallbc
yuminsatllgcc-c++

1.uname-r先查看内核版本
2.yumgroupinstall"DevelopmentLibraries""DevelopmentTools"
安装开发工具和库文件可先yumgrouplist来查看
3.下载kernelwww.kernel.org
4.tarxflinux-2.6.28.10.tar.gz-C/usr/src/
5.cd/usr/src
6.ln-svlinux-2.6.28.10linux创建个链接
7.cdlinux
8.将原本的模块配置文件覆盖到当下的目录
cp/boot/config-2.6.32-504.23.4.el6.x86_64/usr/src/linux/.config

9.makemenuconfig一定在内核目录下
报错:[root@localhostlinux]#makemenuconfig
***Unabletofindthencurseslibrariesorthe
***requiredheaderfiles.
***'makemenuconfig'requiresthencurseslibraries.
***
***Installncurses(ncurses-devel)andtryagain.
***
make[1]:***[scripts/kconfig/dochecklxdialog]错误1

解决:yuminstallncurses-devel
再次执行makemenuconfig

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

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

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


                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: