Shared tooling that lives under tools/ in the source tree. Two things matter
about this directory:
It holds the CMake build infrastructure every module uses to compile, plus operator helper scripts for talking to a running agent.
tools/is packaged into the installation.deb, so everything here is available on a deployed node even when the yunetas source tree is absent — unlikescripts/, which is repo-only.
tools/
├── cmake/
│ └── project.cmake # master build configuration, included by every module
└── agent/
└── sync_binaries.py # reconcile built yunos vs the agent's installed setcmake/project.cmake — build infrastructure¶
project.cmake is the single build-configuration file included by every
CMakeLists.txt in the project — kernel libraries, modules, yunos, utils,
tests, performance, and stress. It gives them a consistent compiler setup,
library definitions, and install paths, all driven by the Kconfig .config
file generated by menuconfig.
What it provides:
Loads
${YUNETAS_BASE}/.configand turns everyKEY=VALUEinto a CMake variable (y→1,n→0,"string"→string).add_yuno_executable(name ...)— the wrapper used by all yuno, test, performance and stress executables.Install destinations: headers →
outputs/include, static libs →outputs/lib, yuno binaries →outputs/yunos. (CLI utilities underutils/c/install to/yuneta/bin— see Utilities.)Pre-defined link variables (
YUNETAS_KERNEL_LIBS,YUNETAS_EXTERNAL_LIBS,OPENSSL_LIBS/MBEDTLS_LIBS, …) that modules pick from in theirtarget_link_libraries().ESP32 awareness: skips the Linux-only
_GNU_SOURCE, external paths and linker flags when building under ESP-IDF.
Every module includes it with the same boilerplate:
cmake_minimum_required(VERSION 3.11)
project(my_module C)
if(DEFINED ENV{YUNETAS_BASE} AND IS_DIRECTORY "$ENV{YUNETAS_BASE}")
set(YUNETAS_BASE "$ENV{YUNETAS_BASE}")
elseif(IS_DIRECTORY "/yuneta/development/yunetas")
set(YUNETAS_BASE "/yuneta/development/yunetas")
else()
message(FATAL_ERROR "YUNETAS_BASE not found.")
endif()
include("${YUNETAS_BASE}/tools/cmake/project.cmake")The full reference (every variable, the conditional library table, the manual
CMake invocation) lives in tools/README.md.
agent/ — operator helper scripts¶
Helpers for talking to a running yuneta_agent.
sync_binaries.py— reconcile the freshly built yunos against the agent’s installed set and push the differences viainstall-binary/update-binary, with confirmation.