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
| repository | https://github.com/yoke-project/meta-yoke |
| branch | main — the one branch, for the Yocto Project's newest long-term series, wrynose, and no other |
| depends on | core; openembedded-layer and meta-python, both in meta-openembedded |
| licence | MIT |
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.
| Package | Holds | Goes on |
|---|---|---|
yoke-core | the Core | a device |
yoke | the manager; it depends on yoke-core | a device |
yoke-guardian | the guardian, for the application form | a device that runs applications under an account |
yoke-auth | the program the Core asks the host's authentication service through | a device whose channels require a caller to sign in |
yoke-packaging | what the init system is given, below | a device |
yoke-compose | the composer | a workstation, never a device |
yoke-conformance | the conformance suite | a workstation, never a device |
python3-yoke-proto, python3-yoke-sdk | the Python family, for a unit written in Python | a device that runs one |
| the C, C++ and Rust families' development packages | the libraries, headers and build configuration a program is built against | the build, not the device: the program carries them |
yoke-sdk-go | the Go family's harnesses; a Go program compiles the library in | a workstation |
yoke-reference-* | the example application's units that run on the host, and the example as a device runs it | an 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.
| File | For |
|---|---|
/usr/lib/systemd/system/yoke.service | the service form: the one deployment the init system runs, with yoke service exec |
/usr/lib/systemd/user/yoke-guardian.service | the application form: a user unit running yoke-guardian --boot for the account it is enabled for |
/usr/lib/tmpfiles.d/yoke.conf | the service form's directories, with their owners and modes |
/usr/lib/sysusers.d/yoke.conf | the group yoke-apps, whose members may install applications |
/etc/yoke/core.yaml | the Core's configuration in the service form, kept across upgrades |
Neither unit is enabled by installing the package.
- In the service form,
yoke.servicestarts 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.serviceis 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.