Skip to content

embeddedos-org/eBoot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

πŸ”§ eboot β€” EoS Bootloader

CI Nightly Release Version

Multi-platform modular bootloader with multicore, secure boot, and firmware update support

eboot is a production-grade boot platform for embedded systems β€” supporting 83 board ports across 73 architecture families, with clean separation between boot logic, hardware abstraction, and firmware management.

β†’ New to eboot? See the Quickstart Guide β€” build and flash in 3 commands.

β†’ Using with eos? See the Integration Guide β€” how eos + eboot + ebuild work together.


⚑ Quick Start

git clone https://github.com/embeddedos-org/eboot.git
cd eboot

# Build (native)
cmake -B build -DEBLDR_BUILD_TESTS=ON
cmake --build build
cd build && ctest

# Cross-compile for STM32F4
cmake -B build-arm -DEBLDR_BOARD=stm32f4 \
  -DCMAKE_TOOLCHAIN_FILE=toolchains/arm-none-eabi.cmake
cmake --build build-arm

# Flash with eFlash (unified flashing tool)
python tools/eflash.py flash --board stm32f4 --image build-arm/eboot_firmware.bin --verify --reset

# Or use CMake flash target
cmake --build build-arm --target flash

✨ Key Features

Category Features
Boot Management Staged boot (stage-0 + stage-1), A/B slots with automatic rollback, boot policy engine
Secure Boot Self-contained SHA-256, CRC-32, Ed25519 signature stubs, anti-rollback
Firmware Update Stream-based pipeline (256B chunks), XMODEM/YMODEM/raw transports, pluggable custom transports
Multicore SMP, AMP, lockstep boot; ARM PSCI, RISC-V SBI HSM, x86 SIPI, mailbox support
Hardware Config Declarative pin muxing, memory regions, interrupt priorities, clock trees via macros
RTOS Boot Auto-detect FreeRTOS/Zephyr/NuttX, MPU config, structured boot parameter handoff
UEFI-like Device table, runtime services (variables, reset, time), interactive boot menu
Board Registry Runtime multi-board selection, GCC constructor auto-registration
Recovery UART-based recovery protocol, hardware pin trigger, factory reset
Flashing Unified eFlash tool wrapping 25 board-vendor tools behind a single CLI
Platforms ARM Cortex-M/A, RISC-V 32/64, Xtensa, x86_64, PowerPC, SPARC, SuperH, M68K β€” 83 board ports

πŸ— Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    Boot Flow                             β”‚
β”‚  ROM β†’ Stage-0 β†’ Stage-1 β†’ App (Linux / RTOS)           β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              Core Libraries (platform-agnostic)          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Boot    β”‚ β”‚ Firmware β”‚ β”‚ Multicoreβ”‚ β”‚ Board      β”‚  β”‚
β”‚  β”‚ Control β”‚ β”‚ Update   β”‚ β”‚ Boot     β”‚ β”‚ Config     β”‚  β”‚
β”‚  β”‚ & Slots β”‚ β”‚ Pipeline β”‚ β”‚ SMP/AMP  β”‚ β”‚ Pins/Mem   β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜  β”‚
β”‚       β”‚           β”‚            β”‚               β”‚         β”‚
β”‚  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚ Crypto β”‚  β”‚Transportβ”‚ β”‚ RTOS     β”‚  β”‚ Device     β”‚  β”‚
β”‚  β”‚ SHA-256β”‚  β”‚ XMODEM  β”‚ β”‚ Detect & β”‚  β”‚ Table &    β”‚  β”‚
β”‚  β”‚ CRC-32 β”‚  β”‚ YMODEM  β”‚ β”‚ Boot     β”‚  β”‚ Runtime Svcβ”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚              HAL + Board Registry                        β”‚
β”‚  eos_board_ops_t vtable β†’ dispatches to active board     β”‚
β”œβ”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ STM32β”‚ nRF52 β”‚ RPi4  β”‚ i.MX8 β”‚RISC-V β”‚ ESP32 β”‚ x86_64  β”‚
β”‚  F4  β”‚       β”‚       β”‚   M   β”‚  virt β”‚       β”‚  EFI    β”‚
β”‚  H7  β”‚ SAMD51β”‚       β”‚ AM64x β”‚SiFive β”‚       β”‚         β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“‚ Repository Structure

eboot/
β”œβ”€β”€ include/                  # Public headers (22 APIs)
β”œβ”€β”€ core/                     # Core logic (platform-agnostic C)
β”œβ”€β”€ hal/                      # HAL dispatch + board registry
β”œβ”€β”€ stage0/                   # Minimal first-stage bootloader
β”œβ”€β”€ stage1/                   # Stage-1 boot manager
β”œβ”€β”€ boards/                   # Board ports (83 platforms)
β”‚   β”œβ”€β”€ stm32f4/              #   ARM Cortex-M4 (reference)
β”‚   β”œβ”€β”€ stm32h7/              #   ARM Cortex-M7
β”‚   β”œβ”€β”€ nrf52/                #   ARM Cortex-M4F (BLE)
β”‚   β”œβ”€β”€ rpi4/                 #   ARM64 Cortex-A72
β”‚   β”œβ”€β”€ imx8m/                #   ARM64 Cortex-A53 (NXP)
β”‚   β”œβ”€β”€ riscv64_virt/         #   RISC-V 64 (QEMU)
β”‚   β”œβ”€β”€ esp32/                #   Xtensa LX6 (Espressif)
β”‚   β”œβ”€β”€ x86_64_efi/           #   x86_64 UEFI
β”‚   └── ...                   #   + 57 more
β”œβ”€β”€ tests/                    # Unit tests (native host)
β”œβ”€β”€ tools/                    # Host tools (eFlash, imgpack, signing)
β”œβ”€β”€ configs/                  # Boot + flash config schemas (YAML)
└── docs/                     # Documentation

