Skip to content

Commit

Permalink
DEBUG?
Browse files Browse the repository at this point in the history
Signed-off-by: Itxaka <[email protected]>
  • Loading branch information
Itxaka committed Oct 2, 2023
1 parent 9a83432 commit d76537c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
Binary file added tests/assets/OVMF_CODE.secboot.fd
Binary file not shown.
Binary file removed tests/assets/efivars.fd
Binary file not shown.
11 changes: 9 additions & 2 deletions tests/tests_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,20 @@ func startVM() (context.Context, VM) {
func(m *types.MachineConfig) error {
FW := os.Getenv("FIRMWARE")
if FW != "" {
getwd, err := os.Getwd()
if err != nil {
return err
}
m.Args = append(m.Args, "-drive",
fmt.Sprintf("file=%s,if=pflash,format=raw,readonly=on", FW),
fmt.Sprintf("file=%s,if=pflash,format=raw,readonly=on", filepath.Join(getwd, "/assets/OVMF_CODE.secboot.fd")),
)

// Set custom vars file for efi config so we boot first from disk then from DVD
getwd, err := os.Getwd()
// Generate efivars?
cmd := exec.Command("virt-fw-vars", "-i", "/usr/share/OVMF/OVMF_VARS.fd", "--set-json", filepath.Join(getwd, "/assets/efivars.json"), "-o", filepath.Join(getwd, "/assets/efivars.fd"))
output, err := cmd.CombinedOutput()
if err != nil {
fmt.Println(output)
return err
}
m.Args = append(m.Args, "-drive",
Expand Down

0 comments on commit d76537c

Please sign in to comment.