http://blog.csdn.net/deansrk/article/details/6674025
http://hi.baidu.com/adomore/item/7580f5e6543539f92a09a4ad
http://hi.baidu.com/linuxtrip/item/5e8e6153dd63ce9c8c12ed9b
http://kerry.blog.51cto.com/172631/398554
http://hi.baidu.com/higkoo/item/f7fb0d0110325310cc34eac3
http://hi.baidu.com/uwtzubraqinrvxr/item/9527a9c7f86de220a1b50a56
http://www.idcrx.com/zhishiku/linux/2012/0601/163108.html
http://funky-dennis.livejournal.com/3290.html
http://blog.csdn.net/firedfish/article/details/4392556
http://en.linuxreviews.org/Kernel_Rebuild_Guide
--------------------------------------------------------
1. wget http://www.kernel.org/pub/linux/kernel/v3.0/linux-3.6.5.tar.bz2; cp linux-3.6.5.tar.bz2 /usr/src/
2. cd /usr/src/;tar jxvf linux-3.6.5.tar.bz2
3. mv /usr/include/linux /usr/include/linux.old;ln -s /usr/src/linux-3.6.5/include/linux/ /usr/include/linux
4. cd linux-3.6.5;cp /boot/config-`uname -r` .config
5. yum install ncurses ncurses-devel;make menuconfig
You can choose the features you want to enable, for example, I've
chosen Controlled Delay AQM(CoDel) in "Networking support ->
Networking options->QoS and fair queueing)
6. edit ".config", find CONFIG_SYSFS_DEPRECATED, and add:
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
7. make;make modules_install;make install
8. mkdir /tmp/mylinux;cp /boot/initrd-3.6.5.img /tmp/mylinux/initrd-3.6.5.img.gz;cd /tmp/mylinux/;
9. gunzip initrd-3.6.5.img.gz;cpio -id < initrd-3.6.5.img
10. edit init, and comment out the following two duplicate lines:
#echo "Loading dm-region-hash.ko module"
#insmod /lib/dm-region-hash.ko
11. find .|cpio -c -o|gzip -9 > /boot/initrd-3.6.5.img
12. edit /boot/grub/grub.conf, change default to 0(use the new kernel as the default)
Done, reboot
--------------------------------------------------------
1. 去http://www.kernel.org/下载最新的稳定版本
cp /boot/config-`uname -r` .config
make menuconfig #choose enable deprecated sysfs features to support old userspace tools
执行完make menuconfig后,修改/usr/src/linux-2.6.35.4/.config
将#CONFIG_SYSFS_DEPRECATED is not set
默认被注释掉的,将其改为y。即修改为
CONFIG_SYSFS_DEPRECATED=y
CONFIG_SYSFS_DEPRECATED_V2=y
make
make modules_install
mkdir /tmp/mylinux
cp /boot/initrd-3.2.9.img /tmp/mylinux/initrd-3.2.9.img.gz
cd /tmp/mylinux
gunzip initrd-3.2.9.img.gz
cpio -id < initrd-3.2.9.img
remove duplicate in "init",去掉后面的。
echo "Loading dm-region-hash.ko module"
insmod /lib/dm-region-hash.ko
find . | cpio -c -o | gzip -9 > /boot/initrd-3.2.9.img
没有评论:
发表评论