platform: add the aarch64_iot platform

This platform copies more files into `/boot` which are necessary to be
able to boot IoT on some single board computers.

We also immediately set this on the `Aarch64_IoT` platform which needs
u-boot to be placed in the `/boot`.

This closes #3312.
This commit is contained in:
Simon de Vlieger 2023-04-13 13:05:59 +02:00
parent 8041563a36
commit b0fce3bfd1
10 changed files with 601 additions and 4 deletions

View file

@ -27,3 +27,36 @@ func (p *Aarch64) GetPackages() []string {
return packages
}
type Aarch64_IoT struct {
BasePlatform
UEFIVendor string
BootFiles [][2]string
}
func (p *Aarch64_IoT) GetArch() Arch {
return ARCH_AARCH64
}
func (p *Aarch64_IoT) GetUEFIVendor() string {
return p.UEFIVendor
}
func (p *Aarch64_IoT) 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
}
func (p *Aarch64_IoT) GetBootFiles() [][2]string {
return p.BootFiles
}

View file

@ -63,6 +63,7 @@ type Platform interface {
GetZiplSupport() bool
GetPackages() []string
GetBuildPackages() []string
GetBootFiles() [][2]string
}
type BasePlatform struct {
@ -98,3 +99,7 @@ func (p BasePlatform) GetPackages() []string {
func (p BasePlatform) GetBuildPackages() []string {
return []string{}
}
func (p BasePlatform) GetBootFiles() [][2]string {
return [][2]string{}
}