Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(README): add 64-bit RISC-V QEMU instructions #345

Merged
merged 1 commit into from
May 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,33 @@ qemu-system-aarch64 \
-device guest-loader,addr=0x48000000,initrd=<APP>
```

### 64-bit RISC-V

For 64-bit RISC-V, we need a recent version of [OpenSBI].
To download the release asset with [GitHub CLI] and extract the correct binary, run:

```bash
gh release download v1.4 --repo riscv-software-src/opensbi --pattern 'opensbi-*-rv-bin.tar.xz'
tar -xvf opensbi-*-rv-bin.tar.xz opensbi-1.4-rv-bin/share/opensbi/lp64/generic/firmware/fw_jump.bin
```

[OpenSBI]: https://github.com/riscv-software-src/opensbi
[GitHub CLI]: https://cli.github.com/

The QEMU base command is as follows:

```bash
qemu-system-riscv64 \
-machine virt \
-cpu rv64 \
-smp 1 \
-m 128M \
-display none -serial stdio \
-bios opensbi-1.4-rv-bin/share/opensbi/lp64/generic/firmware/fw_jump.bin
-kernel <LOADER>
-initrd <APP>
```

### Debugging

You can use QEMU to debug the loaded Hermit images:
Expand Down