virtio-blk worked.

This commit is contained in:
Yifan Wu 2020-12-16 10:18:38 +08:00
parent 2d34cab989
commit eca5ee2eb7
12 changed files with 145 additions and 11 deletions

View file

@ -50,7 +50,9 @@ ifeq ($(BOARD),qemu)
-machine virt \
-nographic \
-bios $(BOOTLOADER) \
-device loader,file=$(KERNEL_BIN),addr=$(KERNEL_ENTRY_PA)
-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
else
@cp $(BOOTLOADER) $(BOOTLOADER).copy
@dd if=$(KERNEL_BIN) of=$(BOOTLOADER).copy bs=128K seek=1