Thank you for your interest in contributing to eBootloader!
- Fork the repository
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes
- Run the build and tests locally
- Submit a pull request
| Tool | Minimum Version | Purpose |
|---|---|---|
| CMake | 3.16+ | Build system |
| GCC / Clang / MSVC | GCC 10+, Clang 12+, MSVC 2019+ | C11 compiler |
| Python | 3.8+ | Config generation scripts |
| PyYAML | 6.0+ | pip install -r requirements.txt |
| arm-none-eabi-gcc | 10+ | (optional) ARM Cortex-M cross-compilation |
| aarch64-linux-gnu-gcc | 10+ | (optional) AArch64 cross-compilation |
| riscv64-linux-gnu-gcc | 10+ | (optional) RISC-V 64 cross-compilation |
git clone https://github.com/embeddedos-org/eboot.git
cd eboot
cmake -B build -DEBLDR_BUILD_TESTS=ON
cmake --build build
ctest --test-dir build --output-on-failure# ARM Cortex-M (bare-metal)
cmake -B build-arm -DEBLDR_BOARD=stm32f4 \
-DCMAKE_TOOLCHAIN_FILE=toolchains/arm-none-eabi.cmake
cmake --build build-arm
# AArch64 Linux (e.g. RPi4)
cmake -B build-aarch64 -DEBLDR_BOARD=rpi4 \
-DCMAKE_TOOLCHAIN_FILE=toolchains/aarch64-linux-gnu.cmake
cmake --build build-aarch64
# RISC-V 64
cmake -B build-riscv -DEBLDR_BOARD=riscv64_virt \
-DCMAKE_TOOLCHAIN_FILE=toolchains/riscv64-linux-gnu.cmake
cmake --build build-riscvpip install -r requirements.txt
python scripts/generate_config.py configs/example_boot.yaml /tmp/generated/eboot includes 7 unit test suites that run natively on the host:
| 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 |
Run all tests:
cmake -B build -DEBLDR_BUILD_TESTS=ON
cmake --build build --config Release
ctest --test-dir build --output-on-failure -C ReleaseAll pull requests must pass the following CI checks before merging:
| Check | Platform | What It Validates |
|---|---|---|
| Build (ubuntu-latest) | Linux | GCC build + all 7 unit tests |
| Build (windows-latest) | Windows | MSVC build + all 7 unit tests |
| Build (macos-latest) | macOS | Clang build + all 7 unit tests |
| Config Generation | Linux | generate_config.py produces valid headers and linker scripts |
Before submitting a PR, ensure all checks pass:
# 1. Build + test on your host
cmake -B build -DEBLDR_BUILD_TESTS=ON
cmake --build build --config Release
ctest --test-dir build --output-on-failure -C Release
# 2. Config generation
pip install -r requirements.txt
python scripts/generate_config.py configs/example_boot.yaml /tmp/out/
test -f /tmp/out/eboot_generated_layout.h
test -f /tmp/out/eboot_generated_memory.ldThe nightly workflow runs additional cross-compilation checks that are not required for PRs but are monitored for regressions:
- Cross-compile for AArch64 Linux (
aarch64-linux-gnu-gcc) - Cross-compile for RISC-V 64 (
riscv64-linux-gnu-gcc) - Cross-compile for ARM Cortex-M (
arm-none-eabi-gcc)
- Standard: C11 (
-std=c11) - Warnings:
-Wall -Wextramust compile clean (zero warnings) - Platform guards: All platform-specific code must be guarded:
#if defined(__APPLE__)for macOS#if defined(_MSC_VER)for MSVC/Windows#if defined(__GNUC__) || defined(__clang__)for GCC/Clang#if defined(__ARM_ARCH)for ARM-specific code
- No
printfin production paths — useeos_hal_uart_send()for output - Include guards: Use
#ifndef HEADER_NAME_H/#define/#endif - Types: Use
<stdint.h>types (uint32_t,int8_t, etc.) - C++ compatibility: All public headers must have
extern "C"guards
Follow Conventional Commits:
feat: add SPI transport for firmware update
fix: bootctl CRC calculation on big-endian targets
docs: update board porting guide
ci: add ARM Cortex-M cross-compilation to nightly
chore: bump version to 0.4.0
- Code compiles with zero warnings on GCC, Clang, and MSVC
- All existing tests pass
- New features include unit tests in
tests/unit/ - Platform-specific code has
#ifdefguards for all 3 OS targets - No hardcoded paths (use platform abstractions)
- Commit messages follow conventional commits format
- Create
boards/<name>/board_<name>.cimplementingeos_board_ops_t - Create
boards/<name>/board_<name>.hwith memory map constants - Add the board to
CMakeLists.txtviaeboot_add_board() - Optionally add linker scripts (
<name>_stage0.ld,<name>_stage1.ld) - Add the board name to the help text in
CMakeLists.txt
- Use GitHub Issues with the appropriate label (
bug,enhancement,question) - Include: OS, compiler version, board target, and full error output
- For build failures: attach the full CMake configure + build log
By contributing, you agree that your contributions will be licensed under the MIT License.