]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
vmspawn: add machine types for m68k/sparc64 and default to 'none' if unknown
authorLuca Boccassi <luca.boccassi@gmail.com>
Thu, 24 Jul 2025 13:13:11 +0000 (14:13 +0100)
committerLuca Boccassi <luca.boccassi@gmail.com>
Mon, 4 Aug 2025 14:56:37 +0000 (15:56 +0100)
Qemu has a 'none' machine that can be used for very basic booting
on weird arches, just default to that unless otherwise specified

(cherry picked from commit c1fb58cc4853319240f40ac3c9bbab49554abd1a)

src/vmspawn/vmspawn-util.h

index 784168cefc97672421749d9e561fe47ce77af60d..4d736d29770a258dc763a599cf4bda049bd40bac 100644 (file)
@@ -46,7 +46,7 @@
 
 #if defined(__x86_64__) || defined(__i386__)
 #  define QEMU_MACHINE_TYPE "q35"
-#elif defined(__arm__) || defined(__aarch64__) || defined(__riscv) || defined(__loongarch64)
+#elif defined(__arm__) || defined(__aarch64__) || defined(__riscv) || defined(__loongarch64) || defined(__m68k__)
 #  define QEMU_MACHINE_TYPE "virt"
 #elif defined(__s390__) || defined(__s390x__)
 #  define QEMU_MACHINE_TYPE "s390-ccw-virtio"
 #  define QEMU_MACHINE_TYPE "pseries"
 #elif defined(__mips__)
 #  define QEMU_MACHINE_TYPE "malta"
+#elif defined(__sparc__)
+#  define QEMU_MACHINE_TYPE "sun4u"
 #else
-#  error "No qemu machine defined for this architecture"
+#  define QEMU_MACHINE_TYPE "none"
 #endif
 
 typedef struct OvmfConfig {