Under jupyter from zero simulation environment to develop simple operating system: build a learning ucore_OS learning environment (section II)

On one has a million words, and had a plus
command if you want to experience the direct effects of the experiment can be performed directly in this chapter

Img files can be generated in qemu in normal operation, then the basic on real hardware is working properly install the operating system

On a content

As the one we have successfully installed ctags, qemu and other plug-in in centos7

Execute the following command to create a blogger to build a good environment in windows


#创建一个 centos 开发环境,来体验开发ucoreos的过程

docker run -tdi   -p 21022:22  -p 21088:8888  --name   ucoreos   --privileged=true  registry.cn-hangzhou.aliyuncs.com/mkmk/conda:qemu   init  |  docker exec -d  ucoreos   /bin/bash -c "cd /home && source /etc/profile && nohup jlab &"

After the build environment, you can directly access, development interface
http: // localhost: 21088 / lab
password password lmklmk

Many of the following questions and you may not encounter, because bloggers when building the development environment has eliminated a lot of bug, you can try to run a successful direct command

Run directly lab1

After running jupyter environment, open a terminal and enter the following command

A complete boot the operating system command

cd  /home/ucoreos/ucore_os_lab-master/labcodes_answer/lab1_result  &&  make  && cd bin &&  qemu-system-x86_64    -hda ucore.img -parallel stdio   -nographic

Termination command, you need to create a new terminal

pkill  -9  qemu-system-x86

If you feel interesting, I want to seriously study in addition to carefully read on a material, but also need to carefully read the following experiment Tutorial

Experimental Tutorial https://chyyuu.gitbooks.io/ucore_os_docs/content/

··············································
··············································
··············································

Detailed process: View lab1 effect

Img compiled files can be used to load the

cd  /home/ucoreos/ucore_os_lab-master/labcodes_answer/lab1_result 

img make image file generated in labcodes_answer / lab1_result directory

make

Bin directory to see if the resulting image file generation

cd  bin  &&  ls
输出  bootblock  kernel  sign  ucore.img

There is ucore.img found, say ucore.img mount qemu virtual machine
to start the simulation of the real machine

qemu-system-x86_64    -hda ucore.img -parallel stdio  

Error lack qemu: could not load PC BIOS 'bios-256k.bin'

yum install seabios -y 

Simulate real machine failure

qemu-system-x86_64    -hda ucore.img -parallel stdio
(process:1165): GLib-WARNING **: 06:42:36.693: gmem.c:489: custom memory allocation vtable not supported
(qemu-system-x86_64:1165): Gtk-WARNING **: 06:42:36.716: cannot open display:

Graphics device can not connect, then we will disable the swap graphics display device, add parameters -nographic

Successfully simulate real machine

qemu-system-x86_64    -hda ucore.img -parallel stdio   -nographic

Here Insert Picture Description
Here Insert Picture Description
Here Insert Picture Description

Description operating system can be a normal start in a virtual machine, the output once per second 110000 ttiicckkss

But not normal termination

查询pid 
ps -a

Here Insert Picture Description

强行杀死虚拟机进程
kill 943 

也可以直接根据进程启动的名称来杀死  注意不要加  _64 否则命令无效
pkill  -9  qemu-system-x86
make clean 命令清除不必要文件。可以删除之前make 生成的文件
输出  rm -f -r obj bin
Published 76 original articles · won praise 2 · Views 5506

Guess you like

Origin blog.csdn.net/qq_43373608/article/details/104396726