Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions core/UPSTREAM.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
vendored:
- path: core/eos
repository: https://github.com/embeddedos-org/eos.git
revision: 5544c98df94ff460c3a074fb4280c614b784b464
baseline_drift: 44
revision: dc13c59d89f228c501c2399bcab76b5244426af5
baseline_drift: 41

- path: core/eboot
repository: https://github.com/embeddedos-org/eBoot.git
Expand Down
9 changes: 8 additions & 1 deletion core/eos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,17 @@ add_library(eos_hal STATIC
hal/src/hal_extended_stubs.c
)

if(EOS_PLATFORM STREQUAL "linux" OR NOT CMAKE_CROSSCOMPILING)
# Which backend source is compiled, and which one eos_hal_init() falls back to,
# have to be the same decision: hal_common.c reads EOS_HAL_BACKEND_* (eos dc13c59).
if((EOS_PLATFORM STREQUAL "linux" OR NOT CMAKE_CROSSCOMPILING) AND UNIX)
target_sources(eos_hal PRIVATE hal/src/hal_linux.c)
target_compile_definitions(eos_hal PRIVATE EOS_HAL_BACKEND_HOST)
elseif(WIN32)
target_sources(eos_hal PRIVATE hal/src/hal_win32.c)
target_compile_definitions(eos_hal PRIVATE EOS_HAL_BACKEND_WIN32)
else()
target_sources(eos_hal PRIVATE hal/src/hal_rtos.c)
target_compile_definitions(eos_hal PRIVATE EOS_HAL_BACKEND_RTOS)
endif()

