QEMUとRISC-V
from QEMU
QEMUでRISC-Vベアメタルプログラミング(ヨロシク編)
参考
Quick Start — QEMU documentation
RISC-V System emulator — QEMU documentation
Hello, RISC-V and QEMU
GDBとの繋ぎかたが参考になった
https://yuyubu.hatenablog.com/entry/2018/07/17/QEMUにGDBを繋げてhariboteOSをデバッグする方法
QEMUとGDBの繋げかたの参考になりそう
https://github.com/tomoyuki-nakabayashi/rvos-rs/issues/3
QEMU + Virt + RISC-VでUARTへ出力してる
QEMUの起動オプションなんかも参考になるかも
qemu-system-riscv32 --machine help
$ qemu-system-riscv32 --machine help
Supported machines are:
none empty machine
opentitan RISC-V Board compatible with OpenTitan
sifive_e RISC-V Board compatible with SiFive E SDK
sifive_u RISC-V Board compatible with SiFive U SDK
spike RISC-V Spike board (default)
virt RISC-V VirtIO board
‘virt’ Generic Virtual Platform (virt) — QEMU documentation
Boot options
-kernel
The virt machine can start using the standard -kernel functionality for loading a Linux kernel
-bios
a VxWorks kernel, an S-mode U-Boot bootloader with the default OpenSBI firmware image as the -bios.
Running U-Boot
$ qemu-system-riscv64 -M virt -smp 4 -m 2G -display none -serial stdio -kernel /path/to/u-boot.bin