Skip to content

Commit

Permalink
neonvm-runner: add linaro firmware for arm
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Sakhnov <[email protected]>
  • Loading branch information
mikhail-sakhnov committed Nov 26, 2024
1 parent 59ccc89 commit 9915c3b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions neonvm-runner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,11 @@ RUN apk add --no-cache \
cgroup-tools \
openssh


COPY --from=builder /runner /usr/bin/runner
COPY neonvm-kernel/vmlinuz /vm/kernel/vmlinuz
COPY neonvm-runner/ssh_config /etc/ssh/ssh_config
# QEMU_EFI used only by runner running on the arm architecture
RUN wget https://releases.linaro.org/components/kernel/uefi-linaro/16.02/release/qemu64/QEMU_EFI.fd -O /vm/QEMU_EFI.fd

ENTRYPOINT ["/sbin/tini", "--", "runner"]
9 changes: 9 additions & 0 deletions neonvm-runner/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,10 @@ func buildQEMUCmd(
qemuCmd = append(qemuCmd, "-drive", fmt.Sprintf("id=%s,file=%s,if=virtio,media=disk,%s,discard=unmap", swapName, dPath, cfg.diskCacheSettings))
}

if cfg.architecture == architectureArm64 {
qemuCmd = append(qemuCmd, "-bios", "/vm/QEMU_EFI_ARM.fd")
}

for _, disk := range vmSpec.Disks {
switch {
case disk.EmptyDisk != nil:
Expand Down Expand Up @@ -1015,6 +1019,11 @@ func makeKernelCmdline(cfg *Config, vmSpec *vmv1.VirtualMachineSpec, vmStatus *v
cmdlineParts = append(cmdlineParts, fmt.Sprintf("maxcpus=%d", vmSpec.Guest.CPUs.Min.RoundedUp()))
}

if cfg.architecture == architectureArm64 {
// explicitly enable acpi if we run on arm
cmdlineParts = append(cmdlineParts, "acpi=on")
}

return strings.Join(cmdlineParts, " ")
}

Expand Down

0 comments on commit 9915c3b

Please sign in to comment.