Compile 2.6.X kernel-general Linux technology-Linux programming and kernel information. The following is a detailed description. We have compiled a new kernel 2.6.24 today. The following is a reference article for compilation.
1. Obtain the linux source file
Download linux-2.6.x.tar.gz to/usr/src from ftp://ftp.kernel.org/pub/linux/kernel/v2.6
2. su to root user
3. The next command sequence is to compile the kernel.
# Cd/usr/src
# Tar xzvf linux-2.6.x.tar.gz unzip to linux-2.6.x directory
# Mv linux-2.6.x linux-2.6.x-1 modify directory name
# Ln-s linux-2.6.x-1 linux creation Link
# Cd linux
# Vi Makefile modify kernel extension version
Modify EXTRAVERSION to-1 (or other characters, which corresponds to the directory name)
# Make mrproper clear garbage
# Make menuconfig select the kernel Option
This step is the most troublesome. There are a lot of things to choose from, using the IBM Library
Students can be in http://www.w-m-p.com/kconfig-2.6.2-rc2-mm1.txt
Find a configuration file. If it is found (maybe not found), copy it
/Usr/src/linux/and rename it to. config, and then run this command to fine tune
# Make bzImage compile the kernel
# Make modules compilation Module
# Make modules_install installation Module
(Note: it is best for debian IBM users to install module-init-tools)
# Depmod-
(It seems you can do it without using it)
4. Modify startup (for lilo and grub, you can see the configuration file)
# Cp/usr/src/linux/System. map/boot/System. map-2.6.x-1
# Cp/usr/src/linux/arch/i386/boot/bzImage/boot/vmlinuz-2.6.x-1
Use the specific version number to differentiate different kernels. In this way, you can select different kernels to start at the beginning.
# Vi/etc/lilo (Add the following content, which will be displayed in the lilo boot list in the future)
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.