diff --git a/os/Makefile b/os/Makefile index 4f559d97054f53213446e1d4a2155308bc84f1c2..b38c23a6773fbfe89554b61f09cad7404d163149 100644 --- a/os/Makefile +++ b/os/Makefile @@ -107,12 +107,17 @@ endif run-inner: build ifeq ($(BOARD),qemu) @qemu-system-riscv64 \ + -M 128m \ -machine virt \ - -nographic \ -bios $(BOOTLOADER) \ + -display none \ -device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA) \ -drive file=$(FS_IMG),if=none,format=raw,id=x0 \ - -device virtio-blk-device,drive=x0,bus=virtio-mmio-bus.0 \ + -device virtio-blk-device,drive=x0 \ + -device virtio-gpu-device \ + -device virtio-keyboard-device \ + -device virtio-mouse-device \ + -serial stdio else (which $(K210-BURNER)) || (cd .. && git clone https://github.com/sipeed/kflash.py.git && mv kflash.py tools) @cp $(BOOTLOADER) $(BOOTLOADER).copy diff --git a/os/run-nodisp.sh b/os/run-nodisp.sh new file mode 100755 index 0000000000000000000000000000000000000000..7f2a5bb4b9b31d1d1b850320ace934d66c5c8f1a --- /dev/null +++ b/os/run-nodisp.sh @@ -0,0 +1,10 @@ +qemu-system-riscv64 -M 128m -machine virt \ +-bios ../bootloader/rustsbi-qemu.bin \ +-display none \ +-device loader,file=target/riscv64gc-unknown-none-elf/release/os.bin,addr=0x80200000 \ +-drive file=../user/target/riscv64gc-unknown-none-elf/release/fs.img,if=none,format=raw,id=x0 \ +-device virtio-blk-device,drive=x0 \ +-device virtio-gpu-device \ +-device virtio-keyboard-device \ +-device virtio-mouse-device \ +-serial stdio