The source code of the Fedora kernel has been developing for a long time. Many users know Fedora12 very well. Here I will share my personal understanding and discuss it with you. At present, there are also Chinese versions of Linux, such as RedHat and red-flag Linux. It has been fully affirmed by users in China, mainly reflected in its security and stability. It has many similarities with Unix. However, these operating systems are currently mainly used in medium and high-end servers. Install KernelHeaders (header file). This package provides K
The source code of the Fedora kernel has been developing for a long time and many users have a good understanding of Fedora 12. Here I will share my personal understanding and discuss it with you. At present, there are also Chinese versions of Linux, such as RedHat and red-flag Linux. It has been fully affirmed by users in China, mainly reflected in its security and stability. It has many similarities with Unix. However, these operating systems are currently mainly used in medium and high-end servers.
Install Kernel Headers (header file)
This package provides Kernel Headers and makefiles to handle module compilation in the kernel package. If you need to install drivers and some third-party software, you need Kernel Headers. If a driver requires the Kernel source code, it may be enough to install Kernel Headers. Kernel Headers can be obtained 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 through FTP and YUM. Search online in the Fedora software warehouse and Update software warehouse to make sure they match your system and use the uname command. Example:
[Wisfern @ Wisfern ~] $ Uname-rm
2.6.32.11-99. fc12.i686. PAE i686
If you have upgraded your kernel (using yum), we recommend that you use yum to install this package.
[Wisfern @ Wisfern ~] $ Sudo yum install kernel-devel
Install Kernel Source (Kernel Source code)
Generally, you do not need to install the Kernel Source unless you want to recompile your Kernel Source code for some special reasons. In any case, Kernel hesders is required.
There are three basic steps for installing Kernel Sourcede.
1. Download the desired kernel source code (match with your current kernel if needed)
2. Install the SRC. RPM package
3. Use rpmbuild to convert source code to available status
NOTE: The following steps will consume at least MB of disk space!
Download kernel source code
Obtain the 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 "/12/" directory. Example: Example /.
Obtain the source code (for the source code of the upgraded Fedora kernel)
If you upgrade your kernel, 2 or 3 kernel source codes are available through Fedora updates.
Find it in the update directory on most Fedora image sites. Example: http://download.fedora.redhat.com/pub/fedora/linux/updates/12/srpms /.
Obtain the kernel source code through 'yum '(for the latest Fedora kernel source code)
Yum tool can download the latest kernel source code. If no updates are found, use the default Fedora kernel source code.
[Root @ Wisfern Desktop] # yumdownloader-source kernel
Install kernel source code
Install the selected and downloaded kernel. src. rpm
[Root @ Wisfern Desktop] # rpm-ivh kernel-2.6.32.11-99.fc12.i686.rpm
Preparing... ######################################## ### [100%]
1: kernel ####################################### #### [100%]
Prepare the kernel source code
Convert source code to available status:
[Mirandam @ charon downloads] $ sudo rpmbuild-bp-target = $ (uname-m)/usr/src/redhat/SPECS/kernel. spec
The source file can be found in the/usr/src/redhat/BUILD/kernel-2.6.23/directory. There are two useful directories.
1. Linux-2.6.23.ARCH/
The standard kernel source code of kernel.org contains the Fedora patch and update. The system architecture matches the uname-m output, which is generally i686. If you want to use the-target = option, you can use the noarch parameter.
2. vanilla/
Only the standard kernel.org kernel is included here (no patches or updates are available ).
NOTE: the detailed process of compiling and configuring the kernel source code for Fedora can be found in Fedora Wiki.