Driver Programming Configuration Kernel tree

Source: Internet
Author: User

Many friends may be interested in Linux driver programming, but the first step in learning a driver is to build a kernel tree in your Linux system, how to construct it

The following is for you to explain, but I was just beginning to learn, so the kernel package used is also relatively old. To a certain extent, I will start to try the latest kernel package myself.

Then we'll share it with you.

First, obtain the kernel source code.

1. View the Linux kernel source packages that can be downloaded:

www.kernel.org

The system displays the following information:

2.6.32.67-linux kernel source for version 2.6.32.67

2. Select the source package you want to download:

#wget HTTPS://WWW.KERNEL.ORG/PUB/LINUX/KERNEL/V2.6/LONGTERM/V2.6.32/LINUX-2.6.32.67.TAR.XZ

3 after the completion of the decompression

#tar-XVF Linux-2.6.32.67.tar.xz

Two. Start compiling the kernel after the source is obtained

1. Enter the kernel root directory to configure the Linux kernel:
#make Oldconfig

2 "compilation

#make Bzimage

The compilation time is long, and after completion, a VMLINUX.O file is generated in the current directory.

3 "Compilation module

#make Modules

The compilation time is also relatively long

4 "Installation Module

#make Modules_install

After completion, a folder Linux-2.6.32.67-generic is generated under the/lib/modules directory,

Constructs the kernel tree successfully.

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.