riscv-qemu: add VirtIO RNG device

This implements machine.GetRNG() using VirtIO. This gets the tests to
pass for crypto/md5 and crypto/sha1 that use crypto/rand in their tests.
This commit is contained in:
Ayke van Laethem
2025-03-10 11:34:29 +01:00
committed by Ron Evans
parent 7f970a45c2
commit cab3834bc9
6 changed files with 193 additions and 7 deletions
+1 -1
View File
@@ -4,5 +4,5 @@
"build-tags": ["virt", "qemu"],
"default-stack-size": 4096,
"linkerscript": "targets/riscv-qemu.ld",
"emulator": "qemu-system-riscv32 -machine virt -nographic -bios none -kernel {}"
"emulator": "qemu-system-riscv32 -machine virt -nographic -bios none -device virtio-rng-device -kernel {}"
}