From 8a355c5a35a7205574621bf94c1a37418b1e9d36 Mon Sep 17 00:00:00 2001 From: Coelacanthus Date: Sun, 29 May 2022 00:33:01 +0800 Subject: [PATCH] feat: add startqemu script to test qemu img Signed-off-by: Coelacanthus --- startqemu.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 startqemu.sh diff --git a/startqemu.sh b/startqemu.sh new file mode 100755 index 0000000..7f2ed9e --- /dev/null +++ b/startqemu.sh @@ -0,0 +1,20 @@ +#!/usr/bin/bash +# +# SPDX-License-Identifier: GPL-3.0-or-later + +# shellcheck disable=1091 +. /usr/share/makepkg/util.sh +colorize + +msg "Starting qemu" +qemu-system-riscv64 \ + -nographic \ + -machine virt \ + -smp 8 \ + -m 4G \ + -bios ./opensbi/build/platform/generic/firmware/fw_payload.bin \ + -device virtio-blk-device,drive=hd0 \ + -object rng-random,filename=/dev/urandom,id=rng0 \ + -device virtio-rng-device,rng=rng0 \ + -drive file=archriscv-$(date --rfc-3339=date).qcow2,format=qcow2,id=hd0 \ + -monitor unix:/tmp/qemu-monitor,server,nowait