Skip to content

Commit c2942ee

Browse files
committed
Update README
To reflect the integration of simplefs. simplefs: https://github.com/sysprog21/simplefs
1 parent 2c5fb11 commit c2942ee

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,19 @@ $ build/rv32emu -k <kernel_img_path> -i <rootfs_img_path> -x vblk:disk.img -x vb
111111
```
112112
Note that the /dev/vdx device order in guestOS is assigned in reverse: the first `-x vblk` argument corresponds to the device with the highest letter, while subsequent arguments receive lower-lettered device names.
113113
114+
In addition to the built-in ext4 filesystem support, other filesystems such as [simplefs](https://github.com/sysprog21/simplefs) is also supported. To use simplefs, first follow the instructions [here](https://github.com/sysprog21/simplefs?tab=readme-ov-file#build-and-run) to generate the simplefs disk image, and then attach it to the guestOS via the virtio block device. Another ext4 image containing `simplefs.ko` must also be attached to the guestOS, since `simplefs.ko` is not built into the Linux kernel by default. The pre-built `simplefs.ko` can be found at `build/linux-image/` (run `make artifact ENABLE_SYSTEM=1` to get the artifacts).
115+
```shell
116+
$ build/rv32emu -k <kernel_img_path> -i <rootfs_img_path> -x vblk:<ext4_disk_img_path> -x vblk:<simplefs_disk_img_path>
117+
```
118+
Once the guestOS is booted, insert the `simplefs.ko` kernel module. After loading the module, the simplefs disk will be recognized by the Linux kernel and can be mounted and used as a regular filesystem.
119+
```shell
120+
# mkdir -p mnt && mount /dev/vdb mnt # mount the ext4 disk that contains simplefs.ko
121+
122+
# insmod mnt/simplefs.ko # insert simplefs.ko
123+
124+
# mkdir -p simplefs && mount -t simplefs /dev/vda simplefs # mount the simplefs disk
125+
```
126+
114127
#### Customize bootargs
115128
Build and run with customized bootargs to boot the guestOS. Otherwise, the default bootargs defined in `src/devices/minimal.dts` will be used.
116129
```shell

0 commit comments

Comments
 (0)