Kernel compilation in Ubuntu9.10

Source: Internet
Author: User
Now the latest kernel version is 2.6.32, and the kernel version that comes with MySQL 9.10 is 2.6.31-20. The difference between the two is not great. Therefore, the main purpose of this article is to familiarize yourself with the kernel compilation process and lay a good foundation for the following kernel programming. The experimental environment is Ubuntu9.10 in VirtualBox. 1, download the linux-2.6.32, a lot of ways, do not specify 2, unzip to/usr/src/root @ globus-laptop :~ # Ls/usr/src/l

Now the latest kernel version is 2.6.32, and the kernel version that comes with MySQL 9.10 is 2.6.31-20. The difference between the two is not great. Therefore, the main purpose of this tutorial is to familiarize yourself with the kernel compilation process and lay a good foundation for Kernel programming. The experimental environment is Ubuntu 9.10 In VirtualBox.

1, download the linux-2.6.32, a lot of ways, not specific description

2. decompress the package to/usr/src /.
Root @ globus-laptop :~ # Ls/usr/src/ls/usr/src
Linux-headers-2.6.31-14-generic vboxguest-3.1.0
Linux-2.6.32 linux-headers-2.6.31-20 vboxvfs-3.1.0
Linux-headers-2.6.31-14 linux-headers-2.6.31-20-generic vboxvideo-3.1.0

3. Create a new link
Root @ globus-laptop :~ # Ln-s/usr/src/linux-2.6.14/usr/src/linux
Root @ globus-laptop :~ # Ls/usr/src/
Linux linux-headers-2.6.31-14-generic vboxguest-3.1.0
Linux-2.6.32 linux-headers-2.6.31-20 vboxvfs-3.1.0
Linux-headers-2.6.31-14 linux-headers-2.6.31-20-generic vboxvideo-3.1.0

4. Configure the kernel.
This process is troublesome. We use the configuration of previous versions.
Root @ globus-laptop :~ # Cd/usr/src/linux
Root @ globus-laptop:/usr/src/linux # uname-r
2.6.31-20-generic
Root @ globus-laptop:/usr/src/linux # cp/boot/config-2.6.31-20-generic. config
Start Configuration:
Root @ globus-laptop:/usr/src/linux # make xconfig
In this step, you may encounter the following problems:
HOSTCC scripts/kconfig/kconfig_load.o
Make [1]: *** No rule to make target 'scripts/kconfig/. tmp_qtcheck', needed by 'scripts/kconfig/qconf. o'. Stop.
Make: *** [xconfig] Error 2
Solution:
Apt-get install build-essential
Apt-get install libqt3-mt-dev
This is because xconfig requires libqt3-mt-dev
Make xconfig again
On the configuration page, select the desired configuration (most of the configuration has been completed by the. config file), save, and exit.

5. Start compilation.
Root @ globus-laptop:/usr/src/linux # make-kpkg clean
If no kpkg is displayed, follow the prompts to install it.
Root @ globus-laptop:/usr/src/linux # make-kpkg -- initrd-revision = first kernel_image kernel_headers
Long wait...

6. Install the new kernel.
After the kernel is successfully built, two. deb packages can be found in the/usr/src directory. One is the kernel installation package and the other is the kernel headers installation package.
Root @ globus-laptop:/usr/src # dpkg-I/usr/src/linux-image-2.6.32_first_i386.deb
Root @ globus-laptop:/usr/src # dpkg-I/usr/src/linux-headers-2.6.32_first_i386.deb

7. Restart.

Related Article

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.