Compile 2.6.X Kernel

Source: Internet
Author: User
Compile 2.6.X kernel-general Linux technology-Linux programming and kernel information. The following is a detailed description. We have compiled a new kernel 2.6.24 today. The following is a reference article for compilation.

1. Obtain the linux source file
Download linux-2.6.x.tar.gz to/usr/src from ftp://ftp.kernel.org/pub/linux/kernel/v2.6

2. su to root user

3. The next command sequence is to compile the kernel.
# Cd/usr/src
# Tar xzvf linux-2.6.x.tar.gz unzip to linux-2.6.x directory
# Mv linux-2.6.x linux-2.6.x-1 modify directory name
# Ln-s linux-2.6.x-1 linux creation Link
# Cd linux
# Vi Makefile modify kernel extension version
Modify EXTRAVERSION to-1 (or other characters, which corresponds to the directory name)
# Make mrproper clear garbage
# Make menuconfig select the kernel Option
This step is the most troublesome. There are a lot of things to choose from, using the IBM Library
Students can be in http://www.w-m-p.com/kconfig-2.6.2-rc2-mm1.txt
Find a configuration file. If it is found (maybe not found), copy it
/Usr/src/linux/and rename it to. config, and then run this command to fine tune

# Make bzImage compile the kernel
# Make modules compilation Module
# Make modules_install installation Module
(Note: it is best for debian IBM users to install module-init-tools)

# Depmod-
(It seems you can do it without using it)

4. Modify startup (for lilo and grub, you can see the configuration file)
# Cp/usr/src/linux/System. map/boot/System. map-2.6.x-1
# Cp/usr/src/linux/arch/i386/boot/bzImage/boot/vmlinuz-2.6.x-1
Use the specific version number to differentiate different kernels. In this way, you can select different kernels to start at the beginning.
# Vi/etc/lilo (Add the following content, which will be displayed in the lilo boot list in the future)

Image =/boot/vmlinuz-2.6.x-1
Label = Linux-2.6.x-1
Read-only
Optional

# Lilo-v
(Note: This step is very important !!)

5. # reboot
Then you can select a new kernel to start. If you do not like it, you can select the previous kernel.
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.