readme: add a note about using virtiofs as rootfs.

This is convenient for development.

BUG=None
TEST=None

Change-Id: I2ee06d70a7e47ea1c4de0e9cb54d382cb8b050d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2460862
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Dylan Reid <dgreid@chromium.org>
Commit-Queue: Lepton Wu <lepton@chromium.org>
Tested-by: Lepton Wu <lepton@chromium.org>
Auto-Submit: Lepton Wu <lepton@chromium.org>
This commit is contained in:
Lepton Wu 2020-10-08 10:05:52 -07:00 committed by Commit Bot
parent 32f4c4cfdd
commit 2c5dd1b018

View file

@ -89,6 +89,8 @@ build directory in the case of x86 at `arch/x86/boot/compressed/vmlinux`.
### Rootfs ### Rootfs
#### With a disk image
In most cases, you will want to give the VM a virtual block device to use as a In most cases, you will want to give the VM a virtual block device to use as a
root file system: root file system:
@ -113,6 +115,16 @@ crosvm run --rwdisk "${ROOT_IMAGE}" -p "root=/dev/vda" vmlinux
>**NOTE:** If more disks arguments are added prior to the desired rootfs image, >**NOTE:** If more disks arguments are added prior to the desired rootfs image,
the `root=/dev/vda` must be adjusted to the appropriate letter. the `root=/dev/vda` must be adjusted to the appropriate letter.
#### With virtiofs
Linux kernel 5.4+ is required for using virtiofs. This is convenient for testing.
The file system must be named "mtd*" or "ubi*".
```bash
crosvm run --shared-dir "/:mtdfake:type=fs:cache=always" \
-p "rootfstype=virtiofs root=mtdfake" vmlinux
```
### Control Socket ### Control Socket
If the control socket was enabled with `-s`, the main process can be controlled If the control socket was enabled with `-s`, the main process can be controlled