Skip to main content
Version: 0.10.0

An image

Yoke reaches an embedded Linux image through a Yocto Project layer, meta-yoke, which builds what Yoke released into the packages an image installs. Each recipe compiles from the source a release published, pinned by its checksum. A build fetches everything first and then builds with the network off, so an image builds offline once its downloads are in place.

Taking the layer​

repositoryhttps://github.com/yoke-project/meta-yoke
branchmain — the one branch, for the Yocto Project's newest long-term series, wrynose, and no other
depends oncore; openembedded-layer and meta-python, both in meta-openembedded
licenceMIT

The layer carries no version of its own: an image takes it at a revision, as it takes every other layer. A revision that built once keeps building, and that is also how an image on another series pins one.

git clone https://github.com/yoke-project/meta-yoke.git
git -C meta-yoke checkout <revision>
BBLAYERS += " \
/path/to/meta-openembedded/meta-oe \
/path/to/meta-openembedded/meta-python \
/path/to/meta-yoke \
"

The image needs the distro features systemd and pam. systemd is the init system Yoke's units are written for. pam is what lets an account's user manager run, which the application form needs, and what yoke-auth asks when a channel requires its caller to sign in.

The packages, and where each goes​

One recipe per repository, and several packages per recipe, so that a device takes the runtime and leaves the tooling behind.

PackageHoldsGoes on
yoke-corethe Corea device
yokethe manager; it depends on yoke-corea device
yoke-guardianthe guardian, for the application forma device that runs applications under an account
yoke-auththe program the Core asks the host's authentication service througha device whose channels require a caller to sign in
yoke-packagingwhat the init system is given, belowa device
yoke-composethe composera workstation, never a device
yoke-conformancethe conformance suitea workstation, never a device
python3-yoke-proto, python3-yoke-sdkthe Python family, for a unit written in Pythona device that runs one
the C, C++ and Rust families' development packagesthe libraries, headers and build configuration a program is built againstthe build, not the device: the program carries them
yoke-sdk-gothe Go family's harnesses; a Go program compiles the library ina workstation
yoke-reference-*the example application's units that run on the host, and the example as a device runs itan image that shows the example

The verification tool is in no package. It checks Yoke's own tests and records, and an image has nothing to do with it.

What the init system is given​

yoke-packaging installs the files yoke ships, unchanged: the layer writes none of its own.

FileFor
/usr/lib/systemd/system/yoke.servicethe service form: the one deployment the init system runs, with yoke service exec
/usr/lib/systemd/user/yoke-guardian.servicethe application form: a user unit running yoke-guardian --boot for the account it is enabled for
/usr/lib/tmpfiles.d/yoke.confthe service form's directories, with their owners and modes
/usr/lib/sysusers.d/yoke.confthe group yoke-apps, whose members may install applications
/etc/yoke/core.yamlthe Core's configuration in the service form, kept across upgrades

Neither unit is enabled by installing the package.

  • In the service form, yoke.service starts the deployment installed on the host, so it is enabled once there is one. Without one it would start a refusal.
  • In the application form, yoke-guardian.service is enabled for the account that hosts the applications, and the account lingers, so that its user manager runs at boot with nobody signed in. The guardian then brings up every instance whose record wants it running (the instance record).

An image that prepares an instance before its first boot ends creates it with yoke instance create --running (instances): the record says the instance is to run, and no guardian is started for it. The account's guardian brings it up when its unit starts.

The image the layer is tested with​

meta-yoke builds and boots an image of its own on every change, under QEMU, on qemux86-64 and qemuarm64. It holds the runtime, the example as a device runs it, and an account in the application form. Its first boot installs the example and creates the instance running, and its guardian brings the instance up. The panel of the example then draws on the framebuffer. It is a test of the layer, not a product. Its recipes, yoke-example-image and yoke-example-host, are the worked example of everything above.