Documentation ¶
Index ¶
Constants ¶
const OVMFDebugFirmware = "OVMF_CODE.4MB.debug.fd"
OVMFDebugFirmware is the debug version of the "preferred" firmware.
Variables ¶
This section is empty.
Functions ¶
func GetAchitectureFirmwareVarsCandidates ¶
GetAchitectureFirmwareVarsCandidates returns a unique list of candidate vars names for hostArch for all usages. It does not check whether the associated firmware files are present on the host now. This can be used to check for the existence of previously used firmware vars files in an existing VM instance.
func GetenvEdk2Paths ¶
GetenvEdk2Paths returns a list of paths to search for VM firmwares. If LXD_QEMU_FW_PATH or LXD_OVMF_PATH env vars are set then these values are split on ":" and prefixed to the returned slice of paths. The defaultPath argument is returned as the last element in the slice.
Types ¶
type FirmwarePair ¶
FirmwarePair represents a combination of firmware code (Code) and storage (Vars).
func GetArchitectureFirmwarePairsForUsage ¶
func GetArchitectureFirmwarePairsForUsage(hostArch int, usage FirmwareUsage) []FirmwarePair
GetArchitectureFirmwarePairsForUsage returns FirmwarePair slice for a host architecture and usage combination. It only includes FirmwarePairs where both the firmware and its vars file are found on the host.
type FirmwareUsage ¶
type FirmwareUsage int
FirmwareUsage represents the situation in which a given firmware file will be used.
const ( // GENERIC is a generic EDK2 firmware. GENERIC FirmwareUsage = iota // SECUREBOOT is a UEFI Secure Boot enabled firmware. SECUREBOOT // CSM is a firmware with the UEFI Compatibility Support Module enabled to boot BIOS-only operating systems. CSM )
type Installation ¶
type Installation struct { Paths []string Usage map[FirmwareUsage][]FirmwarePair }
Installation represents a set of available firmware at a given location on the system.