debian-forge-composer/internal/platform/s390x.go
Tomáš Hozza 6601c32f7e platform/s390x: return sane values from GetZiplSupport()
The s390x platform definition would previously always return `false`
when calling its `GetZiplSupport()` method. This was obviously not
correct.

The method is meant to suite a similar purpose as `GetBIOSPlatform()`
and `GetUEFIVendor()` on BIOS / UEFI enabled platforms.

Change the S390X platform struct to contain `Zipl` member instead of
`BIOS`, which is technically more correct. Make sure that the value
set in the `Zipl` struct member is returned by `GetZiplSupport()`.

Ensure that `FirmwarePackages` from `BasePlatform` are added to the list
of packages returned by `GetPackages()`.

Adjust distro definitions using the `S390X` platform.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-19 13:24:39 +02:00

32 lines
641 B
Go

package platform
type S390X struct {
BasePlatform
Zipl bool
}
func (p *S390X) GetArch() Arch {
return ARCH_S390X
}
func (p *S390X) GetZiplSupport() bool {
return p.Zipl
}
func (p *S390X) GetPackages() []string {
packages := p.BasePlatform.FirmwarePackages
// TODO: should these packages be present also in images not intended for booting?
packages = append(packages,
"dracut-config-generic",
"s390utils-base",
"s390utils-core",
)
return packages
}
func (p *S390X) GetBuildPackages() []string {
// TODO: should these packages be present also in images not intended for booting?
return []string{
"s390utils-base",
}
}