basic functionality
This commit is contained in:
22
src/lib.rs
Normal file
22
src/lib.rs
Normal file
@ -0,0 +1,22 @@
|
||||
#![no_std]
|
||||
|
||||
use linux::start_linux;
|
||||
use pe::get_loader_sections;
|
||||
use uefi::table::{Boot, SystemTable};
|
||||
use uefi::{Handle, Status};
|
||||
|
||||
mod initrd;
|
||||
mod linux;
|
||||
mod pe;
|
||||
mod secureboot;
|
||||
mod unicode;
|
||||
|
||||
pub fn bootloader(image_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
|
||||
uefi_services::init(&mut system_table).unwrap();
|
||||
let boot_services = system_table.boot_services();
|
||||
let sections = get_loader_sections(boot_services).unwrap();
|
||||
start_linux(image_handle, boot_services, sections).unwrap();
|
||||
|
||||
boot_services.stall(1_000_000_000);
|
||||
Status::SUCCESS
|
||||
}
|
||||
Reference in New Issue
Block a user