kernel: the boot transcript on screen, every line timestamped
Without serial and without working USB storage, a slow real-hardware boot is undiagnosable — 'stabbing in the dark'. Two changes end that: The log renderer stamps every line with boot-relative seconds ([ 12.045] ...), so every surface — serial, debugcon, and now the screen — is a readable timeline. And the framebuffer console registers as an ordinary log sink at boot: kernel AND userspace lines (device bring-up, fat mounts, logger announcements) show live on screen until the display service claims the framebuffer, which flips the console's suppression and silences the sink automatically — the display-owns-the- screen design is unchanged in normal operation; the console now simply narrates the part of boot that happens before there IS a display. On the machine that motivated this, the next boot will show by eye where the minutes go — including whether the USB chain ever brings storage up, and whether screen drawing itself crawls (the latent non-write-combining framebuffer suspect: if these very lines paint slowly, that's the answer).
This commit is contained in:
@@ -162,6 +162,13 @@ fn kmain(boot_information: *const BootInformation) noreturn {
|
||||
// uncached crawl). Routine boot output goes only to the log; this console now exists for
|
||||
// early-boot and fatal (`fatal`/panic) output, until the display service takes over.
|
||||
console.init(fb);
|
||||
// The console joins the log sinks: the boot transcript — kernel AND
|
||||
// userspace lines, each timestamped by the renderer — shows on screen
|
||||
// until the display service claims the framebuffer (which flips the
|
||||
// console's `suppressed` and silences this sink). On a machine with no
|
||||
// serial this is the only live view of the boot, and a slow boot becomes
|
||||
// diagnosable by eye: the timeline is right there.
|
||||
if (console.present()) log.addSink(console.write);
|
||||
log.write(if (console.present())
|
||||
"/system/kernel: framebuffer ready (early-boot + fatal fallback; the display service drives it in normal operation)\n"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user