1,download the linux kernel source code from:
the latest version is 2.6.34,which is I choose to use.
2,the place where the src is put should be in your home diretory.Don't put it under /usr/src
3,uncompress src package and enter its root direcotry
$cd ./linux-2.6.34
4,be sure the compile toolchain is new enough. verify tools' version by viewing file Document/Change,such as gcc,make,binutils,etc
5,configure:
there are two ways to generate configuration file: .config
1)make config
2)make defconfig
6,modify configuration
there are three ways to do it:
1)make menuconfig #console
2)make gconfig #GTK
3)make xconfig #QT
7,build kernel
$make
8,install modules
$make modules_install
this operation will install the modules which are corresponding to our latest built kernel version. Its directory is /lib/modules/2.6.34
9,install kernel by hand
$cp ./arch/i386/boot/bzImage /boot/vmlinuz-2.6.34
$cp ./System.map /boot/System.map-2.6.34
$mkinitramfs -o /boot/initrd.img-2.6.34 2.6.34
10,modify /boot/grub/grub.cfg and reboot
阅读(426) | 评论(0) | 转发(0) |