General Linux kernel compilation process

Source: Internet
Author: User
General Linux kernel compilation process-general Linux technology-Linux programming and kernel information. The following is a detailed description. Original: suo Suo

I compile the kernel 2.6.59.9 On Debian. All the software packages used are available in different releases (the installation method is different). Therefore, it should be fine for other releases, if the test passes or fails, you may have to wait for your convenience. Thank you!

1. log on to the system as a normal user (my user name here is jtkk), from the home... ux-2.6.25.9.tar.bz2; Save the downloaded file to the home Directory (/home/jtkk ).

2. Decompress
Tar xjf linux-2.6.25.9.tar.bz2

3. Install related software
1) if you configure the kernel editing option on the Character interface, you need to install
Apt-get install libncurses5-dev

2) If you configure the kernel editing option in the graphic interface, you need to install
Apt-get install libqt3-mt-dev

3) install the initrd. img Generation Tool
Apt-get install initramfs-tools

4. Use old Kernel Parameters
Cd linux-2.6.25.9
Cp/boot/config-'uname-R'. config
Make oldconfig

This process will use. parameters in config, and ask the new kernel parameter settings, which can be answered by n, m, or y, respectively, indicating not to be edited into the kernel, edited into a module, or edited to the kernel. If you do not know the meaning of the parameter, we recommend that you press enter to accept the default value. For more information about the meanings of specific kernel parameters, see the online article.

5. If you have compiled the kernel before, you need to clear the old intermediate file.
Make mrproper

6. Set Kernel Parameters
Make menuconfig
Or
Make xconfig

7. start compiling and generate kernel files and module files.
Make

8. After the compiled modules are installed, replace them with the root user.
Make modules_install
This command will install the module to/lib/new kernel version number/

9. Install the kernel file to the/boot directory.
Make install

10. Generate the initrd. imgfile
Mkinitramfs-o/boot/initrd. img-2.6.25.9 2.6.25.9

Remember not to use mkinitrd to generate an imgfile (mkinitramfs should be used), and the 2.6 kernel uses a new format (refer to: http://wiki.debian.org/InitrdReplacementOptions or http://kernel-handbook.alioth.debian.org/ch-initramfs.html ).

In the past, only the kernel will be compiled using the method described in the Debian document. When using this method, the tool that generates the imgfile is useless, so the new kernel is always panic (this is better ).

11. Modify grub. conf
The specific content is relatively simple.

12. OK. Restart.
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.