"Linux kernel" compilation and configuration Kernel (x86)

Source: Internet
Author: User

(1) Configuring the kernel
How to configure the kernel
1. Make config text-based interactive configuration
2. Make Menuconfig menu-based configuration in text mode
Configuring the kernel with make Menuconfig
In the configuration <>,[]
<> can be used in three choices of blanks, * or m,[] can be used in two options, blank and *.
Blank is not selected, * means select and compile into kernel image file, M will compile into kernel module.
Configuration results are saved in the. config file of the source root directory
(2) Compile kernel
1. Compiling the kernel
Make Zimage
Make Bzimage
Zimage for cores less than 512K
To get detailed compilation information, use: You can see the compilation options
Make Zimage V=1
Make Bzimage V=1
Note: The compiled kernel is located in the./arch/<cpu>/boot/Directory
2. Compiling kernel modules
Make modules
Make Modules_install the compiled kernel module from the kernel source directory to the/lib/modules * *,
Be prepared for packaging.
3. Making init RAMDisk
Methods: MKINITRD initrd-$version $version
Example: MKINITRD initrd-2.6.39 2.6.39
$version can be obtained by querying the directory under/lib/modules
(3) Install the kernel
1.CP arch/x86/boot/bzimage/boot/vmlinuz-$version
2.CP initrd-$version/boot/
3. Modify the/etc/grub.conf boot configuration file
(4) clearing the kernel
Make clean
Make Distclean

"Linux kernel" compilation and configuration Kernel (x86)

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.