session原理总结
2016-01-07 19:40
411 查看
Start
Open a terminal and work through the below list of commands
. Modify where appropriate.
Install the following packages
su -c 'yum install rpmdevtools yum-utils gcc make ncurses-devel'
Setup your build environment
rpmdev-setuptree
Download and extract your Kernel source
cd ~/rpmbuild/SOURCES
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.37 .tar.gz
tar -xf linux-2.6.37
.tar.gz
Configure and Compile it
cd linux-2.6.37
make menuconfig
export CONCURRENCY_LEVEL=3
time make rpm
General rule for concurrency level = number of processor cores + 1
Install it
cd ~/rpmbuild/RPMS/x86_64
su -c 'rpm -ivh --force kernel-2.6.37
-1.x86_64
.rpm'
cd /boot
su -c 'mkinitrd initramfs-2.6.37
.img 2.6.37
'
su -c 'vi grub/grub.conf'
Fedora 32-bit users replace x86_64
with i386
Edit your grub.conf file and add an entry for your new kernel. Just copy your first kernel entry and modify it.
Note: Please do not copy this grub.conf, it is for illustrative purposes only.
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/sda1
# initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda1
default=0
timeout=5
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora
(
2.6.37
)
root (hd0,0)
kernel /boot/vmlinuz-
2.6.37
ro
root=UUID=162b11c2-d9a1-4487-86d5-6ade5c5ee055 rd_NO_LUKS rd_NO_LVM
rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=uk
rhgb quiet
initrd /boot/initramfs-
2.6.37
.img
title Fedora (2.6.35.10-74.fc14.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.35.10-74.fc14.x86_64 ro
root=UUID=162b11c2-d9a1-4487-86d5-6ade5c5ee055 rd_NO_LUKS rd_NO_LVM
rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=uk
rhgb quiet
initrd /boot/initramfs-2.6.35.10-74.fc14.x86_64.img
title Fedora (2.6.35.6-45.fc14.x86_64)
root (hd0,0)
kernel /boot/vmlinuz-2.6.35.6-45.fc14.x86_64 ro
root=UUID=162b11c2-d9a1-4487-86d5-6ade5c5ee055 rd_NO_LUKS rd_NO_LVM
rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=uk
rhgb quiet
initrd /boot/initramfs-2.6.35.6-45.fc14.x86_64.img
title Other
rootnoverify (hd0,4)
chainloader +1
Boot from your new kernel
Restart your system and enjoy your new kernel.
转自:http://linuxtweaking.blogspot.com/2011/01/how-to-compile-kernel-from-kernelorg-in.html
相关文章推荐
- Linux下的makefile相关内容
- Apache2.2+mod_jk1.2+tomcat 6.0
- 控制台界面控制(八):光标设置
- CSS3+jQuery实现时钟插件
- JsonPath小结
- fuser命令小结
- BZOJ 3170: [Tjoi 2013]松鼠聚会( sort )
- c# 基本控件,窗口程序
- <<梦断代码>>阅读笔记三
- 冒泡排序、选择排序
- 控制台界面控制(七):移动文本
- Hibernate注释大全
- IoC容器和 Dependency Injection模式 Inversion of Control Containers and the Dependency Injection pattern
- 19: 津津的储蓄计划(1.5)
- win10切换全角/半角
- <<梦断代码>>阅读笔记二
- <<梦断代码>>阅读笔记一
- Linux下的注释问题
- 无线网络嗅探工具Kismet
- python编写windows平台下脚本二三事