Add qemu serial output to stdio

Signed-off-by: Noah Knegt <git@noahknegt.com>
This commit is contained in:
2025-08-02 19:12:56 +02:00
parent 022ec27bd5
commit 092004bab0

View File

@@ -11,10 +11,15 @@ fn main() {
let mut cmd = std::process::Command::new("qemu-system-x86_64");
if uefi {
cmd.arg("-bios").arg(ovmf_prebuilt::ovmf_pure_efi());
cmd.arg("-drive").arg(format!("format=raw,file={uefi_path}"));
cmd.arg("-drive")
.arg(format!("format=raw,file={uefi_path}"));
} else {
cmd.arg("-drive").arg(format!("format=raw,file={bios_path}"));
cmd.arg("-drive")
.arg(format!("format=raw,file={bios_path}"));
}
cmd.arg("-serial").arg("stdio");
let mut child = cmd.spawn().unwrap();
child.wait().unwrap();
}