kernel::startup
Boot startup — board initialisation, driver setup.
Called from FlintMain() before the scheduler starts.
The console is a board-owned device, not a kernel one. Each board brings up
its own console (board::console_init) and hands the kernel a
ByteStream to write to (board::console); the
kernel calls both blind, so it names no UART driver and the seam is the same
on every arch. The one board-owned device that lived in the kernel — a
static mut CONSOLE_UART: Esp32Uart behind cfg(soc-esp32) — is gone.
Functions
Section titled “Functions”console_write
Section titled “console_write”fn console_write(data: &[u8])Write bytes to the board’s console, if it has one.
Tries until every byte is queued: the board hands out a non-blocking
ByteStream whose write takes what fits and
returns the count, so a log line longer than the FIFO can drain without
truncation. A permanently stalled console is bounded and drops the tail;
a board with no console drops the whole write.
fn init()Initialise board-level hardware.
Must be called before the scheduler starts, and — because log and panic go through the console — the console is the very first thing brought up, before any line is written.