Skip to content

Configuration Interface

meta-tolomeo exposes its shared settings as one namespaced set of TLM_ variables, owned by a few small classes.

One TLM_ Namespace for Shared Settings

Recipes defined the same path and mount variables ad hoc, each in its own recipe and again in the machine configurations, with no documented interface. The tolomeo_* classes define one namespaced set of TLM_ variables that an integrator can discover and override in a single place.

Every value is a weak default (?=), so a machine, distribution, or local.conf overrides it without editing a recipe. The defaults are the paths the recipes use, so adopting the classes changes no behavior until an integrator overrides a value.

One Source of Truth for OTA Values

The OTA feature spreads a set of values that must agree across several recipes — the SWUpdate bbappend, the tlm-swupdate service and its .toml, and the OTA monitor. If each recipe hardcoded them independently, changing one and forgetting another would break updates silently: the package would be written to one path and looked for at another.

tolomeo_ota owns these values, and every consumer reads them. Because TLM_OTA_FILE is derived from TLM_OTA_DIR and TLM_OTA_FILENAME, overriding the directory moves the download location, the checkpoint, and the descriptor together. The coupled paths cannot drift apart because there is only one place they are defined.

Missing Machine Variables Fail at Parse Time

Recipes that depend on machine-supplied variables need to fail loudly when those are missing. The check belongs at parse time, not in do_configure — validation is not configuration, and a do_configure check runs only after fetch and unpack, wasting that work before it reports the problem.

tolomeo_base registers a handler on the bb.event.RecipeParsed event that fails the parse when any variable named in REQUIRED_VARS is empty. Because it is a named event handler rather than anonymous Python, it is also clean under oelint.

Recipes Inherit the Narrowest Class

The classes form a small dependency graph: tolomeo_ota inherits tolomeo_base; tolomeo_config inherits tolomeo_ota and tolomeo_lib. A recipe inherits the narrowest class it needs — an OTA recipe inherits tolomeo_ota, a recipe that only installs units inherits tolomeo_lib — so it pulls in only the surface it uses.

A downstream layer that wants the whole configurable interface inherits tolomeo_config, the single umbrella front. The leaf classes never inherit the umbrella, which would create a cycle.

meta-tolomeo provides the interface, the defaults, and the validation; the integrator provides the machine-specific device and filesystem variables and any overrides their hardware requires.

See also