Skip to content

Commit 6fe157a

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 29fbb87 commit 6fe157a

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
@@ -163,7 +163,7 @@ source "qemu" "qemu" {
163163
headless = var.headless
164164
use_default_display = var.use_default_display
165165
display = var.display
166-
accelerator = var.accelerator
166+
accelerator = "none"
167167
qemu_binary = "qemu-system-${var.architecture.qemu}"
168168
firmware = var.firmware
169169

@@ -286,6 +286,9 @@ source "qemu" "qemu" {
286286
["-cpu", var.cpu_type],
287287
["-boot", "strict=off"],
288288
["-monitor", "none"],
289+
["-accel", "hvf"],
290+
["-accel", "kvm"],
291+
["-accel", "tcg"],
289292
["-device", "virtio-scsi-pci"],
290293
["-device", "scsi-hd,drive=drive0,bootindex=0"],
291294
["-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)