Linux kernel @ system composition and kernel configuration compilation

Source: Internet
Author: User

What does the Linux system consist of?

Consists of user space (application +gnu C standard library) and kernel space (System call interface + kernel + Kernel architecture code).

What exactly is the Linux kernel? and composition.

Seven types of operating levels for arm?

What is the role of the kernel network stack?

Provides a rich network protocol (TCP/IP, PPPOE) implementation for Linux. Put the network protocol stack in the kernel to improve network performance and reduce CPU overhead.

What is the role of the virtual file system?

To support multiple file systems, and to provide them with a unified operating interface.

Linux Kernel source code structure

For specific content analysis in each folder: Reference http://blog.chinaunix.net/uid-24219701-id-2843452.html

Kernel code directory in FEDOAR14 system:

Linux kernel Configuration and compilation

Kernel configuration commands (executed at kernel root):

If the kernel has already been compiled before executing the configuration command, first $make mrproper

$make config is based on the interactive configuration of text mode.

$make menuconfig Menu-based configuration (with more) in text mode. Three forms of Y M N.

$make Gconfig a GTK +-based graphical tool.

$make Defconfig

$make Xconfig based on the TCL/TK x graphics Configuration interface.

$make Oldconfig uses the original configuration file (. config), but asks for the newly added kernel functionality.

Common kernel configuration options reference: http://www.cnblogs.com/Robyte/archive/2010/06/09/2591274.html

Kernel configuration commands detailed reference to "Linux kernel design and implementation"

Kernel compilation:

After the kernel configuration is complete, direct $make (note that if the kernel is a version prior to 2.6 you need to run the $make dep,2.6 later versions without the dependency between the code will be automatically maintained), the kernel code root directory generated elf files, but this file is not an executable binary file.

If there is a module compiled module: $make modules;

Then install the module: $make modules_install;

Then: $make install to the/boot directory. (This process is also the kernel installation process, the following kernel installation is another method)

To build an executable binary kernel file you also need to use $make zimage or $make Bzimage (the former is used to compile a kernel less than 512K, which is used to compile the large kernel). After compiling, a binary kernel file will be generated under arch/<cpu>/boot/.

Kernel installation (x86 platform):

1. CP arch/i386/boot/bzimage/boot/vmlinuz-$version

2. CP system.map/boot/system.map-$version

3. Rm/boot/system.map

4. Ln-s/boot/system.map-$version/boot/system.map

5. Modify/etc/grub.conf or/etc/lilo.conf, add a new title (similar to the following)

Note:/boot/grub/menu.lst can view the binary kernel files loaded by the current system.

Linux kernel @ system composition and kernel configuration compilation

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.