arch

package
v0.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupportedArch = fmt.Errorf("unsupported architecture: %s", runtime.GOARCH)

Functions

func AppendArchSpecificQemuArgs

func AppendArchSpecificQemuArgs(qemuArgs []string) []string

AppendArchSpecificQemuArgs appends Qemu arguments to the input that are specific to the architecture lvh is running on. For example on ARM64, Qemu needs some precision on the -machine option to start.

func AppendCPUKind

func AppendCPUKind(qemuArgs []string, kvmEnabled bool, cpuKind string) []string

AppendCPUKind appends the -cpu type if needed, historically amd64 has used no specific kind when running without KVM, and using kvm64 when running with KVM. However, arm64 needs -cpu max in both cases to start properly.

func Bootable

func Bootable(bootable *bool) bool

Bootable returns the arch-dependent default value in case the pointer is nil, so option is unconfigured. Typically arm64 should not be bootable by default because we didn't take the time to find a bootloader that was arm64 compatible so far.

func Console

func Console() (string, error)

Console returns the name of the device for the first serial port.

func CrossCompileMakeArgs

func CrossCompileMakeArgs(targetArch string) ([]string, error)

func CrossCompiling

func CrossCompiling(targetArch string) bool

func QemuBinary

func QemuBinary() (string, error)

func Target

func Target(arch string) (string, error)

Target returns the Linux Makefile target to build the kernel, for historical reasons, those are different between architectures.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL