Kernel compilation in Ubuntu edgy

Source: Internet
Author: User

/*
Copyright
The author of this article is 88250 a free software enthusiast, so although this article is not software, it is released in the spirit of GPL. No one can use, repost, copy, or re-distribute it freely. However, the author's signature must be retained, and no clauses in the statement may be modified in any form or attached. You can freely link, download, and disseminate this document, provided that the full text is fully reproduced, including the complete copyright information and the translator's statement.

Author blog: http://blog.csdn.net/DL88250
*/

Preface:
In fact, it is not very difficult to compile the kernel, as long as you are careful, it should not be a problem. I only use Linux for about a week. After reading many articles on the network, the kernel is successfully compiled at a time, so you must do the following:

0. I compiled it in Ubuntu edgy.
1. Ubuntu is based on Debian. You can refer to the materials for compiling the kernel In Debian to build the kernel.
2. Focus on the compilation of the kernel In Debian mode by referring to binary written by a 2002-level senior.
And <share your own kernel compilation experience>

Question:
0. Download the tool used to compile the kernel
A. Build-essential, including GCC and make.
B. kernel-package, which must be used by make-kpkg
C. initrd-tools, used to create initrd. imag

1. Download the kernel
Http://www.kernel.org/pub/linux/kernel/v2.6/

2. Unzip the kernel to the directory linux-2.6.20 of/usr/src

Sudo tarxjvf linux-2.6.20.tar.bz2-C/usr/src/

Then go to the directory CD/usr/src/linux-2.6.20


3. Perform Kernel configuration
Sudo make menuconfig

Understanding configuration options can add a lot of knowledge, refer to this http://forum.ubuntu.org.cn/weblog.php? W = 215
Reasonable configuration can make your machine run faster, that is, you can configure and optimize the hardware of your machine.

4. Start building the kernel
Clear the intermediate file sudo make-kpkg clean of the compilation configuration program

Make-kpkg is a Debian kernel packaging tool that can compile Linux source code and package it into a Debian kernel installation package. This clean command can help you check the syntax errors during the configuration process, for example, the invalid characters you entered in general setup-> local version.
Then, compile and build the sudo make-kpkg -- Revision = 88250.1.0 kernel_image kernel_headers modules_image.

Here, 88250.1.0 is the version name and must end with a number.

5. Compiling the kernel ....
This process lasted for about 30 minutes on my machine (Pentium M 750 + 1g DDR2 RAM). During this period, several warnings may be generated from time to scare you.

6. Create the initrd file sudo mkinitramfs-O/boot/initrd. img-2.6.20by88250/lib/modules/2.6.20configureby88250

For a detailed introduction to the initrd file, see: http://publish.it168.com/2006/0526/20060526048101.shtml

7. Modify menu. lstsudo gedit/boot/GRUB/menu. lst.

The content is written according to the old kernel.

8. Restart sudo reboot.

You can't do it ....

P.s.
A. If you cannot start X-server, run this command to update the Xorg. conf file sudo dpkg-reconfigure-phigh xserver-Xorg.

B. View version uname-.

Daniel @ Daniel-LAPTOP :~ $ Uname-
Linux Daniel-laptop 2.6.20configureby88250 #1 mon Feb 19 16:40:36 CST 2007 i686 GNU/Linux

Good luck :-)

 

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.