summaryrefslogtreecommitdiff
path: root/pkg/machine/qemu
diff options
context:
space:
mode:
authorDoug Rabson <dfr@rabson.org>2022-05-08 12:56:59 +0100
committerDoug Rabson <dfr@rabson.org>2022-08-13 07:53:34 +0100
commit5ee3522f56f2c87db7b65e3843b6452d98bb4663 (patch)
treef7b3b7d97d33ba0041bea8965803322ef6c2f519 /pkg/machine/qemu
parentb806e9f360c5a502c59f51d6ea43ce990a577e5e (diff)
downloadpodman-5ee3522f56f2c87db7b65e3843b6452d98bb4663.tar.gz
podman-5ee3522f56f2c87db7b65e3843b6452d98bb4663.tar.bz2
podman-5ee3522f56f2c87db7b65e3843b6452d98bb4663.zip
pkg: Build pkg/machine on FreeBSD
Add missing symbols for freebsd and freebsd/amd64. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson <dfr@rabson.org>
Diffstat (limited to 'pkg/machine/qemu')
-rw-r--r--pkg/machine/qemu/options_freebsd.go13
-rw-r--r--pkg/machine/qemu/options_freebsd_amd64.go18
2 files changed, 31 insertions, 0 deletions
diff --git a/pkg/machine/qemu/options_freebsd.go b/pkg/machine/qemu/options_freebsd.go
new file mode 100644
index 000000000..124358db8
--- /dev/null
+++ b/pkg/machine/qemu/options_freebsd.go
@@ -0,0 +1,13 @@
+package qemu
+
+import (
+ "os"
+)
+
+func getRuntimeDir() (string, error) {
+ tmpDir, ok := os.LookupEnv("TMPDIR")
+ if !ok {
+ tmpDir = "/tmp"
+ }
+ return tmpDir, nil
+}
diff --git a/pkg/machine/qemu/options_freebsd_amd64.go b/pkg/machine/qemu/options_freebsd_amd64.go
new file mode 100644
index 000000000..ff8d10db1
--- /dev/null
+++ b/pkg/machine/qemu/options_freebsd_amd64.go
@@ -0,0 +1,18 @@
+package qemu
+
+var (
+ QemuCommand = "qemu-system-x86_64"
+)
+
+func (v *MachineVM) addArchOptions() []string {
+ opts := []string{"-machine", "q35,accel=hvf:tcg", "-cpu", "host"}
+ return opts
+}
+
+func (v *MachineVM) prepare() error {
+ return nil
+}
+
+func (v *MachineVM) archRemovalFiles() []string {
+ return []string{}
+}