Micro-toolkit

microboot

Devices can loop through repeated unconfirmed crashes.

A boot-history manager detects crash loops and advises normal, recovery or factory mode.

DevelopmentMITC99
Last verified
Not audited against current README/docs
Platform scope
Portable C99; integration depends on caller-provided adapters

What it solves

Devices can loop through repeated unconfirmed crashes.

How it works

1Persistent boot flags2crash-loop check3advised mode

Use it when

Detect repeated unclean boots
Select a recovery mode before a crash loop persists
Record clean shutdown and uptime

Quick Start

#include "mboot.h"
mboot_config_t cfg=mboot_default_config(); mboot_t boot;
if(mboot_init(&boot,&flash_io,clock_now,&cfg)!=MBOOT_OK) return 1;
if(mboot_start(&boot)!=MBOOT_OK) return 1;
/* Expected: mboot_mode reports the advised startup mode. */

Engineering evidence

  • Two-slot canonical 32-byte format and read-back verification are documented

Known limits

  • Does not jump to firmware, verify images, implement secure boot or OTA
  • Mode decisions are advisory