rcore-os / rCore

Rust version of THU uCore OS. Linux compatible.
MIT License
3.43k stars 369 forks source link

Hypervisor support using RVM #68

Closed equation314 closed 3 years ago

equation314 commented 3 years ago

Now can run uCore in rCore.

How to run

Make sure you are on Linux and KVM is enabled.

Clone rCore recursively with rcore-user, rcore-vmm and ucore_os_lab:

$ git clone https://github.com/rcore-os/rCore.git --recursive

Build rcore-user with EN_VMM=y:

$ cd rCore/user
$ make sfsimg ARCH=x86_64 EN_VMM=y

Build and run rCore with HYPERVISOR=on:

$ cd ../kernel
$ make run mode=release ARCH=x86_64 HYPERVISOR=on

Run the vmm app in rCore shell:

Hello world! from CPU 0!
/ # cd vmm
/vmm # ./vmm
rvm fd = 3
vmid = 1
UCORE_BIOS_ENTRY = 0x9000
[INFO] success to map ucore.img to ide base:disk = 0:0
[INFO] success to add empty disk 134217728 bytes, base:disk = 0:1
[INFO] success to map sfs.img to ide base:disk = 1:0
vcpu_id = 1

(THU.CST) os is loading ...

Now uCore is booting and your can get uCore's shell soon.