Kernel changes and important information in FedoraCore5

Source: Internet
Author: User
Tags ftp site rpmbuild
Kernel changes and important information in FedoraCore5-general Linux technology-Linux programming and kernel information. The following is a detailed description. 8.1. Version

This release is based on the 2.6 series kernel. Fedora Core may contain additional patches to improve, correct, or add additional features. Therefore, the Fedora Core kernel is not exactly the same as the kernel called vanilla kernel.

Http://www.kernel.org/

To obtain a list of these patches, download the source RPM package and run the following command:

Rpm-qpl kernel-. src. rpm8.2. Update log

The software package revision history can be viewed using the following command:

Rpm-q -- changelog kernel-if you want to see more friendly revision logs, visit http://wiki.kernelnewbies.org/linuxchanges. The http://kernel.org/git provides a summary of the differences between the kernel and the exact two versions. Fedora is based on the Linus kernel tree.

The customization made by Fedora can be found in the http://cvs.fedora.redhat.com.


8.3. Kernel configuration

Fedora Core 5 contains the following kernel build

The kernel of the local machine, including single Processor and SMP (Symmetric Multi Processor) versions. The configured source code is included in the kernel-[smp-] devel-.. rpm package.

Virtual kernel hypervisor for use with the Xen emulator package. Configured sources are available in the kernel-xen0-devel-... rpm package.

Virtual kernel guest for use with the Xen emulator package. Configured sources are available in the kernel-xenU-devel-... rpm package.

Kdump kernel, used with kexec/kdump. The configured source code is in the kernel-kdump-devel-. rpm package.

You may install sources for all kernel flavors at the same time. the files are installed in the/usr/src/kernels/-[xen0 | xenU | kdump]-/tree. use the following command:

Su-c 'yum install kernel-{xen0, xenU, kdump}-devel 'select one or more variants, separated by commas (,), with no space. Enter the root password when prompted.


The default Kernel provides SMP configuration for x86_64

Fedora Core 5 does not provide SMP kernel for the x86_64 System


PowerPC Kernel support

Fedora Core 5 does not provide Xen or Kdump support for the PowerPC system.


8.4. Report Error

Refer to Notes for reporting Linux Kernel errors in the http://kernel.org/pub/linux/docs/lkml/reporting-bugs.html. You can also access the http://bugzilla.redhat.com to report errors specific to Fedora.


8.5. Follow the textbooks on the kernel

For Linux kernel development, many teaching materials, examples and textbooks assume that the kernel source code is installed in the/usr/src/linux directory. If you create a symbolic link as follows, you can continue to use those learning materials in Fedora Core. Install the appropriate kernel source code as mentioned above, and then:


Su-c 'ln-s/usr/src/kernels/kernel-/usr/src/linux ': Enter the root password.


8.6. Prepare for kernel development

Unlike earlier versions, Fedora Core 5 does not contain the kernel-source software package. The configured source code can be obtained by following the Kernel configuration step.


These steps refer to the currently running kernel

To simplify the following commands, assume that you need to configure the kernel to use the current running Kernel configuration. In the following steps, the phrase version refers to the kernel version displayed using the uname-r command.



The Fedora Core users who need to use the kernel source code can find them in the kernel. src. rpm package. To release the source code tree from a file, run the following command:


Do not build software packages as Super Users

Building a software package as a Super User is extremely dangerous and should not be done like this, even the kernel. The following operations allow you to build the kernel as a normal user. Many tutorials use/usr/src/linux as the kernel source code location. If you want to follow these operations, you can replace them

~ /Rpmbuild/BUILD/kernel-/linux -.

Prepare the RPM Software Package Build Environment in the personal directory and run the following command:

Su-c 'yum install fedora-rpmdevtools 'fedora-buildrpmtree: Enter the root password when prompted.

Get the kernel-version.src.rpm file from one of the following sources:

The SRPMS file is included in the appropriate srpms cd iso image file.


Download the HTTP or FTP site of the kernel package

Run the following command:

Su-c 'yum install yum-utils 'Su-C' yumdownloader -- source kernel ': Enter the root password.

Install kernel-. src. rpm and run the following command:

Rpm-Uvh kernel -. src. run the rpm command to write RPM content to $ {HOME}/rpmbuild/SOURCES and $ {HOME}/rpmbuild/SPECS. Here $ {HOME} is your personal directory.


Hard Disk Space Requirements

The complete kernel build process may require several gids of storage space in your personal directory.

Use this command to prepare the kernel source code:

Cd ~ /Rpmbuild/SPECSrpmbuild-bp -- target $ (uname-m) kernel-2.6.spec kernel source code tree is located in the $ {HOME}/rpmbuild/BUILD/kernel-/directory.


The Kernel configuration file attached to Fedora Core is in the configs/directory. For example, the i686 SMP configuration file is named configs/kernel-version-i686-smp.config. Run the following command to copy the required configuration file to a proper location for compilation:


Cp configs/. config you can also find the. config file that matches your current kernel at/lib/modules/version/build/. config.


Each kernel name contains its version number, which is also the value displayed by the uname-r command. The first four lines of the kernel Makefile define the kernel name. To protect the official kernel from being damaged, Makefile has been modified to generate a name different from that of the running kernel. Before inserting a running kernel into a module, this module must compile the running kernel. To do this, you must edit the kernel Makefile.


For example, if uname-r returns the 2.6.15-1.1948_FC5 string, the EXTRAVERSION definition is defined from:


Modify EXTRAVERSION =-prep:


EXTRAVERSION =-1.1948 _ FC5 is all the content after the last hyphen.


Run the following command:


Make oldconfig makes no difference.


8.7. Build only Kernel Modules

Build a kernel module for the running kernel, such as your own device driver, without the need for a complete source code tree. For example, to build the foo. ko module, create the following Makefile in the directory containing the foo. c file:

Obj-m: = foo. oKDIR: =/lib/modules/$ (shell uname-r)/buildPWD: = $ (shell pwd) default: $ (MAKE)-C $ (KDIR) M = $ (PWD) modules execute the make command to compile foo. the ko module is enough.


8.8. user space dependency on the kernel

Fedora Core 5 adds support for Cluster Storage through the Red Hat GFS file system. This requires the use of special kernels and some user space tools, including the management of daemon. To delete such a kernel after the upgrade, run the command su-c 'yum remove kernel. The yum command will automatically remove the dependent software package as needed.


PowerPC does not support GFS

Fedora Core does not build a GFS module for the PowerPC system.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.