pub trait FirmwareBackend {
type Verified;
// Required methods
fn capabilities(&self) -> Capabilities;
fn begin(&mut self, size: u64, metadata: &[u8]) -> Result<(), Error>;
fn write(&mut self, bytes: &[u8]) -> Result<usize, Error>;
fn finish(&mut self) -> Result<Self::Verified, Error>;
fn activate(&mut self, verified: Self::Verified) -> Result<(), Error>;
fn abort(&mut self) -> Result<(), Error>;
fn confirm_running(&mut self) -> Result<(), Error>;
}Expand description
Implementations own image format, trust roots, staging geometry and persistent
boot state. Never return success before accepted bytes are durable according
to the platform contract. finish authenticates readback; its nonforgeable
proof must bind the exact staging generation. activate must reject stale
proofs and mutations since verification. Abort must never clear pending boot.
No VFS, allocator, transport, scheduler or signing key is required here.