parch-riscv/startqemu.sh
Coelacanthus 40fc627098
chore: add LICENSE file and copyright comment
Signed-off-by: Coelacanthus <coelacanthus@outlook.com>
2022-07-27 15:58:27 +08:00

21 lines
637 B
Bash
Executable file

#!/usr/bin/bash
#
# SPDX-FileCopyrightText: 2022 Celeste Liu <coelacanthus@outlook.com>
# 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