Yocto integration¶
Overview¶
Kynetics maintains meta-updatefactory, a layer designed to facilitate the integration of Update Factory in embedded Linux OSes built using the Yocto project. The layer provides an easy way to add support for:
This section provides guidance to set up and configure meta-updatefactory to build OS images for the following supported boards:
- Raspberry Pi (RPi 4B)
- Boundary Devices (Nitrogen6x, Nitrogen8M)
- Toradex (Apalis iMX6)
- Variscite (VAR-SOM-MX7)
The layer makes it easy to expand support to other boards.
Required layers¶
Here you will find references to set up a host machine with all the required Yocto layers to build an embedded Linux OS with Update Factory support.
Poky (basic layer)¶
See the Yocto Quick Start documentation to setup a host machine to build an embedded Linux OS with the poky layer.
Hardware layers¶
All supported hardware vendors provide a Yocto BSP and guidance on how to build it. Have a look at the following links for more information:
meta-swupdate layer¶
meta-updatefactory depends on meta-swupdate. Refer to the "Building with Yocto" section in SWUpdate's documentation to customize SWUpdate configuration.
meta-updatefactory integration¶
Once all the required layers are in place clone meta-updatefactory alongside the other layers:
git clone https://github.com/Kynetics/meta-updatefactory.git -b <branch>
bblayers.conf
:
...
${BSPDIR}/sources/meta-swupdate \
${BSPDIR}/sources/meta-updatefactory \
...
Add the following snippet in the OS image recipe:
require <relative-path-to>/recipes-images/images/swupdate-regular.inc
Note
If you are building for Raspberry Pi, you have to enable the U-Boot support by setting RPI_USE_U_BOOT = "1"
in the local.conf
Partitioning scheme¶
It is possible to provide a custom .wks
file (see the Yocto reference manual for the wks syntax) in your Yocto layer.
The partitioning scheme requirements for meta-updatefactory are the following:
- a
recovery
partition that holds a minimal "recovery OS" to install the updates in single copy mode - an
updates
partition that holds the.swu
update files that will be installed by SWUpdate.
Variables in /etc/swupdate/swupdate.env
allow customizing names and directories, if needed:
SWUPDATE_UPDATES_DIR=/updates
UPDATES_PART_LABEL=updates
UPDATES_MOUNTPOINT=/updates
We recommend using the provided .wks
files to begin with:
- For all supported boards except the Raspberry Pi:
uf-boot-root-recovery-updates.wks
- For the Raspberry Pi:
uf-rpi-boot-root-recovery-updates.wks
If using the above .wks
files you can customize the boot
, root
and updates
partition sizes with the following bitbake variables:
UF_BOOT_PART_SIZE
UF_ROOT_PART_SIZE
UF_UPDATES_PART_SIZE