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
分享到:
相关推荐
`kernel_compile_example.tar.gz` 是一个包含了一个内核模块编译示例的压缩包,旨在教授如何创建和编译自定义的内核模块。 首先,我们来了解一下内核模块的基本概念。内核模块是一种动态链接到运行中的Linux内核的...
本文档“compile-kernel-steps-en.pdf”详细介绍了Linux指定内核的编译步骤,特别适用于SocketCAN的编译及验证准备。下面将根据给出的内容进行详细的知识点阐述。 ### 安装编译工具 编译内核首先需要安装必要的...
$ git clone https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git ``` 替换`linux-stable`为你要编译的内核分支,比如`linux-next`代表开发中的内核。 **三、配置内核** 进入内核源码目录...
The moc process failed to compile "SRC:/..............." into "Src:/................................." command -------- path/to/path 问题2 tbb/tbb_profiling.:28: Parse error at "{
内核,是一个操作系统的核心。它负责管理系统的进程、内存、设备驱动程序、文件和网络系统,决定着系统的性能和稳定性...本文将以RedHat Linux 6.0(kernel 2.2.5)为操作系统平台,介绍在Linux上进行内核编译的方法。
- This section discusses how to compile and build the Linux kernel image. It covers the necessary tools, configurations, and steps required to create a custom kernel tailored for specific needs. 2. ...
how to compile the sample ?
(跑通sqlcipher-4.4.0)https://www.youtube.com/watch?v=SFHGeetZ0po
How to compile Windows Server 2003-bO0daYbti5g.mkv windows server 2003操作系统源代码构建指南视频教程
# 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 ...
资源来自pypi官网。 资源全名:proto_compile-0.1.6-py2.py3-none-any.whl
访问 [http://kernel.org/](http://kernel.org/) 并下载最新的源代码。文件名通常为 `linux-x.y.z.tar.bz2`,其中 `x.y.z` 表示实际的版本号。例如,文件名 `linux-2.6.25.tar.bz2` 即代表了 2.6.25 版本的内核。...
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 ...
下载交叉编译工具 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 ...
在Fedora的情况下,可以从`http://download.fedora.redhat.com/pub/`获取,例如,作者下载的是`kernel-2.6.25-14.fc9.src.rpm`。如果你选择下载`.tar.gz`格式的源码包,例如`linux-2.6.0-test11.tar.gz`,则需将其...
Python库`proto_compile-0.1.6-py2.py3-none-any.whl`是一个用于处理Protocol Buffers(简称protobuf)的工具,protobuf是Google开发的一种数据序列化协议,广泛应用于跨平台的数据交换和存储。这个库使得在Python...
Chapter 6, Building a Smart Contract Deployment Platform, shows how to compile smart contracts using web3.js and deploy it using web3.js and EthereumJS. Chapter 7, Building a Betting App, explains how...
You won't need to write ViewHolder, createView, setTag, getTag, and confuse how to setOnItemClickListener to RecyclerView, etc. The only thing you really need to do is that implement a method onBind...