Skip to main content
Version: 0.14.0

Building and booting

One command builds the image: the machine's file and the form's, joined by a colon, both named from the directory the layers are in, and the build goes into KAS_BUILD_DIR (where the build goes). kas checks the layers out if they are not, writes the configuration, and runs BitBake; the first build of a machine takes hours, and one after it minutes.

QEMU emulates a machine on this one, and the build makes the QEMU it boots with. qemux86-64 is a 64-bit x86 machine, which a 64-bit x86 build machine runs at nearly its own speed with KVM; qemuarm64 is a 64-bit Arm machine, emulated instruction by instruction, whose boot takes minutes.

machine=qemux86-64
export KAS_BUILD_DIR="$HOME/yoke-yocto/build-$machine"
kas build meta-yoke/kas/$machine.yml:meta-yoke/kas/$form.yml

The image is under $KAS_BUILD_DIR/tmp/deploy/images/$machine/, as $image-$machine.rootfs.ext4. Boot it with runqemu, in the build's environment, which kas shell sets up; the console is this terminal:

kas shell meta-yoke/kas/$machine.yml:meta-yoke/kas/$form.yml -c "runqemu $machine $image ext4 nographic slirp kvm"

kvm and the device are for qemux86-64 on a machine with KVM; for qemuarm64, or where /dev/kvm does not exist, leave both out. The machine stops with poweroff at its prompt, or with Ctrl-a x from outside it.

What the first boot shows​

Sign in as root, with no password, on any console. The system is up when systemctl is-system-running --wait says running. What follows reads the same under QEMU and on a board.

The account lingers, and its guardian has run, with nobody signed in as it:

loginctl show-user apps -p Linger -p State
systemctl --user -M apps@ is-enabled yoke-guardian.service
systemctl --user -M apps@ show yoke-guardian.service -p Result --value
State=lingering
Linger=yes
enabled
success

The guardian is not running, and that is right: it brings up the instances whose record wants them running and stays to watch them, and with no instance it has nothing to watch, so it ends. It runs again at every boot.

It has no instance yet, and the service form's unit is not used:

su -s /bin/sh apps -c 'yoke instance list'
systemctl is-enabled yoke.service
disabled

The account is ready for an application: shipping it installs one and creates its instance.

Say that you installed it: I installed Yoke asks three things — which form, which host or board, which release — and nothing else. It is how the project learns where Yoke runs without its help.