Upgrade and compile the kernel

Source: Internet
Author: User
Upgrade and compile the kernel-general Linux technology-Linux programming and kernel information. The following is a detailed description. The new kernel brings not only new functions to the old kernel. It can also do the following:
I. Revise bugs in the old kernel to add many features.
2. The new kernel is more efficient, more stable, and faster.
3. The new kernel supports more hardware.
The steps to upgrade and compile the kernel are as follows:
1. Download new kernel resources.
2. decompress the package and enter it to the kernel code directory. All you need to do is:
[Root @ sunky/] # tar zxvf linux * .tar.gz
[Root @ sunky/] # cd linux *
[Root @ sunky/] # make mrproper (make sure there are no correct. o files in the Code directory and mutual dependencies between files)
Make sure that the asm, linux, and scsi links under the/usr/include directory point to the source code of the kernel directory to be upgraded. If these links do not exist, you need to manually create them:
[Root @ sunky/] # cd/usr/include
[Root @ sunky/] # rm-r asm linux scsi
[Root @ sunky/] # ln-s/usr/linux/include/asm-i386 (asm)
[Root @ sunky/] # ln-s/usr/linux/include/linux
[Root @ sunky/] # ln-s/usr/scr/linux/include/scsi
3. Use the following command to configure the kernel:
[Root @ sunky/] # make menuconfig
4. After the kernel is configured, the next task is to compile. The commands related to the compilation are as follows:
[Root @ sunky/] # make dep (this step is not required in the 2.6 kernel)
[Root @ sunky/] # make clean
[Root @ sunky/] # make zImage, make zImage can generate a larger kernel .)
[Root @ sunky/] # make bzImage
[Root @ sunky/] # make modules
[Root @ sunky/] # make modules_install
[Root @ sunky/] # depmod-
5. Update the kernel. A new kernel has been created so far. To use the new kernel, make the following changes.
[Root @ sunky/] # cp/usr/src/linux/System. map/boot/System. map-2.6.11
[Root @ sunky/] # cp/usr/src/linux/arch/i386/bzImage/boot/vmlinuz-2.6.11
The above two files are newly generated during the compilation. Modify the two links System. map and vmlinv below/boot to point them to the new kernel file:
[Root @ sunky/] # cd/boot; rm-f System. map vmlinuz
[Root @ sunky/] # ln-s vmlinuz-2.6.00 vmlinuz
[Root @ sunky/] # ln-s System. map-2.6.11 System. map
This completes the kernel upgrade and compilation. The knowledge I wrote comes from the Linux Application Development Technology details, which was published by the People's post and telecommunications Publishing House.

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.