target_include_directories(eos_hal PUBLIC
Expand Down
22 changes: 11 additions & 11 deletions core/eos/GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,15 @@ Best for: nRF52840-DK, nRF52832-DK, or custom nRF52 boards.

### 1. Clone the repository
```bash
git clone https://github.com/anthropic/EoS.git
cd EoS
git clone https://github.com/embeddedos-org/eos.git
cd eos
```

### 2. Build the blink example
```bash
cd eos/examples/blink-gpio
cmake -B build \
-DCMAKE_TOOLCHAIN_FILE=../../toolchains/arm-none-eabi.cmake \
-DCMAKE_TOOLCHAIN_FILE=../../toolchains/arm-cortex-m4.cmake \
-DEOS_PRODUCT=iot
cmake --build build
```
Expand Down Expand Up @@ -96,11 +96,11 @@ Best for: STM32H743-Nucleo, STM32F4-Discovery, or custom STM32 boards.

### 1. Clone and build
```bash
git clone https://github.com/anthropic/EoS.git
cd EoS/eos/examples/blink-gpio
git clone https://github.com/embeddedos-org/eos.git
cd eos/examples/blink-gpio

cmake -B build \
-DCMAKE_TOOLCHAIN_FILE=../../toolchains/arm-none-eabi.cmake \
-DCMAKE_TOOLCHAIN_FILE=../../toolchains/arm-cortex-m4.cmake \
-DEOS_PRODUCT=industrial
cmake --build build
```
Expand Down Expand Up @@ -128,11 +128,11 @@ Build and run on your development machine — no MCU needed.

### 1. Clone and build
```bash
git clone https://github.com/anthropic/EoS.git
cd EoS/eos/examples/blink-gpio
git clone https://github.com/embeddedos-org/eos.git
cd eos/examples/blink-gpio

# Host build uses Linux HAL backend (simulated GPIO via sysfs/printf)
cmake -B build -DEOS_PRODUCT=iot -DEOS_BUILD_TESTS=ON
cmake -B build -DEOS_BUILD_TESTS=ON
cmake --build build
```

Expand Down Expand Up @@ -246,7 +246,7 @@ Once your application works, add secure boot with eboot:
### 1. Build eboot for your board
```bash
cd EoS/eboot
cmake -B build -DEBLDR_BOARD=nrf52
cmake -B build -DEBLDR_BOARD=nrf52 -DCMAKE_BUILD_TYPE=Debug
cmake --build build
```

Expand All @@ -264,7 +264,7 @@ This produces:
### 3. Sign and flash
```bash
# Create signing key (first time only)
cd EoS/eboot/tools
cd eBoot/tools
python3 sign_image.py --generate-key my-key.pem

# Sign firmware
Expand Down
20 changes: 19 additions & 1 deletion core/eos/NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,22 @@ Copyright (c) 2026 EoS Project
SPDX-License-Identifier: MIT

Monorepo: https://github.com/embeddedos-org/ebuild
Website: https://embeddedos-org.github.io
Website: https://embeddedos-org.github.io

--------------------------------------------------------------------------------
Third-party components
--------------------------------------------------------------------------------

This section is the dependency and licence inventory required by §26 of the
EmbeddedOS Platform Architecture & Ecosystem Design Document, and by ADR-017.

Every directory under third_party/ must appear here, with the licence it ships
under. This includes machine-learning model weights, whose licences are bespoke
agreements rather than SPDX identifiers and may restrict redistribution. scripts/check_third_party.py fails the build when one does not, and
scripts/generate_sbom.py emits the machine-readable form to sbom.json.

(none yet)

External source may only be added under third_party/, at a pinned revision, with
its licence copied verbatim. See third_party/README.md for the procedure and
ADR-017 for the reasoning.
4 changes: 0 additions & 4 deletions core/eos/backends/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@ add_library(eos_backends STATIC
src/cargo_backend.c
)

target_include_directories(eos_backends PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
)

target_link_libraries(eos_backends PRIVATE eos_core)

target_compile_options(eos_backends PRIVATE
Expand Down
81 changes: 0 additions & 81 deletions core/eos/backends/include/eos/backend.h

This file was deleted.

75 changes: 39 additions & 36 deletions core/eos/backends/src/autotools_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,61 +3,64 @@
// ISO/IEC 25000 | ISO/IEC/IEEE 15288:2023

#include "eos/backend.h"
#include "eos/log.h"
#include "eos/shell_cmd.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

static EosResult autotools_configure(EosBackend *self, const char *src_dir,
const char *build_dir, const char *toolchain_file,
const EosKeyValue *options, int option_count) {
(void)self;
(void)build_dir;
char cmd[2048];
int offset = snprintf(cmd, sizeof(cmd), "cd \"%s\" && ./configure", src_dir);

(void)self; (void)build_dir;
EosShellCmd cmd;
eos_shell_cmd_init(&cmd);
eos_shell_cmd_text(&cmd, "cd ");
eos_shell_cmd_arg(&cmd, src_dir);
eos_shell_cmd_text(&cmd, " && ./configure");
if (toolchain_file && toolchain_file[0]) {
offset += snprintf(cmd + offset, sizeof(cmd) - (size_t)offset,
" --host=%s", toolchain_file);
eos_shell_cmd_text(&cmd, " --host=");
eos_shell_cmd_arg(&cmd, toolchain_file);
}

for (int i = 0; i < option_count && offset < (int)sizeof(cmd) - 64; i++) {
offset += snprintf(cmd + offset, sizeof(cmd) - (size_t)offset,
" --%s=%s", options[i].key, options[i].value);
/* --<key>=<value>: the key is an option name, one word; the value quoted. */
for (int i = 0; i < option_count; i++) {
eos_shell_cmd_text(&cmd, " --");
eos_shell_cmd_word(&cmd, options[i].key);
eos_shell_cmd_text(&cmd, "=");
eos_shell_cmd_arg(&cmd, options[i].value);
}

EOS_INFO("Autotools configure: %s", cmd);
int rc = system(cmd);
return (rc == 0) ? EOS_OK : EOS_ERR_BUILD;
return eos_shell_cmd_run(&cmd, "Autotools configure");
}

static EosResult autotools_build(EosBackend *self, const char *build_dir, int jobs) {
(void)self;
char cmd[1024];
snprintf(cmd, sizeof(cmd), "make -C \"%s\" -j%d", build_dir, jobs > 0 ? jobs : 4);
EOS_INFO("Autotools build: %s", cmd);
int rc = system(cmd);
return (rc == 0) ? EOS_OK : EOS_ERR_BUILD;
EosShellCmd cmd;
eos_shell_cmd_init(&cmd);
eos_shell_cmd_text(&cmd, "make -C ");
eos_shell_cmd_arg(&cmd, build_dir);
eos_shell_cmd_text(&cmd, " -j");
eos_shell_cmd_int(&cmd, jobs > 0 ? jobs : 4);
return eos_shell_cmd_run(&cmd, "Autotools build");
}

static EosResult autotools_install(EosBackend *self, const char *build_dir,
const char *install_dir) {
static EosResult autotools_clean(EosBackend *self, const char *build_dir) {
(void)self;
char cmd[1024];
snprintf(cmd, sizeof(cmd), "make -C \"%s\" install DESTDIR=\"%s\"",
build_dir, install_dir);
EOS_INFO("Autotools install: %s", cmd);
int rc = system(cmd);
return (rc == 0) ? EOS_OK : EOS_ERR_BUILD;
EosShellCmd cmd;
eos_shell_cmd_init(&cmd);
eos_shell_cmd_text(&cmd, "make -C ");
eos_shell_cmd_arg(&cmd, build_dir);
eos_shell_cmd_text(&cmd, " distclean");
return eos_shell_cmd_run(&cmd, "Autotools clean");
}

static EosResult autotools_clean(EosBackend *self, const char *build_dir) {
static EosResult autotools_install(EosBackend *self, const char *build_dir,
const char *install_dir) {
(void)self;
char cmd[1024];
snprintf(cmd, sizeof(cmd), "make -C \"%s\" distclean", build_dir);
EOS_INFO("Autotools clean: %s", cmd);
int rc = system(cmd);
return (rc == 0) ? EOS_OK : EOS_ERR_BUILD;
EosShellCmd cmd;
eos_shell_cmd_init(&cmd);
eos_shell_cmd_text(&cmd, "make -C ");
eos_shell_cmd_arg(&cmd, build_dir);
eos_shell_cmd_text(&cmd, " install DESTDIR=");
eos_shell_cmd_arg(&cmd, install_dir);
return eos_shell_cmd_run(&cmd, "Autotools install");
}

void eos_backend_autotools_init(EosBackend *b) {
Expand Down
Loading
Loading