Skip to main content
Documentation

Yocto

The open-source meta-rugix layers integrate Rugix Ctrl into a Yocto-based distribution.

Layers and Recipes

The meta-rugix-core layer provides:

Board-specific layers (meta-rugix-rpi-tryboot, meta-rugix-rpi-uboot, meta-rugix-qemu-arm64-uboot, meta-rugix-qemu-x86_64-grub, meta-rugix-nxp-imx-uboot) wire up the WKS layout, slot mapping, and bootloader integration for specific boards. See the meta-rugix README for the full list. The board layers double as examples to adapt or to write your own BSP layer against, including the kas configurations under examples/.

Image Type rugixb

rugixb is a Yocto image type that produces an update bundle alongside the WIC image, in the same image build. Payloads are taken straight from the WIC partitions, so no separate bundle recipe is needed. This is the path used by every example in meta-rugix and the recommended way to ship bundles from a Yocto build.

Slot Mapping

A BSP layer declares its slot-to-source mapping in RUGIX_SLOTS, a space-separated list:

RUGIX_SLOTS:my-machine ?= "boot:2 system:4"

Each entry maps a slot name to the data that fills its payload:

  • name:N, a WIC partition number (e.g., system:4).
  • name:file:relative/path, a file in DEPLOY_DIR_IMAGE (e.g., boot:file:fitImage).
  • name:file:/absolute/path, an absolute path on disk (useful when a file lives in IMGDEPLOYDIR at bundle-build time).

The slot names must match those declared in the device’s system.toml.

Enabling the Image Type

In the image recipe (or via local.conf), add rugixb to IMAGE_FSTYPES. Adding rugixb.hash alongside it produces a sidecar <image>.rugixb.hash for use with --bundle-hash:

IMAGE_FSTYPES = "tar.bz2 wic wic.bmap rugixb rugixb.hash"

After the build, DEPLOY_DIR_IMAGE contains <image>.rugixb (and <image>.rugixb.hash if requested), ready to install with rugix-ctrl update install.

The bundle is not signed. Sign it after the build with Rugix Bundler.

rugix-bundle Class

For workflows where the bundle is built by a recipe separate from the image (for example, when assembling payloads from multiple image builds), the rugix-bundle class is available. The class assumes you build partitioned images with WIC and lets a bundle recipe pick up individual partitions as payloads:

inherit rugix-bundle

RUGIX_BUNDLE_PAYLOADS = "boot system"

RUGIX_PAYLOAD_boot[image] = "core-image-minimal"
RUGIX_PAYLOAD_boot[partition] = "2"

RUGIX_PAYLOAD_system[image] = "core-image-minimal"
RUGIX_PAYLOAD_system[partition] = "4"

RUGIX_BUNDLE_PAYLOADS is a space-separated list of payload names. Each name is then configured through a RUGIX_PAYLOAD_<name> variable with the following flags:

  • image (required): Image to take the partition from.
  • partition (required): Image partition to include as the payload.
  • slot (optional): Update slot for the payload (defaults to the payload name).

This class also does not produce signed bundles; sign them after the build with Rugix Bundler.