Article Title: how to compile the kernel. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Step 1: untar in any sub-directory to unlock the new kernel source program.
Tar xvfz linux-x.x.xx
Step 2: rm/usr/src/linux
This is usually a symbolic connection.
Step 3: Create a symbol under/usr/src/to connect to your new kernel directory.
Ln-s xxx/yyy/xxx/linux. x. x. xx/usr/src/linux
Step 4: change the current directory to/usr/src/linux
Cd/usr/src/linux
Step 5: become a super user
Su
Step 6: configure the kernel
If you want a graphical interface under X window, you can say:
Make xconfig
If you are not in X Window or do not want to use the graphic interface, you can say:
Make config
Wait a moment after answering the questions one by one, and wait until the prompt or GUI disappears,
The system is configured.
Step 7: generate a new kernel:
Make dep; make clean
Make zImage
Make sure the case is correct!
Step 8: If you use a module, you also need to generate and install the module.
Make modules
Make modules-install
Step 9: check your/etc/lilo. conf file.
Image. Example: image =/boot/vmlinuz
Copy/usr/src/linux/System. map to the/boot directory,
Copy/usr/src/linux/arch/i386/boot/zImage to the/boot directory.
And renamed it vmlinuz
Step 10: Install and restart the new kernel.
Lilo
Shutdown-r now
Warning you should have a backup boot method, or you will not cry if the new kernel cannot be started! :-)
It takes 20 minutes to compile a program on my 120 MHz Pentium 32 MB master memory machine.
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.