Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Kernel with Fedora kernel source code

2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces the Fedora kernel source code how to install Kernel, the article introduces in great detail, has a certain reference value, interested friends must read it!

Fedora kernel source code has been developed for a long time, and many users have a good understanding of Fedora 8. Here I would like to publish my personal understanding and discuss it with you. At present, there are also Chinese versions of Linux, such as REDHAT (Red Hat), Red Flag Linux, etc. It has been fully affirmed by users in China, mainly reflected in its security and stability, it has many similarities with Unix. However, at present, this kind of operating system is still mainly used in medium and high-end servers.

Install Kernel Headers (header file)

07 November 2007 this package provides Kernel Headers and makefiles sufficient for module compilation in the kernel package. If you need to install drivers and some third-party software, you should really need Kernel Headers. If a driver requires kernel source code, then perhaps installing Kernel Headers is sufficient. Kernel Headers is available by installing the kernel-devel RPM package. This package may not be automatically installed by Fedora. This package can be installed from your Fedora DVD or online via FTP and YUM. Find them online in the Fedora and Update software repositories while making sure they match your system, using the uname command. Example:

[mirandam@charon] $uname-rm2.6.23.1-42.fc8 i686Select: kernel-devel-2.6.23.1-42.fc8.i686.rpm option: kernel-devel-2.6.23.1-42.fc8.i686.rpm if you have upgraded your kernel (using yum), it is recommended that you use yum to install this package. [mirandam@charon ~] $sudo yum install kernel-devel

Install Kernel Source (kernel source code)

07 November 2007 generally does not need to install Kernel Source unless you have some special reason to recompile your kernel source code. Kernel hesders is necessary anyway.

There are three basic steps around the installation of Kernel Sourcede.

1. Download the kernel source you want (match your current kernel if necessary)

2.0 install the SRC.RPM package

3. Use rpmbuild to convert the source code to an available state

NOTE: the following steps will consume at least 400MB disk space!

Download kernel source code

Get kernel source code (for the default Fedora kernel source code) the default kernel source code can be found through any Fedora image. You can find it in the / source/SRPMS/ directory under the "/ 8 /" directory. Example: http://download.fedora.redhat.com/pub/fedora/linux/releases/8/Fedora/source/SRPMS/.

Kernel-2.6.23.1-42.fc8.src.rpm 31-Oct-2007 00:06 46m

Get the source code (for upgraded Fedora kernel source code)

If you upgrade your kernel, there are usually 2 or 3 kernel sources available through Fedora updates.

Look in the update directory on most Fedora mirror sites. Example: http://download.fedora.redhat.com/pub/fedora/linux/updates/8/SRPMS/.

Obtain kernel source code through 'yum' (for Fedora kernel source code of *)

The yum tool can download the kernel source code of *. If it is not found, then there are no updates here, then use the default Fedora kernel source.

[mirandam@charon ~] $sudo yum install yum-utils

[mirandam@charon ~] $cd downloads

[mirandam@charon downloads] $yumdownloader-source kernel

Install kernel source code

Install the kernel.src.rpm you selected and downloaded earlier

[mirandam@charon downloads] $sudo rpm-ivh kernel-2.6.23.1-42.fc8.src.rpm

1:kernel [100%]

Ignore group kojibuilder does not exist or user kojibuilder does not exist warnings

Prepare the kernel source code

Convert the source code to available state:

[mirandam@charon downloads] $sudo rpmbuild-bp-target=$ (uname-m) / usr/src/redhat/SPECS/kernel.spec

The source files can be found in the / usr/src/redhat/BUILD/kernel-2.6.23/ directory. Here are two useful directories.

1.Linux-2.6.23.ARCH/

Here is the standard kernel.org kernel source code that includes Fedora patches and updates. The system architecture matches the output of uname-m, which is generally i686. If you want, you can let the-target= option use the noarch parameter.

2.0vanilla/

Only the standard kernel.org kernel (no patches and updates) is included here.

NOTE: the detailed process of Fedora compiling and configuring kernel source code can be found in Fedora Wiki.

The above is all the contents of the article "how to install Kernel with Fedora kernel source code". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report