How to rebuild the Ubuntu Linux kernel pack

Source: Internet
Author: User
Keywords Kernel below
Tags aliyun compile debian debugging development directory disk space guide

This page discusses how to rebuild the http://www.aliyun.com/zixun/aggregation/13835.html ">ubuntu Linux kernel pack." This is the most straightforward way to compile your own Ubuntu kernel, but it's also a fairly heavyweight approach. If you plan to do some kernel development or debugging, you may be happier to follow this guide. It's more complicated but also more flexible.

Installation

We'll build anything under the "Linux" directory in your user directory (or what you want to call). The following steps must be run as root (with "sudo" in front).

$ sudo apt build-dep linux-source-2.6.8.1
$ mkdir ~/linux
$ CD ~/linux
$ apt Source linux-source-2.6.8.1
$ CD linux-source-2.6.8.1-2.6.8.1

Note: This approach requires a lot of disk space, especially if you want something special (see below). 1.6G is required to achieve full features. It may even require more disk space during compilation.

Configuration

By this step, you may want to change your kernel configuration. In debian/config/arch/(for example, my current kernel is "linux-image-2.6.8.1-3-686", I will edit the debian/config/i386/686) directory to modify the corresponding file.

You may also want to delete other configurations that you don't care about. Or at least move them to another directory. Otherwise, you will build each one--this is a time-consuming process. The following example means that no features are built except for 686.

$ CD debian/config/i386
$ mkdir Disabled
$ mv * Disabled
$ mv disabled/686.

Construction

Now that the source has been installed and configured, build it. If you do not limit the above features, it will take a considerable amount of time (about seven hours on my 1Ghz laptop). -B is to say that only the binary files of a dependency structure are built, and UC and-us are those files that cannot be encrypted,-rfakerroot allow you to do anything as a general (not root) user.

$ CD ~/linux/linux-source-2.6.8.1-2.6.8.1
$ dpkg-buildpackage-b-uc-us-rfakeroot

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.