2.6.19 kernel compilation process summary

Source: Internet
Author: User
2.6.19 kernel compilation process summary-general Linux technology-Linux programming and kernel information. The following is a detailed description. Recently, I have been learning to compile the linux2.6 kernel until today, and I have finally compiled the kernel. I will write the happy process I 've experienced and share it with you.

First, make sure that gcc and other compilation tools are installed on the machine. Also, make sure that the initrd-tools tool is installed, there is a very important command in mkinitrd (I just failed to compile for the first time because I didn't install initrd-tools, and then I went online to find out why I wanted to use mkinitrd-o/boot/initrd. img-2.6.19/lib/modules/2.6.19 (for my kernel systems ))

1. Configure the kernel options in sudo make menuconfig according to your requirements. There are many options in it and you can select them slowly. Then you can save a file name, as you can see in the/boot directory, I Have To Be config-2.6.19
2. sudo make: Execute make directly from the 2.6 kernel, and complete the code dependency in the Makefile file. It does not need to be compiled in a way similar to bzImage or an independent compilation module.
3, sudo make modules_install so that the kernel is compiled, you can go to the/boot directory to see the generated vmlinuz-2.6.19, System. map-2.6.19 file and/lib/modules/New Kernel File 2.6.19
4. Run sudo mkinitrd-o/boot/initrd. img-2.6.19/lib/modules/2.6.19 to generate the initrd. img-2.6.19 boot file.
5. Modify grub (grub startup mode is installed on my machine) sudo vim/boot/grub/menu. list

Change the kernel and initrd to the new kernel. Then, restart the system and enter the new 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.