Configuration Classes¶
The tolomeo_* classes expose the configurable surface an integrator overrides when consuming meta-tolomeo. They
define a namespaced TLM_ variable interface, a parse-time required-variable check, and shared install helpers. All
variables are weak (?=), so a machine, distribution, or local.conf can override them. A recipe inherits the
narrowest class it needs; a downstream layer inherits tolomeo_config for the whole interface.
Classes¶
| Class | Inherits | Provides |
|---|---|---|
tolomeo_base |
— | Filesystem-layout variables and the required-variable check |
tolomeo_ota |
tolomeo_base |
OTA/update path variables — the single source of truth for updates |
tolomeo_install |
— | do_install helper functions |
tolomeo_config |
tolomeo_ota, tolomeo_install |
Umbrella front-end for the whole interface (tolomeo_base transitively) |
Filesystem-layout variables¶
Defined by tolomeo_base.
| Variable | Default | Set in | Description |
|---|---|---|---|
TLM_DATA_DIR |
/data |
class default / machine / distro / local.conf | Persistent writable mount point |
TLM_CERTS_DIR |
/certs |
class default / machine / distro / local.conf | Device certificate mount point |
TLM_APP_DIR |
/app |
class default / machine / distro / local.conf | Application partition mount point |
TLM_SHARED_DIR |
/shared |
class default / machine / distro / local.conf | Shared data mount point |
TLM_CONFIGDIR |
${sysconfdir}/tolomeo |
class default / machine / distro / local.conf | ToloMEO configuration directory (/etc/tolomeo) |
TLM_CERTS_MOUNT_OPTIONS |
defaults |
class default / machine | Mount options for the certificate partition |
TLM_APP_MOUNT_OPTIONS |
defaults |
class default / machine | Mount options for the application partition |
The matching device and filesystem variables (TLM_CERTS_DEVICE, TLM_CERTS_FSTYPE, TLM_APP_DEVICE,
TLM_APP_FSTYPE, and the TLM_SHARED_* pair) have no class default — the machine configuration supplies them. See
Machine Configuration.
OTA variables¶
Defined by tolomeo_ota. These values are coupled across the SWUpdate bbappend, the tlm-swupdate service and its
.toml, and ota-monitor; consumers read them so they cannot drift apart. Override TLM_OTA_DIR and
TLM_OTA_FILENAME to move the coupled paths together rather than setting TLM_OTA_FILE directly.
| Variable | Default | Set in | Description |
|---|---|---|---|
TLM_OTA_DIR |
${TLM_DATA_DIR}/tolomeo |
class default / machine / distro / local.conf | Directory the OTA package and state are written to |
TLM_OTA_FILENAME |
ota.pkg |
class default / machine / distro / local.conf | Name the downloaded package is saved under |
TLM_OTA_FILE |
${TLM_OTA_DIR}/${TLM_OTA_FILENAME} |
derived | Full path SWUpdate installs from |
TLM_OTA_CHECKPOINT |
${TLM_OTA_DIR}/ota-service.yml |
class default / machine / distro / local.conf | OTA state snapshot, so an interrupted update survives a restart |
TLM_OTA_DESCRIPTOR |
${sysconfdir}/swupdate/conf.d/descriptor.env |
class default / machine / distro / local.conf | Descriptor file SWUpdate writes and ota-monitor watches |
Required-variable validation¶
tolomeo_base validates that the variables named in REQUIRED_VARS are non-empty. The check runs once at parse time
on the bb.event.RecipeParsed event — not in do_configure — so a misconfiguration fails before any fetch or build
work.
| Variable | Default | Set in | Description |
|---|---|---|---|
REQUIRED_VARS |
"" |
recipe | Space-separated variable names that must be non-empty at parse time |
A recipe sets REQUIRED_VARS to the machine-supplied variables it depends on, for example:
When a listed variable is empty, parsing stops with:
Install helpers¶
Defined by tolomeo_install. Inherit the class and call the helpers from do_install.
| Helper | Installs | Mode |
|---|---|---|
install_systemd_units <srcdir> <destdir> |
*.service and *.path at the top of srcdir |
0644 |
install_scripts <srcdir> <destdir> |
*.sh at the top of srcdir |
0755 |
Both create destdir, and both warn and return without error when srcdir does not exist.
inherit tolomeo_install
do_install() {
install_systemd_units "${S}/systemd" "${D}${systemd_system_unitdir}"
install_scripts "${S}/scripts" "${D}${bindir}"
}
See also
- Configure meta-tolomeo for Your Machine — override the
TLM_interface from your layer - Configuration Classes — why the interface is designed this way
- Machine Configuration — the device and filesystem variables the machine supplies