Skip to content

Commit

Permalink
build-vm-kvm: add support for riscv64 (#946)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas-schwab authored Aug 8, 2023
1 parent c0438c6 commit 789e141
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions build-vm-kvm
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,19 @@ vm_verify_options_kvm() {
# from qemu-microvm, minified and hardened PC bios (slightly faster than seabios)
test -e /usr/share/qemu/qboot.rom && kvm_options="$kvm_options -bios /usr/share/qemu/qboot.rom"
;;
riscv64)
kvm_bin="/usr/bin/qemu-system-riscv64"
kvm_options="-M virt,accel=kvm"
kvm_cpu="-cpu rv64,sv48=on"
vm_kernel=/boot/Image
vm_initrd=/boot/initrd
test -e /boot/kernel.obs.guest && vm_kernel=/boot/kernel.obs.guest
test -e /boot/initrd.obs.guest && vm_initrd=/boot/initrd.obs.guest
kvm_device=virtio-blk-device
kvm_serial_device=virtio-serial-device,max_ports=2
kvm_console=hvc0
kvm_rng_device=virtio-rng-device
;;
esac

# check if we can run kvm
Expand Down

0 comments on commit 789e141

Please sign in to comment.