|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | +<head> |
| 4 | + <meta charset="UTF-8"> |
| 5 | + <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | + <title>eBoot Documentation -- EmbeddedOS</title> |
| 7 | + <link rel="stylesheet" href="../style.css"> |
| 8 | +</head> |
| 9 | +<body> |
| 10 | + |
| 11 | +<nav class="site-nav"> |
| 12 | + <span class="brand">EmbeddedOS</span> |
| 13 | + <div class="nav-links"> |
| 14 | + <a href="../index.html">Home</a> |
| 15 | + <a href="index.html" class="active">Docs</a> |
| 16 | + <a href="../getting-started.html">Getting Started</a> |
| 17 | + <a href="https://github.com/embeddedos-org" target="_blank">GitHub</a> |
| 18 | + </div> |
| 19 | +</nav> |
| 20 | + |
| 21 | +<div class="doc-layout"> |
| 22 | + <aside class="doc-sidebar"> |
| 23 | + <h4>Getting Started</h4> |
| 24 | + <a href="../getting-started.html">Quick Start Guide</a> |
| 25 | + <h4>Core</h4> |
| 26 | + <a href="eos.html">EoS</a> |
| 27 | + <a href="eboot.html" class="active">eBoot</a> |
| 28 | + <a href="ebuild.html">ebuild</a> |
| 29 | + <h4>Middleware</h4> |
| 30 | + <a href="eipc.html">EIPC</a> |
| 31 | + <a href="eai.html">EAI</a> |
| 32 | + <a href="eni.html">ENI</a> |
| 33 | + <h4>Tools</h4> |
| 34 | + <a href="eosuite.html">EoSuite</a> |
| 35 | + <a href="eosim.html">EoSim</a> |
| 36 | + </aside> |
| 37 | + |
| 38 | + <main class="doc-main"> |
| 39 | + <h1>eBoot</h1> |
| 40 | + <p>Universal bootloader with A/B firmware slot management, secure boot chain, and CRC validation. eBoot supports 26 board configurations and provides safe firmware updates with automatic rollback.</p> |
| 41 | + <p><a href="https://github.com/embeddedos-org/eboot" target="_blank">GitHub Repository</a></p> |
| 42 | + |
| 43 | + <h2>Getting Started</h2> |
| 44 | + <pre><code>git clone https://github.com/embeddedos-org/eboot.git |
| 45 | +cmake -B build -DEBOOT_BUILD_TESTS=ON |
| 46 | +cmake --build build</code></pre> |
| 47 | + |
| 48 | + <h2>Features</h2> |
| 49 | + <ul> |
| 50 | + <li>A/B firmware slot selection with priority and retry counters</li> |
| 51 | + <li>Boot control block (BCB) with CRC-32 integrity verification</li> |
| 52 | + <li>Secure boot chain with SHA-256 signature verification</li> |
| 53 | + <li>Automatic rollback on failed boot attempts</li> |
| 54 | + <li>Recovery mode with serial console</li> |
| 55 | + <li>Support for 26 board configurations</li> |
| 56 | + <li>Minimal footprint for resource-constrained devices</li> |
| 57 | + </ul> |
| 58 | + |
| 59 | + <h2>API Reference -- Boot Control</h2> |
| 60 | + <ul class="api-list"> |
| 61 | + <li><code>eos_bootctl_load(bcb)</code> -- Load the boot control block from non-volatile storage</li> |
| 62 | + <li><code>eos_bootctl_save(bcb)</code> -- Save the boot control block to non-volatile storage</li> |
| 63 | + <li><code>eos_bootctl_init_defaults(bcb)</code> -- Initialize a BCB with default values (slot A active, retry count 3)</li> |
| 64 | + <li><code>eos_bootctl_validate(bcb)</code> -- Validate BCB integrity using CRC-32 checksum</li> |
| 65 | + </ul> |
| 66 | + |
| 67 | + <h2>API Reference -- Slot Management</h2> |
| 68 | + <ul class="api-list"> |
| 69 | + <li><code>eos_slot_scan_all(slots, count)</code> -- Scan all firmware slots and populate metadata</li> |
| 70 | + <li><code>eos_slot_is_valid(slot)</code> -- Check if a firmware slot contains valid firmware</li> |
| 71 | + <li><code>eos_slot_get_version(slot, version_buf)</code> -- Get the firmware version string from a slot</li> |
| 72 | + <li><code>eos_slot_erase(slot)</code> -- Erase a firmware slot and mark it as empty</li> |
| 73 | + </ul> |
| 74 | + |
| 75 | + <h2>Boot Flow</h2> |
| 76 | + <p>The eBoot boot process follows this sequence:</p> |
| 77 | + <ol> |
| 78 | + <li>Hardware initialization (clock, memory, watchdog)</li> |
| 79 | + <li>Load boot control block from flash</li> |
| 80 | + <li>Validate BCB CRC integrity</li> |
| 81 | + <li>Select active slot based on priority and retry count</li> |
| 82 | + <li>Verify firmware signature (secure boot)</li> |
| 83 | + <li>Jump to firmware entry point</li> |
| 84 | + <li>On failure: decrement retry counter, try alternate slot</li> |
| 85 | + <li>On all failures: enter recovery mode</li> |
| 86 | + </ol> |
| 87 | + |
| 88 | + <h2>Board Configurations</h2> |
| 89 | + <p>eBoot supports 26 board configurations out of the box:</p> |
| 90 | + <table> |
| 91 | + <thead><tr><th>Board</th><th>Architecture</th><th>Flash Size</th><th>Slot Layout</th></tr></thead> |
| 92 | + <tbody> |
| 93 | + <tr><td>stm32f4_disco</td><td>ARM Cortex-M4</td><td>1 MB</td><td>2 x 448 KB</td></tr> |
| 94 | + <tr><td>stm32f4_nucleo</td><td>ARM Cortex-M4</td><td>512 KB</td><td>2 x 224 KB</td></tr> |
| 95 | + <tr><td>stm32h7_nucleo</td><td>ARM Cortex-M7</td><td>2 MB</td><td>2 x 896 KB</td></tr> |
| 96 | + <tr><td>stm32h7_disco</td><td>ARM Cortex-M7</td><td>2 MB</td><td>2 x 896 KB</td></tr> |
| 97 | + <tr><td>nrf52_dk</td><td>ARM Cortex-M4</td><td>1 MB</td><td>2 x 448 KB</td></tr> |
| 98 | + <tr><td>nrf52_dongle</td><td>ARM Cortex-M4</td><td>1 MB</td><td>2 x 448 KB</td></tr> |
| 99 | + <tr><td>nrf5340_dk</td><td>ARM Cortex-M33</td><td>1 MB</td><td>2 x 448 KB</td></tr> |
| 100 | + <tr><td>nrf9160_dk</td><td>ARM Cortex-M33</td><td>1 MB</td><td>2 x 448 KB</td></tr> |
| 101 | + <tr><td>esp32_devkit</td><td>Xtensa LX6</td><td>4 MB</td><td>2 x 1.5 MB</td></tr> |
| 102 | + <tr><td>esp32_wrover</td><td>Xtensa LX6</td><td>16 MB</td><td>2 x 6 MB</td></tr> |
| 103 | + <tr><td>raspi4</td><td>ARM Cortex-A72</td><td>SD Card</td><td>2 partitions</td></tr> |
| 104 | + <tr><td>raspi4_cm</td><td>ARM Cortex-A72</td><td>eMMC</td><td>2 partitions</td></tr> |
| 105 | + <tr><td>imx8m_evk</td><td>ARM Cortex-A53</td><td>eMMC</td><td>2 partitions</td></tr> |
| 106 | + <tr><td>imx8m_mini</td><td>ARM Cortex-A53</td><td>eMMC</td><td>2 partitions</td></tr> |
| 107 | + <tr><td>k64f_frdm</td><td>ARM Cortex-M4</td><td>1 MB</td><td>2 x 448 KB</td></tr> |
| 108 | + <tr><td>riscv64_virt</td><td>RISC-V 64</td><td>Virtual</td><td>2 x 8 MB</td></tr> |
| 109 | + <tr><td>x86_64_efi</td><td>x86_64</td><td>Disk</td><td>2 EFI partitions</td></tr> |
| 110 | + <tr><td>jetson_orin_nx</td><td>ARM Cortex-A78AE</td><td>eMMC</td><td>2 partitions</td></tr> |
| 111 | + <tr><td>jetson_orin_nano</td><td>ARM Cortex-A78AE</td><td>eMMC</td><td>2 partitions</td></tr> |
| 112 | + <tr><td>ti_msp432_lp</td><td>ARM Cortex-M4F</td><td>256 KB</td><td>2 x 112 KB</td></tr> |
| 113 | + <tr><td>psoc6_proto</td><td>ARM Cortex-M4/M0+</td><td>2 MB</td><td>2 x 896 KB</td></tr> |
| 114 | + <tr><td>psoc6_kit</td><td>ARM Cortex-M4/M0+</td><td>2 MB</td><td>2 x 896 KB</td></tr> |
| 115 | + <tr><td>samc21_xpro</td><td>ARM Cortex-M0+</td><td>256 KB</td><td>2 x 112 KB</td></tr> |
| 116 | + <tr><td>pic32mz_curiosity</td><td>MIPS32</td><td>2 MB</td><td>2 x 896 KB</td></tr> |
| 117 | + <tr><td>s32k344_evb</td><td>ARM Cortex-M7</td><td>4 MB</td><td>2 x 1.5 MB</td></tr> |
| 118 | + <tr><td>generic_sim</td><td>Host (x86/ARM)</td><td>Virtual</td><td>2 x 16 MB</td></tr> |
| 119 | + </tbody> |
| 120 | + </table> |
| 121 | + |
| 122 | + <h2>Configuration</h2> |
| 123 | + <p>eBoot is configured at build time using CMake variables:</p> |
| 124 | + <pre><code>cmake -B build \ |
| 125 | + -DEBOOT_BOARD=stm32f4_disco \ |
| 126 | + -DEBOOT_SECURE_BOOT=ON \ |
| 127 | + -DEBOOT_SLOT_SIZE=0x70000 \ |
| 128 | + -DEBOOT_MAX_RETRY=3 \ |
| 129 | + -DEBOOT_BUILD_TESTS=ON</code></pre> |
| 130 | + |
| 131 | + </main> |
| 132 | +</div> |
| 133 | + |
| 134 | +</body> |
| 135 | +</html> |
0 commit comments