This commit is contained in:
pjht 2024-08-06 19:46:57 -05:00
parent 9181d4fab8
commit 3808016fc8
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E
2 changed files with 11 additions and 6 deletions

View File

@ -1,8 +1,12 @@
use std::{os::unix::ffi::OsStrExt, path::{Path, PathBuf}, process::Command}; use std::{
os::unix::ffi::OsStrExt,
path::{Path, PathBuf},
process::Command,
};
extern crate bootloader; extern crate bootloader;
use bootloader::{UefiBoot, BiosBoot}; use bootloader::{BiosBoot, UefiBoot};
fn main() { fn main() {
println!("cargo:rerun-if-changed=sysroot"); println!("cargo:rerun-if-changed=sysroot");

View File

@ -13,10 +13,11 @@ fn main() {
cmd.arg("-bios").arg(ovmf_prebuilt::ovmf_pure_efi()); cmd.arg("-bios").arg(ovmf_prebuilt::ovmf_pure_efi());
cmd.arg("-drive") cmd.arg("-drive")
.arg(format!("format=raw,file={uefi_path},if=ide,index=0")); .arg(format!("format=raw,file={uefi_path},if=ide,index=0"));
// .arg(format!("format=raw,file={bios_path}")); //.arg(format!("format=raw,file={bios_path}"));
cmd.arg("-drive").arg("format=raw,file=ext2.img,if=ide,index=1"); cmd.arg("-drive")
// cmd.arg("-s"); .arg("format=raw,file=ext2.img,if=ide,index=1");
// cmd.arg("-S"); //cmd.arg("-s");
//cmd.arg("-S");
cmd.arg("-serial").arg("mon:stdio"); cmd.arg("-serial").arg("mon:stdio");
cmd.arg("-serial").arg("file:capture.pcapng"); cmd.arg("-serial").arg("file:capture.pcapng");
let mut child = cmd.spawn().unwrap(); let mut child = cmd.spawn().unwrap();