Files
podman/pkg/machine/qemu/options_linux_arm64.go
Anders F Björklund 870beaf137 Add machine support for qemu-system-aarch64
- Build machine also for podman-linux-arm64

- Add default machine type for linux arm64

- Add the required qemu-uefi bios parameter

- Remove hardcoded outdated path and show url

Signed-off-by: Anders F Björklund <anders.f.bjorklund@gmail.com>
2021-03-29 21:53:48 +02:00

42 lines
672 B
Go

package qemu
import (
"os"
"path/filepath"
)
var (
QemuCommand = "qemu-system-aarch64"
)
func (v *MachineVM) addArchOptions() []string {
opts := []string{
"-accel", "kvm",
"-cpu", "host",
"-M", "virt,gic-version=max",
"-bios", getQemuUefiFile("QEMU_EFI.fd"),
}
return opts
}
func (v *MachineVM) prepare() error {
return nil
}
func (v *MachineVM) archRemovalFiles() []string {
return []string{}
}
func getQemuUefiFile(name string) string {
dirs := []string{
"/usr/share/qemu-efi-aarch64",
"/usr/share/edk2/aarch64",
}
for _, dir := range dirs {
if _, err := os.Stat(dir); err == nil {
return filepath.Join(dir, name)
}
}
return name
}