Compile Linux kernel 2.6.20.6 (FedoraCore6)

Source: Internet
Author: User
Compile Linux kernel 2.6.20.6 (FedoraCore6) -- Linux general technology-Linux programming and kernel information. The following is a detailed description. After compiling the kernel today, make menuconfig is configured, too many may be disabled, and many syntax errors may occur during the result of make. Later, I re-configured it, removed a few options, and re-compiled it. There was only a small amount of warning (usually using uninitialized variables ).

Summary:

1. Extract the kernel source code to the/usr/src/kernels directory named linux-2.6.20.6

2. cd/usr/src/kernels

Ln-s linux-2.6.20.6 linux

Cd linux/include

Ln-s asm/usr/include/asm

Ln-s linux/usr/include/linux

Ln-s scsi/usr/include/scsi

3. cd/usr/src/kernels/linux

Perform Kernel configuration. Check the configuration method online.

Make menuconfig

Compile the kernel

Make

(Modpost will be automatically executed to generate *. o into *. ko files)

Installation Module

Make modules_install

4. After compilation, the corresponding kernel version folder will be generated under the/lib/modules folder, for example, "2.6.20.6". The newly generated kernel modules with the extension ko are all here.

5. Install the kernel

Cd/usr/src/kernels/linux

Cp arch/i386/boot/bzImage/boot/vmlinuz-2.6.20.6

Cp System. map/boot/System. map-2.6.20.6

Cd/boot

The following step generates the initrd-2.6.20.6.img File

/Sbin/mkinitrd initrd-2.6.20.6.img 2.6.20.6

6. Configure grub

Edit/etc/grub. conf and add lines similar to the following:

Title Fedora Core (2.6.20.6)

# The following line depends on the partition where your linux instance is located.

Root (hd0, 7)

Kernel/boot/vmlinuz-2.6.20.6 ro root = LABEL =/rhgb quiet

Initrd/boot/initrd-2.6.20.6.img

7. Restart your computer and select Fedora Core (2.6.20.6)

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.