Documentation ¶
Index ¶
- func CalcFileChecksum(fs v1.FS, fileName string) (string, error)
- func ConcatFiles(fs v1.FS, sources []string, target string) (err error)
- func CopyFile(fs v1.FS, source string, target string) (err error)
- func CreateDirStructure(fs v1.FS, target string) error
- func CreateSquashFS(runner v1.Runner, logger sdkTypes.KairosLogger, source string, ...) error
- func CreateTar(log sdkTypes.KairosLogger, ...) error
- func DirSize(fs v1.FS, path string) (int64, error)
- func Exists(fs v1.FS, path string) (bool, error)
- func GolangArchToArch(arch string) (string, error)
- func IsAmd64(arch string) bool
- func IsArm64(arch string) bool
- func IsDir(fs v1.FS, path string) (bool, error)
- func MkdirAll(fs v1.FS, name string, mode os.FileMode) (err error)
- func NameFromCmdline(basename, cmdline string) string
- func Tar(src string, writers ...io.Writer) error
- func TempDir(fs v1.FS, dir, prefix string) (name string, err error)
- type BootEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcFileChecksum ¶
CalcFileChecksum opens the given file and returns the sha256 checksum of it.
func ConcatFiles ¶
ConcatFiles Copies source files to target file using Fs interface. Source files are concatenated into target file in the given order. If target is a directory source is copied into that directory using 1st source name file.
func CopyFile ¶
CopyFile Copies source file to target file using Fs interface. If target is directory source is copied into that directory using source name file.
func CreateDirStructure ¶
Copies source file to target file using Fs interface
func CreateSquashFS ¶
func CreateSquashFS(runner v1.Runner, logger sdkTypes.KairosLogger, source string, destination string, options []string) error
CreateSquashFS creates a squash file at destination from a source, with options TODO: Check validity of source maybe?
func CreateTar ¶
func CreateTar(log sdkTypes.KairosLogger, srctar, dstimageTar, imagename, architecture, OS string) error
CreateTar a imagetarball from a standard tarball
func GolangArchToArch ¶
func NameFromCmdline ¶
NameFromCmdline returns the name of the efi/conf file based on the cmdline we want to have at least 1 efi file that its the default, that is the one we ship with the iso/media/whatever install medium that one has the default cmdline + the install cmdline For that one, we use it as the BASE one, configs will only trigger for that install stanza if we are on install media so we dont have to worry about it, but we want to provide a clean name for it so in that case we dont add anything to the efi name/conf name/cmdline inside the config For the other ones, we add the cmdline to the efi name and the cmdline to the conf file so you get - norole.efi - norole.conf - norole_interactive-install.efi - norole_interactive-install.conf This is mostly for convenience in generating the names as the real data is stored in the config file but it can easily be used to identify the efi file and the conf file.
Types ¶
type BootEntry ¶
func GetUkiCmdline ¶
func GetUkiCmdline() []BootEntry
GetUkiCmdline returns the cmdline to be used for the kernel. The cmdline can be overridden by the user using the cmdline flag. For each cmdline passed, we generate a uki file with that cmdline extend-cmdline will just extend the default cmdline so we only create one efi file extra-cmdline will create a new efi file for each cmdline passed
func GetUkiSingleCmdlines ¶
func GetUkiSingleCmdlines(logger sdkTypes.KairosLogger) []BootEntry
GetUkiSingleCmdlines returns the single-efi-cmdline as passed by the user.