debian-forge-composer/internal/platform/aarch64.go
Tom Gundersen ec8cc01f95 platform: introduce hardware platform abstraction
These objects describes the hardware an image runs on. Including
 - architecture
 - bootloader
 - required firmware

Use the platform abstraction to move firmware packages out of the package set
definitions.
2022-07-07 12:00:56 +01:00

29 lines
469 B
Go

package platform
type Aarch64 struct {
BasePlatform
UEFIVendor string
}
func (p *Aarch64) GetArch() Arch {
return ARCH_AARCH64
}
func (p *Aarch64) GetUEFIVendor() string {
return p.UEFIVendor
}
func (p *Aarch64) GetPackages() []string {
packages := p.BasePlatform.FirmwarePackages
if p.UEFIVendor != "" {
packages = append(packages,
"dracut-config-generic",
"efibootmgr",
"grub2-efi-aa64",
"grub2-tools",
"shim-aa64")
}
return packages
}