Custom Update Agents¶
This section shows how to create a custom update agent, “SOTA client” for your platform. aktualizr-lite is a general purpose SOTA client that fits many needs. However, some types of products require more control over the update agent than aktualizr-lite and it’s “hooks” system provides. In these cases, a custom SOTA client can be written in C++ using the aktualizr-lite API.
Using the custom-sota-client¶
The meta-lmp layer includes a recipe that will run aktualizr-lite’s example SOTA client. This serves as a great starting place to experiment. Later, it can serve as an example to copy/paste into Factory specific recipe.
Setting up the files¶
Users can build the custom client into their LmP image with a simple
git clone -b devel https://source.foundries.io/factories/<factory>/meta-subscriber-overrides.git cd meta-subscriber-overrides echo 'SOTA_CLIENT = "custom-sota-client"' >> conf/machine/include/lmp-factory-custom.inc
Forking the custom-sota-client¶
The procedure for producing a factory-specific SOTA client can be by:
- Create a Git repository with custom code. Copying the
examples/custom-client-cxxdirectory is a good place to start.
- Copy the
custom-sota-clientrecipe from meta-lmp into the factory’s meta-subscriber-overrides.git’s
- Custom the
custom-sota-client_git.bbGit references to point at the new repository.