This quick guide will show you how to compile and install a kernel from kernel.org in Fedora 14.
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
分享到:
相关推荐
describes how to compile a linux kernel and how to configure the kernel in the booting process
SQLCipher-4.4.0 How to compile SQLCipher on Windows
How to compile Amalgamation for android
内核,是一个操作系统的核心。它负责管理系统的进程、内存、设备驱动程序、文件和网络系统,决定着系统的性能和稳定性...本文将以RedHat Linux 6.0(kernel 2.2.5)为操作系统平台,介绍在Linux上进行内核编译的方法。
本人亲自试验教程可用,该步骤编译centos7系统内核,生成rpm包进行安装,网上试验很多教程在windows虚拟机上编译成功,安装成功,但系统切换新内核以后无法进入系统。 本人试验环境:win10系统 ...
how to compile the sample ?
linux内核的编译步骤。适用于linux的学习
linux指定内核编译步骤,适应SocketCAN的编译及其验证做准备。
(跑通sqlcipher-4.4.0)https://www.youtube.com/watch?v=SFHGeetZ0po
How to compile Windows Server 2003-bO0daYbti5g.mkv windows server 2003操作系统源代码构建指南视频教程
elasticsearch-head-compile-after.tar.gz+node-v8.1.2-linux-x64.ta
# This is a root file system for linux 0.11 kernel. # Rebuild from materials gathered from Internet. # # Zhao Jiong ( gohigh@sh163.net ) # http://oldlinux.org/ 2004.1.4 # Third ...
Compile Time Regular Expression in C++
资源来自pypi官网。 资源全名:proto_compile-0.1.6-py2.py3-none-any.whl
very low, the kernel has been able to compile and run, and it already includes the essence of the working principle of Linux. The book first briefly introduced the development history of the Linux ...
创建内核模块,简单的编译框架。使用方法:1)解压;2)运行命令,make clean;make。生成的.ko文件,即为执行文件。
compile-node-sass,编译sass/scss为css。
下载交叉编译工具 compile4.3.2.tar.gzaa 和 compile4.3.2.tar.gzab 放到linux上 同一目录下,使用解压命令: cat compile4.3.2.tar.gza* | tar xz 解压命令进行解压,生成完整的交叉编译工具。
to "break in" to the kernel to inspect memory, variables and look through call stack information similar to the way an application developer would use gdb to debug an application. It is possible to ...
python库,解压后可用。 资源全名:proto_compile-0.1.6-py2.py3-none-any.whl