OTA Connect Developer Guide

BSP Integration

Adding support for a new board isn’t too hard, if you’re already familiar with Yocto and you have good documentation about your board’s hardware. In this guide, we’ll present conceptual information on what steps need to be taken, and then illustrate the concrete steps needed by taking an NXP board (the LS1043A-RDB) as an example.

All of the changes we’re making in this guide will be done in meta-updater. While you’re working on adding support for your new board, you should fork meta-updater. Once the support is ready, please feel free to make a pull request to get it merged into mainline meta-updater.

You can also add support for your board by writing a separate layer—​see meta-updater-raspberrypi for an example of this approach.

Key Concepts

There are two important concepts about OSTree and meta-updater that you need to know before proceeding with the integration.

  1. OSTree

    OSTree image deployments are installed inside the /ostree directory, and then hard-linked into place in /boot at boot time using a bootloader configuration script generated by OSTree when the image is verified.

    On an OSTree-managed system, OSTree can tell the bootloader which kernel, initramfs, and device tree blob to load. There are two basic ways to do this:

    • on a system with distroboot, OSTree sets u-boot environment variables to the appropriate values when it switches to a new deployment.

    • In systems that don’t support distroboot (e.g. GRUB) there will be a very minimal, simple bootloader configuration script that is fixed in the bootloader’s partition. The minimal script then points the bootloader to a second, "real" bootloader script, which is managed by OSTree. The way OSTree switches to a new deployment is by replacing the second script so that it points to the new deployment.

      OSTree will only switch to the new deployment once it has verified that the complete filesystem tree is present; libaktualizr will only instruct OSTree to switch once it has performed Uptane verification on the metadata directing it to switch.
  2. meta-updater

    The meta-updater layer contains recipes for the applications and libraries required by libaktualizr and OSTree, along with patches to upstream recipes when modifications are necessary. It also includes board and image classes for the OTA-specific needs of the boards it supports.

Steps in adding a new board