Preparations for Kernel compilation based on FedoraCore3

Source: Internet
Author: User
Preparations for Kernel compilation based on FedoraCore3-general Linux technology-Linux programming and kernel information. The following is a detailed description. Because intel's BG minipci wireless card is required, and the official driver is only based on linux2. So you have to compile linux2 by yourself. 6 kernel. Although Fedora Core 3 uses a 2.6 kernel, it still cannot be compiled directly, so the preparation record is as follows:
I personally feel like linux2. 6 is faster, but the most obvious thing is shutdown.
Therefore, we still hope that you can quickly invest in 2. 6.

System used: Fedora3

1. download a copy of the kernel source code
Http://kernel.org/pub/linux/kernel/v2.6/
2.install module-init-tools-3.0.tar.gz. It replaces depmod [/sbin/depmod] and other tools.
Http://www.kernel.org/pub/linux/... it-tools-3.0.tar.gz
Tar-zxvf module-init-tools-3.0.tar.gz
Cd module-init-tools-3.0
./Configure -- prefix =/sbin
Make
Make install
./Generate-modprobe.conf/etc/modprobe. conf # This step does not show back, you need to wait patiently for a while. This is the last time.

Command "make moveold" will change the system's original modutils tool program to "*. old" (for example, lsmod. old, etc.). NOTE! This is an important step. Do not omit it. this will allow you to continue using the original linux-2.4.x system, because the new module-init-tools toolkit in the 2.4.x system is actually dependent on the original "*. old "program to load the kernel module. if you forget this step, you can first download and install the original modutils package, and then follow the steps above to repeat it.
The new module-init-tools Tool Kit does not use the original/etc/modules. the conf configuration file is used, but the new configuration file/etc/modprobe is used. conf. therefore, the command ". generate-modprobe.conf/etc/modprobe. conf "to generate a new configuration file/etc/modprobe. conf.
3. Install modutils-2.4.25-8.9.i386.rpm
Http://www.kernel.org/pub/linux/ker...4.21-23.src.rpm
# Rpm-Uvih modutils-2.4.25-8.9.i386.rpm
Upgrade modutils.

4. Install the new kernel:
Copy the new kernel to/usr/src,
# Tar xzvf linux-2.6.9.tar.gz ----- extract.
Use ll to check whether a symbolic link named linux exists under/usr/src/. If yes, delete the link. This is the symbolic link of the version kernel.
# Ln-s linux-2.6.9 linux ------ build linux-2.6.11 symbolic link linux
5. Set the kernel.
# Cd/usr/src/linux
# Make mrproper ----- Delete unnecessary files and directories
# Make config (the most traditional text-based configuration interface is not recommended)
# Make menuconfig (Text menu-based configuration interface, recommended for character terminals)
# Make xconfig (the configuration interface based on the graphic window mode is recommended in Xwindow)
# Make oldconfig (if you only want to modify some small points based on the original Kernel configuration, it will save a lot of trouble) [We will use this later]

After the kernel is prepared, you can compile it directly. The "make dep" step shows no need.
# Make bzImage
# Make modules
# Make modules_install
# Make install

The above command "make install" will :(
1) copy the compressed kernel image to the/boot directory and create the System. map symbolic link. (2) modify the configuration file of the bootloader;
(3) Call the mkinitrd program to create the initrd image of the kernel. for GRUB, add the following similar configuration lines in the/boot/grub. conf configuration file:
Title Red Hat Linux (2 .***)
Root (hd0, 1)
Kernel/boot/vmlinuz-2. *** ro root = LABEL =/
Initrd/boot/initrd-2. ***. img
Check whether grub. conf is correct.
You can also:
# Ll/boot/vmlinuxz *
We can see the generation time of the New and Old kernels. If the time is correct, it indicates that a new kernel is indeed generated during the kernel compilation process.

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.