feat(boot): clear screen before boot handoff, if --retain-boot-console is not specified on the command-line (#51)

This commit is contained in:
alex authored and GitHub committed 2025-12-20 21:45:35 -08:00
1 parent fafabe234e
commit 2da457ee7c
3 files changed
+26 -1

No files matched your search

+5
View File
@@ -1,4 +1,5 @@
use crate::context::SproutContext;
use crate::phases::before_handoff;
use crate::utils;
use alloc::boxed::Box;
use alloc::rc::Rc;
@@ -88,6 +89,10 @@ pub fn chainload(context: Rc<SproutContext>, configuration: &ChainloadConfigurat
BootloaderInterface::mark_exec(context.root().timer())
.context("unable to mark execution of boot entry in bootloader interface")?;
// Since we are about to hand off control to another image, we need to execute the handoff hook.
// This will perform operations like clearing the screen.
before_handoff(&context).context("unable to execute before handoff hook")?;
// Start the loaded image.
// This call might return, or it may pass full control to another image that will never return.
// Capture the result to ensure we can return an error if the image fails to start, but only