osbuild2: add GRUB2Config to GRUB2StageOptions

A new `config` section was introduced in osbuild with several new
fields to configure grub2.
This commit is contained in:
Christian Kellner 2022-02-24 16:42:42 +01:00 committed by Achilleas Koutsou
parent 86f3ae55e4
commit a8b0d0e255

View file

@ -16,14 +16,15 @@ import (
// Note that it is the role of an assembler to install any necessary
// bootloaders that are stored in the image outside of any filesystem.
type GRUB2StageOptions struct {
RootFilesystemUUID uuid.UUID `json:"root_fs_uuid"`
BootFilesystemUUID *uuid.UUID `json:"boot_fs_uuid,omitempty"`
KernelOptions string `json:"kernel_opts,omitempty"`
Legacy string `json:"legacy,omitempty"`
UEFI *GRUB2UEFI `json:"uefi,omitempty"`
SavedEntry string `json:"saved_entry,omitempty"`
Greenboot bool `json:"greenboot,omitempty"`
WriteCmdLine *bool `json:"write_cmdline,omitempty"`
RootFilesystemUUID uuid.UUID `json:"root_fs_uuid"`
BootFilesystemUUID *uuid.UUID `json:"boot_fs_uuid,omitempty"`
KernelOptions string `json:"kernel_opts,omitempty"`
Legacy string `json:"legacy,omitempty"`
UEFI *GRUB2UEFI `json:"uefi,omitempty"`
SavedEntry string `json:"saved_entry,omitempty"`
Greenboot bool `json:"greenboot,omitempty"`
WriteCmdLine *bool `json:"write_cmdline,omitempty"`
Config *GRUB2Config `json:"config,omitempty"`
}
type GRUB2UEFI struct {
@ -32,6 +33,13 @@ type GRUB2UEFI struct {
Unified bool `json:"unified,omitempty"`
}
type GRUB2Config struct {
TerminalInput []string `json:"terminal_input,omitempty"`
TerminalOutput []string `json:"terminal_output,omitempty"`
Timeout int `json:"timeout,omitempty"`
Serial string `json:"serial,omitempty"`
}
func (GRUB2StageOptions) isStageOptions() {}
// NewGRUB2Stage creates a new GRUB2 stage object.