2025-11-03 14:45:48 -05:00
|
|
|
use crate::logger;
|
2025-10-11 14:35:29 -07:00
|
|
|
use anyhow::{Context, Result};
|
2025-10-01 16:45:04 -07:00
|
|
|
|
2025-10-14 12:47:33 -07:00
|
|
|
/// Initializes the UEFI environment.
|
2025-10-11 14:35:29 -07:00
|
|
|
pub fn init() -> Result<()> {
|
2025-11-03 14:45:48 -05:00
|
|
|
// Initialize the logger for Sprout.
|
|
|
|
|
// NOTE: This cannot use a result type as errors need to be printed
|
|
|
|
|
// using the logger, which is not initialized until this returns.
|
|
|
|
|
logger::init();
|
|
|
|
|
|
|
|
|
|
// Initialize further UEFI internals.
|
|
|
|
|
uefi::helpers::init().context("unable to initialize uefi environment")?;
|
2025-10-11 14:35:29 -07:00
|
|
|
Ok(())
|
2025-10-01 16:45:04 -07:00
|
|
|
}
|