🎯 Supported Boards

Board Architecture MCU / SoC Industry Use
STM32F4 ARM Cortex-M4 STM32F407 Motor control, sensors
STM32H7 ARM Cortex-M7 STM32H743 DSP, graphics
nRF52 ARM Cortex-M4F nRF52840 BLE wearables
SAMD51 ARM Cortex-M4F ATSAMD51 Arduino/Adafruit IoT
Raspberry Pi 4 ARM64 Cortex-A72 BCM2711 Edge gateways
NXP i.MX 8M ARM64 Cortex-A53 i.MX8M Mini Industrial HMI
TI AM64x ARM A53+R5F AM6442 Sitara PLCs, factory
RISC-V 64 virt RISC-V 64 QEMU virt Development
SiFive HiFive RISC-V U74 FU740 Linux eval
ESP32 Xtensa LX6 ESP32 Wi-Fi/BLE IoT
x86_64 EFI x86_64 UEFI PCs Edge appliances

πŸ–₯ Multicore / Multiprocessor Boot

Mode Description Example
SMP Same firmware, shared memory RPi4 (4Γ— A72), ESP32 (2Γ— Xtensa)
AMP Different firmware per core TI AM64x (R5F + A53)
Lockstep Identical code, safety-critical STM32H7 dual-core
#include "eos_multicore.h"

eos_multicore_start_smp(1, 0x08020000, 0x20010000);
eos_multicore_start_amp(0, EOS_SLOT_A, EOS_ARCH_ARM_R5);
eos_multicore_boot_all(core_configs, num_cores);
eos_multicore_wait_state(1, EOS_CORE_STATE_RUNNING, 5000);

πŸ“¦ Firmware Update Pipeline

Stream-based β€” never holds the full image in RAM:

#include "eos_fw_update.h"

eos_fw_update_ctx_t ctx;
eos_fw_update_begin(&ctx, EOS_SLOT_B);
while (data_available()) {
    eos_fw_update_write(&ctx, chunk, len);
}
eos_fw_update_finalize(&ctx, EOS_UPGRADE_TEST);

πŸ›‘ 22 Core Boot Services

# Service Header
1 Boot control (A/B slots) eos_bootctl.h
2 Image verification eos_image.h
3 Crypto (SHA-256, CRC-32) eos_crypto_boot.h
4 Firmware update (stream) eos_fw_update.h
5 Transport (XMODEM/YMODEM) eos_fw_transport.h
6 Firmware services API eos_fwsvc.h
7 Multicore boot eos_multicore.h
8 RTOS-aware boot eos_rtos_boot.h
9 Boot menu (UART) eos_boot_menu.h
10 Device table (UEFI-style) eos_device_table.h
11 Runtime services eos_runtime_svc.h
12 Board config macros eos_board_config.h
13 Board registry eos_board_registry.h
14 Boot policy engine boot_policy.c
15 Slot manager slot_manager.c
16 Recovery recovery.c
17 DDR/DRAM init + training eos_dram.h
18 PCI/PCIe enumeration eos_pci.h
19 Unified storage eos_storage.h
20 Power management eos_power.h
21 Clock tree init eos_clock.h
22 MPU config eos_mpu_boot.h

πŸ§ͺ Unit Tests

cmake -B build -DEBLDR_BUILD_TESTS=ON
cmake --build build
ctest --test-dir build --output-on-failure
Test Covers
test_bootctl Boot control block save/load, CRC, rollback
test_crypto SHA-256 against known vectors
test_device_table Device table create, add, validate
test_runtime_svc Runtime variable get/set/delete
test_board_config Pin/memory/IRQ config lookup
test_multicore Core state management, SMP/AMP init
test_board_registry Board register, find, activate

πŸš€ CI/CD

Workflow Schedule Coverage
CI Every push/PR Build matrix (Linux Γ— Windows Γ— macOS) + board sanity + tests
Nightly 2:00 AM UTC daily Full build + test + cross-compile + regression report
Weekly Monday 6:00 AM UTC Comprehensive build + 6 boards + dependency audit
EoSim Sanity 4:00 AM UTC daily EoSim install validation (3 OS Γ— 3 Python) + 7-platform simulation
Simulation Test 3:00 AM UTC daily QEMU/EoSim platform simulation across architectures
Release Tag v*.*.* Validate β†’ cross-compile β†’ GitHub Release with artifacts
git tag v0.1.0
git push origin v0.1.0

Related Projects

Project Repository Purpose
eos embeddedos-org/eos Embedded OS β€” HAL, RTOS kernel, drivers, services
ebuild embeddedos-org/ebuild Build system β€” YAML config, Ninja backend, packages
eipc embeddedos-org/eipc Inter-process communication β€” RPC, shared memory
eai embeddedos-org/eai AI/ML inference runtime β€” on-device models
eni embeddedos-org/eni Neural interface β€” BCI, assistive input
eApps embeddedos-org/eApps Cross-platform applications (C + LVGL)
eosim embeddedos-org/eosim Multi-architecture simulator
EoStudio embeddedos-org/EoStudio Design suite with LLM integration

Standards Compliance

This project is part of the EoS ecosystem and aligns with international standards including ISO/IEC/IEEE 15288:2023, ISO/IEC 12207, ISO/IEC/IEEE 42010, ISO/IEC 25000, ISO/IEC 25010, ISO/IEC 27001, ISO/IEC 15408, IEC 61508, ISO 26262, DO-178C, FIPS 140-3, POSIX (IEEE 1003), WCAG 2.1, and more. See the EoS Compliance Documentation for full details.

πŸ“œ License

MIT License β€” see LICENSE for details.

About

Project: Bootloader for Any Hardware

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors