LinuxCommandLibrary

qemu-system-riscv64

TLDR

Boot RISC-V system

$ qemu-system-riscv64 -machine virt -kernel [kernel] -append "root=/dev/vda"
copy
Boot with OpenSBI
$ qemu-system-riscv64 -machine virt -bios [opensbi.bin] -kernel [kernel]
copy
Boot with disk
$ qemu-system-riscv64 -machine virt -m [2G] -drive file=[disk.img],format=raw
copy

SYNOPSIS

qemu-system-riscv64 [options]

DESCRIPTION

qemu-system-riscv64 emulates 64-bit RISC-V systems. Supports virt and SiFive machine types. Used for RISC-V development and testing without physical hardware.

PARAMETERS

-machine type

Machine type (virt, sifive_u).
-kernel file
Kernel image.
-bios file
BIOS/firmware image.
-m size
RAM size.
-append args
Kernel command line.
-drive options
Drive configuration.

SEE ALSO

Copied to clipboard