Layers it depends on
LAYERDEPENDS, so a missing one fails when the layer is added rather than deep into a build.
meta-rauc supplies the rauc the agent shells out to. The agent talks to rauc install over D-Bus, so the image needs rauc and its service running.
meta-rust-bin supplies the toolchain. The agent needs Rust 1.85 — where edition 2024 was stabilised — and no released Yocto ships one that new: scarthgap has cargo 1.75, walnascar 1.84. meta-rust-bin packages prebuilt upstream toolchains and spans kirkstone through wrynose, so the Rust version stops being a function of the Yocto release. The recipe inherits cargo_bin from that layer rather than poky’s cargo.
That tradeoff is worth knowing before you adopt it. In meta-rust-bin’s own words, prebuilt toolchains “will never be able to support architectures or options not supported by the Rust team itself”, and the prebuilt standard library may be less efficient than a custom-compiled one. They are also upstream binaries rather than something your build system compiled, which matters if you have reproducibility or audit requirements.
Required DISTRO_FEATURES
Bothrauc and systemd have to be present:
rauc is meta-rauc’s requirement rather than this layer’s; without it meta-rauc warns and the image has no RAUC support to speak of.
Updating the crate list
Yocto fetches offline, so every crate is declared as a source rather than resolved by cargo duringdo_compile. After a Cargo.lock change:
nerves-hub-link-agent-crates.inc.
Configuring the agent
Packaging puts the binary and its unit in the image; it does not configure it. See Linux Agent for the TOML config, and the agent’sdocs/deploying.md for the service user, the device identifier and the rest of the deployment contract.
