diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-03-30 00:37:36 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-30 00:37:36 +0000 |
commit | 4fe1ce154f364932129fb6d53c9dbe5b374ed38d (patch) | |
tree | c0481ca3d8e88535ef2a12463cd73bda722a5a50 /pkg/machine/qemu/options_linux_arm64.go | |
parent | b9e064ab84044f3db25e48384a1bd6fe5dc6ecdc (diff) | |
parent | 870beaf137d6afb674bbd1743eaa8a761dd54511 (diff) | |
download | podman-4fe1ce154f364932129fb6d53c9dbe5b374ed38d.tar.gz podman-4fe1ce154f364932129fb6d53c9dbe5b374ed38d.tar.bz2 podman-4fe1ce154f364932129fb6d53c9dbe5b374ed38d.zip |
Merge pull request #9846 from afbjorklund/qemu-arm64
[NO TESTS NEEDED] Add machine support for qemu-system-aarch64 on linux
Diffstat (limited to 'pkg/machine/qemu/options_linux_arm64.go')
-rw-r--r-- | pkg/machine/qemu/options_linux_arm64.go | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/pkg/machine/qemu/options_linux_arm64.go b/pkg/machine/qemu/options_linux_arm64.go new file mode 100644 index 000000000..948117653 --- /dev/null +++ b/pkg/machine/qemu/options_linux_arm64.go @@ -0,0 +1,41 @@ +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 +} |