aarch64 EFI image management

This commit is contained in:
AlexSSD7 2023-08-30 13:13:08 +01:00
commit 50df5197d4
6 changed files with 156 additions and 33 deletions

View file

@ -28,7 +28,7 @@ type BuildContext struct {
vi *vm.VM
}
func NewBuildContext(logger *slog.Logger, baseISOPath string, outPath string, showVMDisplay bool) (*BuildContext, error) {
func NewBuildContext(logger *slog.Logger, baseISOPath string, outPath string, showVMDisplay bool, biosPath string) (*BuildContext, error) {
baseISOPath = filepath.Clean(baseISOPath)
outPath = filepath.Clean(outPath)
@ -50,10 +50,13 @@ func NewBuildContext(logger *slog.Logger, baseISOPath string, outPath string, sh
vi, err := vm.NewVM(logger.With("subcaller", "vm"), vm.VMConfig{
CdromImagePath: baseISOPath,
BIOSPath: biosPath,
Drives: []vm.DriveConfig{{
Path: outPath,
}},
MemoryAlloc: 512,
MemoryAlloc: 512,
UnrestrictedNetworking: true,
ShowDisplay: showVMDisplay,
InstallBaseUtilities: true,