Skip to content

Commit

Permalink
Default to UEFI (non-SB) on x86_64
Browse files Browse the repository at this point in the history
There's some momentum around e.g. UKI
https://github.com/uapi-group/specifications/blob/main/specs/unified_kernel_image.md

I think it's about time to flip our default to be UEFI instead
of BIOS.

(But, we obviously still do need to care about bios...and
 we should e.g. be running at least a subset of our tests
 acrosss that too)

Also while we're here, make the implementation here have the
default for firmware be the empty string `""` instead of `bios`,
which doesn't really apply on e.g. ppc64le/s390x.
  • Loading branch information
cgwalters committed Nov 3, 2022
1 parent 94eb65b commit d908fa3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 0 additions & 2 deletions mantle/cmd/kola/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,6 @@ func syncOptionsImpl(useCosa bool) error {
kola.QEMUOptions.Firmware = "uefi"
} else if kola.Options.CosaBuildArch == "x86_64" && kola.QEMUOptions.Native4k {
kola.QEMUOptions.Firmware = "uefi"
} else {
kola.QEMUOptions.Firmware = "bios"
}
}

Expand Down
11 changes: 9 additions & 2 deletions mantle/platform/qemu.go
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ type QemuBuilder struct {
// NewQemuBuilder creates a new build for QEMU with default settings.
func NewQemuBuilder() *QemuBuilder {
ret := QemuBuilder{
Firmware: "bios",
Firmware: "",
Swtpm: true,
Pdeathsig: true,
Argv: []string{},
Expand Down Expand Up @@ -1394,8 +1394,15 @@ func (builder *QemuBuilder) Exec() (*QemuInstance, error) {
}
argv = append(argv, "-smp", fmt.Sprintf("%d", builder.Processors))

if builder.Firmware == "" {
switch coreosarch.CurrentRpmArch() {
case "x86_64", "aarch64":
builder.Firmware = "uefi"
}
}

switch builder.Firmware {
case "bios":
case "":
break
case "uefi":
if err := builder.setupUefi(false); err != nil {
Expand Down
2 changes: 1 addition & 1 deletion src/cmd-kola
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import sys
# Just test these boot to start with. In the future we should at least
# do ostree upgrades with uefi etc. But we don't really need the *full*
# suite...if podman somehow broke with nvme or uefi I'd be amazed and impressed.
BASIC_SCENARIOS = ["nvme=true", "firmware=uefi"]
BASIC_SCENARIOS = ["nvme=true", "firmware=bios"]
BASIC_SCENARIOS_SECURE_BOOT = ["firmware=uefi-secure"]
arch = platform.machine()

Expand Down

0 comments on commit d908fa3

Please sign in to comment.