diff mbox series

[isar-cip-core,v3,9/9] start-qemu: add support for swupdate on RISC-V

Message ID 20230302152659.2096307-10-felix.moessbauer@siemens.com (mailing list archive)
State Superseded
Headers show
Series Add swupdate support for riscv64 | expand

Commit Message

Felix Moessbauer March 2, 2023, 3:26 p.m. UTC
This patch adds support to run swupdate images for RISC-V64 on qemu. As
firmware, we use OpenSBI with u-boot payload in s-mode.

Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 start-qemu.sh | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

diff --git a/start-qemu.sh b/start-qemu.sh
index dd16aed..c4a8fe9 100755
--- a/start-qemu.sh
+++ b/start-qemu.sh
@@ -172,6 +172,14 @@  if [ -n "${SECURE_BOOT}${SWUPDATE_BOOT}" ]; then
 				-bios ${u_boot_bin} \
 				${QEMU_COMMON_OPTIONS} "$@"
 			;;
+		rv64|riscv64)
+			opensbi_bin=${FIRMWARE_BIN:-./build/tmp/deploy/images/qemu-${QEMU_ARCH}/fw_payload.bin}
+
+			${QEMU_PATH}${QEMU} \
+				-drive file=${IMAGE_PREFIX}.wic,discard=unmap,if=none,id=disk,format=raw \
+				-bios ${opensbi_bin} \
+				${QEMU_COMMON_OPTIONS} "$@"
+			;;
 		*)
 			echo "Unsupported architecture: ${arch}"
 			exit 1