This commit is contained in:
Julian Stecklina 2022-11-21 16:22:44 +01:00
parent 0c013e77a7
commit 4970dafdbf
1 changed files with 21 additions and 3 deletions

View File

@ -2,14 +2,32 @@
#![no_std] #![no_std]
#![feature(abi_efiapi)] #![feature(abi_efiapi)]
use log::info; use uefi::{prelude::*, proto::console::text::Output};
use uefi::prelude::*;
mod boot_image;
fn print_logo(output: &mut Output) {
output.clear().unwrap();
output
.output_string(cstr16!(
"
_ _ _ \r
| | | | | | \r
| | __ _ _ __ ______ _| |__ ___ ___ | |_ \r
| |/ _` | '_ \\|_ / _` | '_ \\ / _ \\ / _ \\| __|\r
| | (_| | | | |/ / (_| | |_) | (_) | (_) | |_ \r
|_|\\__,_|_| |_/___\\__,_|_.__/ \\___/ \\___/ \\__|\r
"
))
.unwrap();
}
#[entry] #[entry]
fn main(_handle: Handle, mut system_table: SystemTable<Boot>) -> Status { fn main(_handle: Handle, mut system_table: SystemTable<Boot>) -> Status {
uefi_services::init(&mut system_table).unwrap(); uefi_services::init(&mut system_table).unwrap();
info!("Hello World!"); print_logo(system_table.stdout());
Status::SUCCESS Status::SUCCESS
} }