uefi update
This commit is contained in:
12
src/lib.rs
12
src/lib.rs
@ -2,8 +2,7 @@
|
||||
|
||||
use linux::start_linux;
|
||||
use pe::get_loader_sections;
|
||||
use uefi::table::{Boot, SystemTable};
|
||||
use uefi::{Handle, Status};
|
||||
use uefi::{boot, Handle, Status};
|
||||
|
||||
mod initrd;
|
||||
mod linux;
|
||||
@ -17,11 +16,10 @@ pub fn panic(_: &core::panic::PanicInfo) -> ! {
|
||||
loop {}
|
||||
}
|
||||
|
||||
pub fn bootloader(image_handle: Handle, system_table: SystemTable<Boot>) -> Status {
|
||||
let boot_services = system_table.boot_services();
|
||||
let sections = get_loader_sections(boot_services).unwrap();
|
||||
start_linux(image_handle, boot_services, sections).unwrap();
|
||||
pub fn bootloader(image_handle: Handle) -> Status {
|
||||
let sections = get_loader_sections(image_handle).unwrap();
|
||||
start_linux(image_handle, sections).unwrap();
|
||||
|
||||
boot_services.stall(1_000_000_000);
|
||||
boot::stall(1_000_000_000);
|
||||
Status::SUCCESS
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user