diff options
-rw-r--r-- | docs/Makefile | 1 | ||||
-rw-r--r-- | pkg/machine/ignition_freebsd.go | 8 | ||||
-rw-r--r-- | pkg/machine/qemu/options_freebsd.go | 13 | ||||
-rw-r--r-- | pkg/machine/qemu/options_freebsd_amd64.go | 18 | ||||
-rw-r--r-- | pkg/util/utils_freebsd.go | 12 | ||||
-rw-r--r-- | pkg/util/utils_unsupported.go | 4 |
6 files changed, 54 insertions, 2 deletions
diff --git a/docs/Makefile b/docs/Makefile index c9192f5e6..4e982e27f 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -7,6 +7,7 @@ SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build SOURCEDIR = source BUILDDIR = build +RM ?= rm # Put it first so that "make" without argument is like "make help". help: diff --git a/pkg/machine/ignition_freebsd.go b/pkg/machine/ignition_freebsd.go new file mode 100644 index 000000000..ddea40782 --- /dev/null +++ b/pkg/machine/ignition_freebsd.go @@ -0,0 +1,8 @@ +//go:build freebsd +// +build freebsd + +package machine + +func getLocalTimeZone() (string, error) { + return "", nil +} 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{} +} diff --git a/pkg/util/utils_freebsd.go b/pkg/util/utils_freebsd.go new file mode 100644 index 000000000..17436ae81 --- /dev/null +++ b/pkg/util/utils_freebsd.go @@ -0,0 +1,12 @@ +//go:build freebsd +// +build freebsd + +package util + +import ( + "errors" +) + +func GetContainerPidInformationDescriptors() ([]string, error) { + return []string{}, errors.New("this function is not supported on freebsd") +} diff --git a/pkg/util/utils_unsupported.go b/pkg/util/utils_unsupported.go index 3a0f8646b..26fb7adf9 100644 --- a/pkg/util/utils_unsupported.go +++ b/pkg/util/utils_unsupported.go @@ -1,5 +1,5 @@ -//go:build darwin || windows -// +build darwin windows +//go:build darwin || windows || freebsd +// +build darwin windows freebsd package util |