Constructs a simple Linux kernel menuos

Source: Internet
Author: User

---restore content starts---

Introduction of Linux Kernel source code

The code in the Arch/x86 directory is our most important concern.

fs/File System

init/Kernel boot-related code

The Start_kernel function is equivalent to the C language's main function

Core code of the Kernel/linux kernel

mm/Memory Management Code

Second, to construct a simple Linux system

Experiments using the experimental building structure:

The process of building an experimental building yourself:

Iii. ways to use GDB to track and debug the Linux kernel

One, using GDB to trace the debugging of the Linux kernel method

(1) Use GDB to trace the debug kernel and freeze it.

(2) Using horizontal split, create a new window using GDB

Second, simple analysis of Start_kernel

Init_task is the pcb,0 process that was created manually, which is the final idle process.

Trap_init initialization interrupt, set interrupt gate, System trap gate.

Init_process the first user-state process of the Linux system, the INIT program under the root directory (as process number 1th) was created by Kernel_init.

Rest_init No. 0 process, a process that has been in existence, creating process number 1th.

Dispatched to the idle process when no process is required for the system to execute.

Constructs a simple Linux kernel menuos

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.