From e6241de15a2aa04efc99769d768849240eaffea5 Mon Sep 17 00:00:00 2001 From: Zheng Junjie Date: Tue, 19 Mar 2024 23:18:40 +0800 Subject: vm: add arguments to use virt machine type for qemu-riscv64. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/system/vm.scm (system-qemu-image/shared-store-script): When target riscv64, add arguments to set qemu virt machine type. Change-Id: I974c82fdd2d5bfc01caff9e6411db38e472b5cd4 Signed-off-by: Ludovic Courtès --- gnu/system/vm.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu') diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index d4044a4a39..64cc321ebf 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -295,6 +295,10 @@ useful when FULL-BOOT? is true." "-initrd" #$(file-append os "/initrd") (format #f "-append ~s" (string-join #$kernel-arguments " ")))) + ;; Default qemu-riscv64 have not PCI, virt have it, so we set it. + #$@(if (target-riscv64? (or target system)) + #~("-M" "virt") + #~()) #$@(common-qemu-options (if volatile? base-image rw-image) (map file-system-mapping-source (cons %store-mapping mappings)) -- cgit v1.2.3