Skip to main content

One post tagged with "Yocto"

View All Tags

Build in a systemd-nspawn container

· 3 min read
Louis
Embeded Linux and Yocto developer

For general information about systemd-nspawn, see:

The container is a directory under /var/lib/machines that systemd boots. One file controls it: the nspawn config (/etc/systemd/nspawn/<name>.nspawn).

Why build in a systemd-nspawn container?​

This guide is for cross-building (e.g. Yocto) against an old distribution without touching the host. systemd-nspawn gives you:

  • an old distribution, in a chroot that systemd manages for you
  • fine control over resources such as CPUs and memory
  • easy access to the journal from the host
  • nothing more than systemd to install