linux 内核手动编译
手动编译内核
编译时后应安装的支持
yum install perl
yum install bc
yum insatll gcc-c++
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文件
【推荐】还在用 ECharts 开发大屏?试试这款永久免费的开源 BI 工具!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步