How to: Compile Linux kernel 2.6

来源:互联网 发布:淘宝快递单号购买平台 编辑:程序博客网 时间:2024/05/19 11:17

http://www.cyberciti.biz/tips/compiling-linux-kernel-26.html

 

Step # 1 Get Latest Linux kernel code

 

$ cd /tmp
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-x.y.z.tar.bz2

 

Step # 2 Extract tar (.tar.bz2) file

 

# tar -xjvf linux-2.6.25.tar.bz2 -C /usr/src
# cd /usr/src

 

Step # 3 Configure kernel

 

$ make menuconfig

 

 

Step # 4 Compile kernel

 

$ make

$ make modules

# make modules_install

 

Step # 5 Install kernel

 

# make install

 

 


Step #6 modify grub config menu.lst

 

# vi /boot/grub/menu.lst

title           Debian GNU/Linux, kernel 2.6.25 Defaultroot            (hd0,0)kernel          /boot/vmlinuz root=/dev/hdb1 roinitrd          /boot/initrd.img-2.6.25savedefaultboot

这个从 Essential Linux Device Driver中拷过来,不知道有什么区别
貌似没啥区别,两个都可以起起来,就是bzImage小很多

Compile the kernel and generate a compressed boot image:
bash> make bzImage

 

The kernel image is produced in arch/x86/boot/bzImage. Update your boot partition:
bash> cp arch/x86/boot/bzImage /boot/vmlinuz

这个从

 

原创粉丝点击