(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)