Add OTA functionality to an existing Yocto project
If you already have a Yocto-based project, you can start your functional integration with HERE OTA Connect by following these four steps:
-
Clone the meta-updater layer and add it to your bblayers.conf.
-
Clone a BSP integration layer (
meta-updater-${PLATFORM}
, e.g. meta-updater-raspberrypi) and add it to yourconf/bblayers.conf
. If your board isn’t supported yet, you could write a BSP integration for it yourself. See Adding support for your board for more details. -
Set up your distro. If you are using "poky", the default distro in Yocto, you can change it in your
conf/local.conf
topoky-sota
or topoky-sota-systemd
. Alternatively, if you are using your own or a third-party distro configuration, you can add the following parameters to it, thus combining the capabilities of your distro with meta-updater features.INHERIT += " sota" DISTRO_FEATURES_append = " sota systemd usrmerge"
-
Create a provisioning key and add it to your
local.conf
.
You can then build your image as usual, with bitbake. After building the root file system, bitbake will then create an OSTree-enabled version of it, commit it to your local OSTree repo, and push it to OTA Connect. Additionally, a live disk image will be created (normally named ${IMAGE_NAME}.wic
e.g. core-image-minimal-raspberrypi3.wic
).
See also: