def build_uki(
state: MkosiState,
+ kver: str,
kimg: Path,
initrds: Sequence[Path],
output: Path,
"--stub", stub,
"--output", output,
"--efi-arch", arch,
+ "--uname", kver,
]
if not state.config.tools_tree:
with umask(~0o700):
boot_binary.parent.mkdir(parents=True, exist_ok=True)
- build_uki(state, kimg, initrds, boot_binary, roothash=roothash)
+ build_uki(state, kver, kimg, initrds, boot_binary, roothash=roothash)
if not (state.staging / state.config.output_split_initrd).exists():
# Extract the combined initrds from the UKI so we can use it to direct kernel boot with qemu
initrds += [state.workspace / "initrd"]
try:
- _, kimg = next(gen_kernel_images(state))
+ kver, kimg = next(gen_kernel_images(state))
except StopIteration:
die("A kernel must be installed in the image to build a UKI")
- build_uki(state, kimg, initrds, output)
+ build_uki(state, kver, kimg, initrds, output)
extract_pe_section(state, output, ".linux", state.staging / state.config.output_split_kernel)
extract_pe_section(state, output, ".initrd", state.staging / state.config.output_split_initrd)