From 3f7e17e721fca382710c88e5e788d36911fb40ca Mon Sep 17 00:00:00 2001 From: Ian Eyberg Date: Fri, 24 Dec 2021 14:09:04 -0800 Subject: [PATCH] un-stub kernel in local ops run/build for arm64 (#1216) Co-authored-by: Ian Eyberg --- qemu/qemu_unix.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/qemu/qemu_unix.go b/qemu/qemu_unix.go index 6a60e3e5..c7ac45a9 100644 --- a/qemu/qemu_unix.go +++ b/qemu/qemu_unix.go @@ -9,6 +9,7 @@ import ( "os" "os/exec" "os/signal" + "path" "path/filepath" "regexp" "runtime" @@ -18,6 +19,7 @@ import ( "golang.org/x/sys/unix" + api "github.com/nanovms/ops/lepton" "github.com/nanovms/ops/log" "github.com/nanovms/ops/types" ) @@ -332,7 +334,10 @@ func (q *qemu) setConfig(rconfig *types.RunConfig) { q.addOption("-machine", "gic-version=2") q.addOption("-machine", "highmem=off") - q.addOption("-kernel", "./kernel.img") + + kernel := path.Join(api.GetOpsHome(), api.LocalReleaseVersion, "kernel.img") + + q.addOption("-kernel", kernel) q.addOption("-device", "virtio-blk-pci,drive=hd0")