Linux kernel Analysis--construct a simple Linux system menuos (20135213 Lam Han Jin)

Source: Internet
Author: User

Experimental guidance

    • Open the shell with a virtual machine in the lab building

    1. CD linuxkernel/
    2. Qemu-kernel linux-3.18.6/arch/x86/boot/bzimage -initrd rootfs.img

After the kernel boot is completed into the menu program ("Software Engineering C Coding Practice" course project), support three commands help, version and quit, you can also add more commands, for elective "Software Engineering C Coding practice" of children's shoes should be a piece of cake.

    • Debug kernel with GDB trace

    1. Qemu-kernel linux-3.18.6/arch/x86/boot/bzimage -initrd rootfs.img-s -S # Description of the-s and-s options:
    2. #-S Freeze CPU at startup (with ' C ' to start execution)
    3. #-S Shorthand for-gdb tcp::1234 If you do not want to use port 1234, you can use-GDB tcp:xxxx to replace the-s option

Open another Shell window

    1. Gdb
    2. (gdb)file linux-3.18.6/vmlinux # Load symbol table before Targe remote in GDB interface
    3. (GDB) Target remote:1234 # Establish a connection between GDB and Gdbserver, press C to keep the Linux on qemu running
    4. (GDB) break Start_kernel # breakpoints can be set before target remote or after

Experimental requirements:

    • Booting from Start_kernel to init process using GDB trace debug kernel

    • Detailed analysis of the process initiated from Start_kernel to Init process and the combination of experiments to write a signed blog, and in the blog post "real name (and the name of the final application certificate must be consistent) + Original works reproduced please specify the source +" Linux kernel Analysis "MOOC Course/http mooc.study.163.com/course/ustc-1000029000 ", the specific requirements of the blog content are as follows:

      • Topic self-proposed, the content revolves around the Linux kernel boot process, namely starts from Start_kernel to the INIT process;

      • You need to use an experiment in your blog

      • The execution of the Start_kernel function needs to be carefully analyzed in the blog content

      • The summary section needs to clarify its understanding of the "Linux system startup process", especially how the idle process, process 1th is coming.

    • 3) Please submit the blog post URL to the NetEase cloud classroom MOOC Platform Linux kernel Analysis Mooc course, edited into a link can be directly clicked open.

Linux kernel Analysis--construct a simple Linux system menuos (20135213 Lam Han Jin)

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.