From 0dc7c381f3f185fd5d7d60a76f0261b98ef99440 Mon Sep 17 00:00:00 2001 From: Vincent Ollivier Date: Thu, 11 Aug 2022 08:44:07 +0200 Subject: [PATCH] Improve QEMU options (#384) * Add kvm acceleration * Ignore signal with serial * Remove disk warnings * Remove audio warnings --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e3643eb..a258699 100644 --- a/Makefile +++ b/Makefile @@ -43,9 +43,16 @@ image: $(img) cargo bootimage --no-default-features --features $(output) --release --bin moros dd conv=notrunc if=$(bin) of=$(img) -opts = -m 32 -cpu max -nic model=$(nic) -hda $(img) -soundhw pcspk +opts = -m 32 -nic model=$(nic) -drive file=$(img),format=raw \ + -audiodev driver=sdl,id=a0 -machine pcspk-audiodev=a0 +ifeq ($(kvm),true) + opts += -cpu host -accel kvm +else + opts += -cpu max +endif + ifeq ($(output),serial) - opts += -display none -serial stdio + opts += -display none -chardev stdio,id=s0,signal=off -serial chardev:s0 endif qemu: