linux内核升级
系统CentOS 6.5,原内核版本为2.6.32,欲升级版本3.2.14
下载linux内核
下载地址来源:浏览器输入mirrors.aliyun.com,在文件列表中找到linux-kernel,点击跳转到linux-kernel列表中,选择你要下载的版本
wget -c https://mirrors.aliyun.com/linux-kernel/v3.0/linux-3.2.14.tar.bz2
配置内核并安装
make mrproper #清除环境变量,即清除配置文件
cp /boot/config-2.6.32-71.el6.i686 .config
make menuconfig #在菜单模式下选择需要编译的内核模块
关于menuconfig配置见:http://blog.csdn.net/xuyuefei1988/article/details/8635539
在执行此命令时可能出现如下错误:
mark@ubuntu:~/work/linux-3.2.14-psp04.06.00.08.sdk$ make menuconfig
*** Unable to find the ncurses libraries orthe
*** required header files.
*** 'make menuconfig' requires the ncurseslibraries.
*** Install ncurses (ncurses-devel) and tryagain.
此时只需要安装ncurses-devel即可:
yum install ncurses-devel
make clean #确保所有东西均保持最新状态.
make bzImage #生成内核文件(耗时较久)
make modules #编译模块 (耗时较久)
make modules_install #安装模块
make install #安装
在make install 后,可能会出现如下错误
# make install
sh /usr/src/linux-3.2/arch/x86/boot/install.sh 3.2.03.2.0 arch/x86/boot/bzImage \
System.map "/boot"
ERROR: modinfo: could not find module rfcomm
ERROR: modinfo: could not find module sco
ERROR: modinfo: could not find module bnep
ERROR: modinfo: could not find module l2cap
ERROR: modinfo: could not find module vmware_balloon
遇到这样的问题,我是这样解决的,使用lsmod命令,发现以上几个module都是存在的,所以我直接执行下一步骤了。
[root@localhost linux-3.2]# lsmod|grep rfcomm
rfcomm 74119 4
l2cap 55682 16 rfcomm,bnep
bluetooth 99271 9 rfcomm,sco,bnep,l2cap,btusb
[root@localhost linux-3.2]# lsmod|grep sco
sco 18005 2
bluetooth 99271 9 rfcomm,sco,bnep,l2cap,btusb
[root@localhost linux-3.2]# lsmod|grep bnep\
> ^C
[root@localhost linux-3.2]# lsmod|grep bnep
bnep 16690 2
l2cap 55682 16 rfcomm,bnep
bluetooth 99271 9 rfcomm,sco,bnep,l2cap,btusb
修改grub.conf
vim /etc/grub.conf,将 default=1 改为 default=0
重启系统,并查看内核
reboot
uname -r
3.2.14-rt24