Experimental guidance
- CD linuxkernel/
- 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.
- Qemu-kernel linux-3.18.6/arch/x86/boot/bzimage -initrd rootfs.img-s -S # Description of the-s and-s options:
- #-S Freeze CPU at startup (with ' C ' to start execution)
- #-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
- Gdb
- (gdb)file linux-3.18.6/vmlinux # Load symbol table before Targe remote in GDB interface
- (GDB) Target remote:1234 # Establish a connection between GDB and Gdbserver, press C to keep the Linux on qemu running
- (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)