Skip to main content

Overview

Source Code on GitHub

stone is a CLI for managing Avocado stones. It takes a JSON manifest that describes an OS image — its storage device, partition layout, per-partition images, provisioning profiles, and OTA update strategy — plus a set of build artifacts, and turns them into the concrete outputs that provision and update a device: raw disk images, FAT images, and OS bundles.

Capabilities

  • Manifest-driven builds — a single manifest.json is the source of truth for the storage device, partitions, images, provisioning, and update layout.
  • Image assembly — builds FAT images (FAT12/16/32) from file lists and full disk images from fwup templates, resolving partition offsets and sizes into the environment fwup expects.
  • OS bundles — packages boot/OS artifacts and a generated bundle.json into a compressed .aos archive for OTA and provisioning. The .aos format is consumed on-device by avocadoctl.
  • Provisioning — builds the artifacts and runs a per-target provision profile script to flash or image a device, passing partition geometry and device metadata through as environment variables.
  • Manifest overlays — deep-merges overlay files onto a base manifest (last wins) so one base can be specialized per target or per environment.

The manifest

Every command operates on a manifest — a JSON document with these top-level sections:

SectionRequiredPurpose
runtimeyesPlatform, architecture, update strategy, and the provisioning entry point.
storage_devicesyesDevices, their partition layout, and the images that fill each partition.
provisionnoProvisioning profiles, their scripts, and the environment they receive.
updatenoHow OS artifacts map to A/B slots for OTA, and how a slot is activated.

See Usage for the full manifest field reference and Commands for the command reference.

The pipeline

The commands form a pipeline from manifest to device. Each is independently runnable:

describe-manifest inspect a manifest (human-readable summary)
validate check every file the manifest references is present
create stage all referenced inputs into an output directory
bundle build images + bundle.json, package into an .aos
provision build images and run the provision profile against a target
  • avocadoctl applies the .aos bundles stone produces, using A/B partition switching on-device.
  • Provisioning field contract describes the optional provision.fields metadata that lets tooling such as avocado-desktop render input controls for provisioning variables.