Skip to content

Commit 21f8514

Browse files
Enable hardware acceleration
This will speed up the build process. Multiple accelerators are added and QEMU will automatically pick the one it can use.
1 parent b07500c commit 21f8514

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

netbsd.pkr.hcl

+4-1
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ source "qemu" "qemu" {
158158
headless = var.headless
159159
use_default_display = var.use_default_display
160160
display = var.display
161-
accelerator = var.accelerator
161+
accelerator = "none"
162162
qemu_binary = "qemu-system-${var.architecture.qemu}"
163163
firmware = var.firmware
164164

@@ -276,6 +276,9 @@ source "qemu" "qemu" {
276276
["-cpu", var.cpu_type],
277277
["-boot", "strict=off"],
278278
["-monitor", "none"],
279+
["-accel", "hvf"],
280+
["-accel", "kvm"],
281+
["-accel", "tcg"],
279282
["-device", "virtio-scsi-pci"],
280283
["-device", "scsi-hd,drive=drive0,bootindex=0"],
281284
["-device", "scsi-cd,drive=drive1,bootindex=1"],

var_files/arm64.pkrvars.hcl

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
machine_type = "virt"
1+
machine_type = "virt,highmem=off" // highmem=off if reqiured for enabling hardware acceleration on Apple Silicon
22
cpu_type = "cortex-a57"
33
firmware = "edk2-aarch64-code.fd"
44
post_install_disk_device = "/dev/dk1"
5+
memory = 3072 // max memory when hardware acceleration on Apple Silicon is enabled
56

67
architecture = {
78
name = "arm64"

0 commit comments

Comments
 (0)