From 4970dafdbf7dcc1f51232903f50ec12562f220cf Mon Sep 17 00:00:00 2001 From: Julian Stecklina Date: Mon, 21 Nov 2022 16:22:44 +0100 Subject: [PATCH] Add logo --- rust/src/main.rs | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/rust/src/main.rs b/rust/src/main.rs index b20cfe2..0651e64 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -2,14 +2,32 @@ #![no_std] #![feature(abi_efiapi)] -use log::info; -use uefi::prelude::*; +use uefi::{prelude::*, proto::console::text::Output}; + +mod boot_image; + +fn print_logo(output: &mut Output) { + output.clear().unwrap(); + + output + .output_string(cstr16!( + " + _ _ _ \r + | | | | | | \r + | | __ _ _ __ ______ _| |__ ___ ___ | |_ \r + | |/ _` | '_ \\|_ / _` | '_ \\ / _ \\ / _ \\| __|\r + | | (_| | | | |/ / (_| | |_) | (_) | (_) | |_ \r + |_|\\__,_|_| |_/___\\__,_|_.__/ \\___/ \\___/ \\__|\r +" + )) + .unwrap(); +} #[entry] fn main(_handle: Handle, mut system_table: SystemTable) -> Status { uefi_services::init(&mut system_table).unwrap(); - info!("Hello World!"); + print_logo(system_table.stdout()); Status::SUCCESS }