Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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