Skip to content

Commit cb03b85

Browse files
committed
Update README for Docker image artifacts
Document how to fetch and run user-mode and system-mode artifacts from the rv32emu-prebuilt repository when using the Docker image. Link: https://github.com/sysprog21/rv32emu-prebuilt
1 parent 7601a48 commit cb03b85

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,40 @@ The usage and limitations of Doom and Quake demo are listed in [docs/demo.md](do
143143
### Docker image
144144
The image containing all the necessary tools for development and testing can be executed by `docker run -it sysprog21/rv32emu:latest`. It works for both x86-64 and aarch64 (e.g., Apple's M1 chip) machines.
145145
146+
To keep the Docker image minimal, executables and prebuilt images are not embedded. Follow the steps below to fetch the required artifacts.
147+
148+
##### User-Mode
149+
Fetch and extract the latest prebuilt user-mode ELF artifacts:
150+
```shell
151+
$ wget $(wget -qO- 'https://api.github.com/repos/sysprog21/rv32emu-prebuilt/releases?per_page=100' \
152+
| grep browser_download_url | grep ELF | head -n 1 | cut -d '"' -f4)
153+
154+
$ tar -xzvf rv32emu-prebuilt.tar.gz
155+
```
156+
To run `rv32emu-user`, consider the following examples:
157+
```shell
158+
# Run a local ELF program
159+
build/rv32emu-user build/hello.elf
160+
161+
# Run a prebuilt user-mode program (e.g., pi)
162+
build/rv32emu-user rv32emu-prebuilt/riscv32/pi
163+
```
164+
165+
##### System-Mode
166+
Fetch and extract the latest prebuilt system-mode Linux image artifacts:
167+
```shell
168+
$ wget $(wget -qO- 'https://api.github.com/repos/sysprog21/rv32emu-prebuilt/releases?per_page=100' \
169+
| grep browser_download_url | grep Linux-Image | head -n 1 | cut -d '"' -f4)
170+
171+
$ tar -xzvf rv32emu-linux-image-prebuilt.tar.gz
172+
```
173+
To run `rv32emu-system`, use the following:
174+
```shell
175+
$ build/rv32emu-system \
176+
-k rv32emu-linux-image-prebuilt/linux-image/Image \
177+
-i rv32emu-linux-image-prebuilt/linux-image/rootfs.cpio
178+
```
179+
146180
### Customization
147181
`rv32emu` is configurable, and you can override the below variable(s) to fit your expectations:
148182
* `ENABLE_RV32E`: RV32E Base Integer Instruction Set

0 commit comments

Comments
 (0)