Skip to content

Commit

Permalink
Makefile: handle variable QEMU settings in .qemu_config
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Wieczorkiewicz <[email protected]>
  • Loading branch information
wipawel committed Nov 21, 2023
1 parent 945bdd0 commit 93893ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .qemu_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
QEMU_RAM=128
QEMU_CPUS=2
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,17 @@ endif # USE_KVM
endif # SYSTEM == LINUX

# Set qemu parameters
QEMU_CONFIG := $(KTF_ROOT)/.qemu_config
include $(QEMU_CONFIG)

ifeq ($(SYSTEM)$(HAVE_KVM),LINUXkvm)
QEMU_PARAMS := -cpu host -enable-kvm
else
QEMU_PARAMS := -cpu max
endif
QEMU_PARAMS += -m 128
QEMU_PARAMS += -m $(QEMU_RAM)
QEMU_PARAMS += -serial stdio
QEMU_PARAMS += -smp cpus=2
QEMU_PARAMS += -smp cpus=$(QEMU_CPUS)
QEMU_PARAMS_NOGFX := -display none -vga none -vnc none
QEMU_PARAMS_GFX := $(QEMU_PARAMS)
QEMU_PARAMS += $(QEMU_PARAMS_NOGFX)
Expand Down

0 comments on commit 93893ad

Please sign in to comment.