Skip to content

Commit

Permalink
Implement virtio-blk backed by disk image
Browse files Browse the repository at this point in the history
  • Loading branch information
ray90514 committed Jun 21, 2022
1 parent e94000e commit 57f9785
Show file tree
Hide file tree
Showing 14 changed files with 1,001 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else
VECHO = @printf
endif

OBJS := vm.o serial.o main.o pci.o
OBJS := vm.o serial.o main.o pci.o virtio-pci.o virtq.o virtio-blk.o disk-image.o
OBJS := $(addprefix $(OUT)/,$(OBJS))
deps := $(OBJS:%.o=%.o.d)

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@ make check
## Usage

```
build/kvm-host -k bzImage [-i initrd]
build/kvm-host -k bzImage [-i initrd] [-d disk-image]
```

`bzImage` is the path to linux kernel bzImage. The bzImage file is in a specific format,
containing concatenated `bootsect.o + setup.o + misc.o + piggy.o`. `initrd` is the path to
initial RAM disk image, which is an optional argument.
`disk-image` is the path to ext4 disk image. The disk image is as a block device with virtio-blk in Guest Linux.

## License

Expand Down

0 comments on commit 57f9785

Please sign in to comment.