Bootstrap OpenBSD/riscv64 with Qemu on Linux

Bootstrap OpenBSD/riscv64 with Qemu on Linux

April 3, 2024
OpenBSD, KVM, BSD, Linux

OpenBSD supported riscv64 since the 7.0 release, but officially supported hardwares are still not easy to obtain. To have some fun with OpenBSD/riscv64 without access to such hardware, and to potentially bring up other hardware platforms by extending kernel supports, we can run a Qemu virtual machine on a common x86 system. What’s documented here is done on a X86_64 Debian host, but any system with sufficiently new Qemu available should work.

Obtaining Installation Media #

Prepare VM environment #

Install OpenBSD/riscv64 #

Pull Source Tree and Compile Kernel #