Linux kernel source code usage

Source: Internet
Author: User
Article title: Linux kernel source code usage experience. 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.

Many people are familiar with linux, an open-kernel source-code OS, so open-source topics will not be described here. The problem is, after obtaining the linux kernel source (I don't know where it is, let's take a look at http://www.kernel.org/bar), how should I correctly configure, compile, install/upgrade it. It is stated in advance that, before the kernel installation/upgrade operation is executed, only kernel-related source files are modified in the system. after the kernel is executed, the old kernel is replaced by the new kernel, if there is any incompatibility problem caused by configuration errors or version errors, it cannot be restored without backup?

(1) Configure the kernel

After obtaining the kernel, the first step is to configure it. (if you do not compile the kernel first, you cannot. the compilation result is that the module selection depends on the configuration ). The three basic configuration commands are as follows: (run the command in the linux/directory of the kernel source code. The Complete Directory is usually/usr/src/liunx /)

A) text dialog interface

Make config

B) menu interface (semi-graphical interface)

Make menuconfig

C) graphical interface (with Xwindow library required)

Make xconfig

Many options are available when you configure the kernel, such as CPU, kernel management, memory usage, plug-and-play support, and network protocol components, we recommend that you understand the meaning of the options and then modify them. Otherwise, you may compile a kernel that is different from what you want. You can go to http://www.tldp.org/ to define the content.

(2) Compile the kernel

A series of commands, even if there is no error prompt, pass.

Make dep confirm dependency

Make bzImage to generate the kernel file

Make modules configuration options

Make modules_install

(3) Install/Update

Update the generated arch/i386/boot/bzImage and System. map to/boot, and then point the MBR boot program (LILO, GRUB, etc) image option to the new bzImage.

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.