launch: board model for RISC-V
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Thu, 19 Aug 2021 14:28:33 +0000 (16:28 +0200)
committerHilko Bengen <bengen@debian.org>
Mon, 20 Sep 2021 20:58:15 +0000 (21:58 +0100)
On RISC-V there is no default machine type. Invoking QEMU requires to
specify a board model with the -M option. So let's define MACHINE_TYPE
as virt.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Gbp-Pq: Name 0022-launch-board-model-for-RISC-V.patch

lib/guestfs-internal.h

index ea3924a0ccec8973fd801c4fac970734eeb6e36c..5003d8a207ea9fdb01cda3cb959de805193a02eb 100644 (file)
@@ -148,6 +148,9 @@ guestfs_int_cleanup_gl_recursive_lock_unlock (void *ptr)
 #ifdef __powerpc__
 #define MACHINE_TYPE "pseries"
 #endif
+#ifdef __riscv
+#define MACHINE_TYPE "virt"
+#endif
 
 /* Differences in qemu device names on ARMv7 (virtio-mmio), s/390x
  * (CCW) vs normal hardware with PCI.