If you already have a Yocto-based project that you want to update using HERE OTA Connect, you just need to do four things to get started:

  1. Clone the meta-updater layer and add it to your bblayers.conf.

  2. Clone a BSP integration layer (meta-updater-${PLATFORM}, e.g. meta-updater-raspberrypi) and add it to your conf/bblayers.conf. If your board isn’t supported yet, you could write a BSP integration for it yourself. See the Adding support for your board section for the details.

  3. Set up your distro. If you are using "poky", the default distro in Yocto, you can change it in your conf/local.conf to "poky-sota". Alternatively, if you are using your own or a third-party distro configuration, you can add INHERIT += " sota" to it, thus combining the capabilities of your distro with meta-updater features.

  4. 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}.-sdimg-ota e.g. core-image-raspberrypi3.rpi-sdimg-ota). You can control this behaviour through OTA Connect-related variables in your local.conf.

Supported boards

Currently supported platforms are

Adding support for your board

If your board isn’t supported yet, you can add board integration code yourself. The main purpose of this code is to provide a bootloader that will be able to use OSTree’s boot directory. In the meta-updater integration layers we have written so far, the basic steps are:

  1. Make the board boot into U-Boot.

  2. Make U-boot import variables from /boot/loader/uEnv.txt and load the kernel with initramfs and kernel command line arguments according to what is set in this file.

You may take a look into the Minnowboard or Raspberry Pi integration layers for examples.

Although in the BSP layers we’ve created so far we’ve used U-Boot, other boot loaders can be configured to work with OSTree as well.

  • OSTREE_REPO - path to your OSTree repository. Defaults to "${DEPLOY_DIR_IMAGE}/ostree_repo"

  • OSTREE_BRANCHNAME - the branch your rootfs will be committed to. Defaults to "ota"

  • OSTREE_OSNAME - OS deployment name on your target device. For more information about deployments and osnames see the OSTree documentation. Defaults to "poky".

  • OSTREE_INITRAMFS_IMAGE - initramfs/initrd image that is used as a proxy while booting into an OSTree deployment. Do not change this setting unless you are sure that your initramfs can serve as such a proxy.

  • SOTA_PACKED_CREDENTIALS - A zipped provisioning key bundle downloaded from OTA Connect, as a fully qualified path.

  • SOTA_CLIENT - Which SOTA client to install. This is mostly a legacy option; the default client, aktualizr, is our recommended solution. rvi-sota-client is our former client, written in Rust.