Skip to content

Commit

Permalink
Merge pull request #1597 from nikita-dubrovskii/pvimg
Browse files Browse the repository at this point in the history
s390x: prepare for the upcoming 'pvimg' tool replacing 'genprotimg'
  • Loading branch information
nikita-dubrovskii authored Feb 6, 2025
2 parents 55a9f2a + 1bdec2b commit bfef3a1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Minor changes:


Internal changes:

- s390x: Use options and logic compatible with both C-based `genprotimg` and Rust-based `pvimg`

Packaging changes:

Expand Down
17 changes: 12 additions & 5 deletions src/s390x/zipl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -281,16 +281,23 @@ fn generate_sdboot(

// finally, Secure Execution sd-boot image
let sdboot = mountpoint.join("sdboot");

// C 'genprotimg' tool no longer exists and was replaced by symlink to Rust 'pvimg create',
// which by default doesn't overwrite the output image.
// For backward compatibility let's silently remove the 'sdboot'.
let _ = std::fs::remove_file(&sdboot);

// FIXME: in F42/el10 switch to 'pvimg create' with '--overwrite' flag.
let mut cmd = Command::new("genprotimg");
cmd.arg("-V")
.arg("-i")
cmd.arg("--verbose")
.arg("--image")
.arg(kernel)
.arg("-r")
.arg("--ramdisk")
.arg(initrd)
.arg("-p")
.arg("--parmfile")
.arg(cmdline.path())
.arg("--no-verify")
.arg("-o")
.arg("--output")
.arg(&sdboot);
for k in hostkeys {
cmd.arg("-k").arg(k);
Expand Down

0 comments on commit bfef3a1

Please sign in to comment.