@@ -48,28 +48,34 @@ PATCHES_DIR := ./patches
4848include $(OSF_BUILDER_DIR ) /Makefile.inc
4949OUT ?= build/$(PLATFORM ) /osf-$(PLATFORM ) .rom
5050
51- run :
52- ifeq ($(ARCH ) , amd64)
53- sudo qemu-system-$(ARCH) \
54- `# the machine type specified in the coreboot mainboard configuration` \
55- -M q35 \
56- `# use KVM to avail of hardware virtualization extensions` \
57- -enable-kvm \
58- `# the coreboot ROM to run as system firmware` \
59- -bios $(OUT) \
60- `# the amount of RAM in MB` \
61- -m 1024 \
62- `# RNG to avoid DHCP lockups when waiting for entropy` \
63- -object rng-random,filename=/dev/urandom,id=rng0 \
64- `# redirect all the output to the console` \
65- -nographic
51+ ifeq ($(CROSS_COMPILING ) , 0)
52+ QEMU_KVM_OPTS := -enable-kvm
53+ else
54+ QEMU_KVM_OPTS :=
6655endif
67- ifeq ($(ARCH ) , ppc64)
68- qemu-system-$(ARCH) -M pseries,accel=kvm,kvm-type=HV -nographic -bios $(OUT)
56+
57+ # RNG to avoid DHCP lockups when waiting for entropy
58+ # redirect all the output to the console
59+ QEMU_COMMON_OPTS := -bios $(OUT ) $(QEMU_KVM_OPTS ) \
60+ -m 1024 \
61+ -object rng-random,filename=/dev/urandom,id=rng0 \
62+ -nographic
63+
64+ run :
65+ ifeq ($(ARCH ) , aarch64)
66+ $(QEMU_SYSTEM) $(QEMU_COMMON_OPTS) \
67+ -M virt,secure=on,virtualization=on \
68+ -cpu cortex-a53
6969endif
7070ifeq ($(ARCH ) , ppc64le)
71- qemu-system-$(ARCH) -M pseries,accel=kvm,kvm-type=HV -nographic -bios $(OUT)
71+ $(QEMU_SYSTEM) $(QEMU_COMMON_OPTS) \
72+ -M powernv,hb-mode=on \
73+ -cpu power9 \
74+ -drive file=build/coreboot.rom,if=mtd \
75+ -serial stdio \
76+ -display none
7277endif
73- ifeq ($(ARCH ) , ppc64le)
74- qemu-system-$(ARCH) -M pseries,accel=kvm,kvm-type=HV -nographic -bios $(OUT)
78+ ifeq ($(ARCH ) , x86_64)
79+ $(QEMU_SYSTEM) $(QEMU_COMMON_OPTS) \
80+ -M q35
7581endif
0 commit comments