* wget https://www.kernel.org/pub/linux/kernel/v4.x/testing/linux-4.0-rc2.tar.xz
* 解压内核
* 根据README中步骤操作即可
mkdir -p /home/name/build/kernel
cd /usr/src/linux-3.X
make mrproper #编译前清空一下
make O=/home/name/build/kernel menuconfig
make O=/home/name/build/kernel
sudo make O=/home/name/build/kernel modules_install install
或者
make INSTALL_MOD_STRIP=1 -j20
make INSTALL_MOD_STRIP=1 -j20 modules
make INSTALL_MOD_STRIP=1 -j20 modules_install
make INSTALL_MOD_STRIP=1 -j20 install
我用的是ubuntu14.04编译安装过后重启就可以直接选择内核了。Centos还没有测试
===== 问题 =====
centos 6.5 编译3.10.80内核
* could not load /lib/modules/3.10.80/modules.dep
* 解决办法:参考http://blog.path8.net/archives/6002.html
* dracut -f -v --hostonly -k '/lib/modules/3.10.80' /boot/initramfs-3.10.80.img 3.10.80