1,Download your tarball from ,or other websites.
- cp linux-2.6.0.tar.bz2 /usr/src
- tar xivf linux-2.6.0.tar.bz2
- (tar xzvf linux-2.6.0.tar.gz)
将下好的内核放在/usr/src目录下,解压。
---------------------------------------------------------------------------
2,cd into the linux directory. You'll now need to configure the kernel to select the features you want. and There are several ways to do this.
2.1,make menuconfig
我常用该方式配置要编译的内核。选择默认配置,就是进入配置的图形界面后直接退出。 有时出现依赖库 ncurses 安装方式:
sudo apt-get install libncurses5-dev
---------------------------------------------------------------------------
3.now we can build the kernel make
Wait. When its finished, it will have built both the kernel (bzImage) and the modules
-----------------------------------------------------------------------------
4,make modules_install
------------------------------------------------------------------------------
5,make install
有些内核makefile把第六七步集成在第五步中了,那么就不需要执行6,7
没有集成在其中则需要执行6,7.
6,update-initramfs -c -k `cat include/config/kernel.release`
该命令用来制作initramfs
---------------------------------------------------------
7,
update-grub
该命令用来更新grub
-------------------------------------------------------------------------------
安装好内核后reboot,然后查看新的内核uname -a
参考资料:
---------------------------------------------------------
阅读(2048) | 评论(0) | 转发(1) |