@@ -48,28 +48,34 @@ PATCHES_DIR := ./patches
48
48
include $(OSF_BUILDER_DIR ) /Makefile.inc
49
49
OUT ?= build/$(PLATFORM ) /osf-$(PLATFORM ) .rom
50
50
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 :=
66
55
endif
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
69
69
endif
70
70
ifeq ($(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
72
77
endif
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
75
81
endif
0 commit comments