we've done it, it boots!

This commit is contained in:
Alex Zenla
2024-01-16 23:07:34 -08:00
parent 0d68db8523
commit 5c1bb3d8fc
7 changed files with 161 additions and 40 deletions

View File

@ -25,16 +25,13 @@ fn main() -> Result<(), XenClientError> {
..Default::default()
};
let domid = domctl.create_domain(domain)?;
let result = boot(
boot(
domid,
kernel_image_path.as_str(),
initrd_path.as_str(),
&call,
&domctl,
);
domctl.destroy_domain(domid)?;
result?;
println!("domain destroyed: {}", domid);
)?;
Ok(())
}
@ -50,7 +47,7 @@ fn boot(
let memctl = MemoryControl::new(call);
let mut boot = BootSetup::new(call, domctl, &memctl, domid);
let initrd = read(initrd_path)?;
let mut state = boot.initialize(&image_loader, initrd.as_slice(), 512)?;
let mut state = boot.initialize(&image_loader, initrd.as_slice(), 1, 512)?;
boot.boot(&mut state, "debug")?;
Ok(())
}