Overview
meta-pantavisor is the Yocto/OpenEmbedded layer that builds Pantavisor-based BSP images for embedded Linux products. It provides recipes, BitBake classes, and KAS configurations for producing initramfs images and container pvrexport bundles.
Directory Structure
meta-pantavisor/
├── classes/ # BitBake classes
├── conf/ # Layer and distro configuration
│ └── multiconfig/ # Per-multiconfig TMPDIR settings
├── dynamic-layers/ # Conditional recipes for other layers
├── kas/ # KAS configuration fragments
│ ├── machines/ # Per-machine configurations
│ └── platforms/ # Platform-specific layer includes
├── recipes-containers/
│ └── pv-examples/ # Example containers for xconnect testing
├── recipes-pv/ # Core pantavisor recipes
│ ├── images/ # Appengine and BSP image recipes
│ ├── pantavisor/ # Pantavisor runtime
│ └── pvr/ # PVR tool
├── recipes-devtools/ # Development tools (json-sh, fdisk)
└── wic/ # WIC disk image layout files
Key Recipes
| Recipe | Description |
|---|---|
recipes-pv/pantavisor/pantavisor_git.bb | Core Pantavisor runtime (C, cmake-based); SRCREV forwarded from pantavisor.inc |
recipes-pv/images/pantavisor-initramfs.bb | Initramfs image |
recipes-pv/images/pantavisor-bsp.bb | BSP image (generates pvrexport bundles) |
recipes-pv/pvr/pvr_*.bb | PVR CLI tool (Go-based) |
recipes-pv/lxc6-pv/lxc6-pv_git.bb | Pantavisor-specific fork of LXC, the OS-level container runtime containers run under (LXC 6, the default; lxc7-pv and lxc-pv are the LXC 7 and LXC 3 forks, picked with the lxc-next and lxc-deprecated features) |
BitBake Classes
| Class | Description |
|---|---|
classes/pvbase.bbclass | Defines PANTAVISOR_FEATURES variable and defaults |
classes/pvrexport.bbclass | PVR export functionality for images |
classes/container-pvrexport.bbclass | Container pvrexport packaging |
classes/pvr-ca.bbclass | Certificate authority handling |
classes/pvroot-image.bbclass | Root container image support |
PANTAVISOR_FEATURES
Controls which optional Pantavisor components are compiled in and installed. Defined in pvbase.bbclass:
| Feature | Description |
|---|---|
dm-crypt | Storage encryption |
dm-verity | Container rootfs integrity verification |
autogrow | Automatic partition growing |
runc | OCI runtime support (a Pantavisor runtime build option — see the pantavisor project for details). Containers created via pvr app add are LXC-based regardless of this flag, as described throughout this layer's develop guides |
tailscale | Tailscale VPN integration |
debug | Debug features |
pvcontrol | pv-ctrl socket and CLI tools (pvcurl, pvcontrol) |
xconnect | Service mesh for container-to-container communication |
xconnect-dbus-systembus | D-Bus system bus support for xconnect |
container-mdev | Per-container mdev device-node hook (runs an mdev LXC mount hook on each container start) |
rngdaemon | Random number generator daemon |
squash-lz4 | LZ4 squashfs compression |
squash-zstd | Zstd squashfs compression |
rpi-tryboot | Raspberry Pi A/B boot partition support |
bootchartd | Boot timing analysis (writes to /; use rdinit=/sbin/bootchartd) |
lxc-stable | LXC 6.x (lxc6-pv), the default LXC runtime; on by default |
lxc-next | LXC 7.x (lxc7-pv) instead of LXC 6.x; needs Linux 5.12+ and a cgroup v2 host; also available as the kas/with-lxc-next.yaml fragment |
lxc-deprecated | The old LXC 3.x (lxc-pv) instead of LXC 6.x; wins over lxc-next if both are set; also available as the kas/with-lxc-deprecated.yaml fragment |
wakelocks | PM wakelocks + autosleep — adds the wakelock.cfg kernel fragment (see pantavisor wakelocks) |
console-logging | Boot console logging on Raspberry Pi images |
automod | Automatic kernel module loading (kmod in the initramfs) |
caam-nxp | NXP CAAM secure key support (caam-nxp.cfg kernel fragment, keyctl-caam) |
dcp | NXP DCP hardware-bound trusted keys (i.MX6ULL kernel patches, keyutils) |
debug-hooks | Debug hook scripts (-DPANTAVISOR_DEBUG_HOOKS=ON) |
appengine | Container-hosted appengine build (-DPANTAVISOR_APPENGINE=ON); appended by the panta-appengine distro |
pv-manifest-audit / pv-manifest-strict | Manifest audit of the built image; strict fails the build on a mismatch |
The LXC choice also sets the cgroup layout: lxc-stable defaults to
PV_SYSTEM_CGROUP_VERSION=auto, lxc-next to 2 and lxc-deprecated to
1. The layer adds no kernel options; with 2 the kernel build fails unless
the kernel has CONFIG_BPF_SYSCALL=y and CONFIG_CGROUP_BPF=y. To force a
version, set PANTAVISOR_CGROUP_VERSION:<machine> = "1" or
PANTAVISOR_CONFIG[PV_SYSTEM_CGROUP_VERSION] = "1". See
Selecting the cgroup version
and Pantavisor cgroups.
Default: dm-crypt dm-verity autogrow runc tailscale debug rngdaemon pvcontrol xconnect xconnect-dbus-systembus container-mdev lxc-stable
Caution:
rngdaemonappears in the default string, but nothing in the layer gates on that token —pantavisor-initramfs.bbchecks for a feature namedrngdinstead. Appendrngdexplicitly if you need the RNG daemon.
The += vs :append Pitfall
pvbase.bbclass sets defaults via ??= (weak default operator):
PANTAVISOR_FEATURES ??= " dm-crypt dm-verity autogrow runc tailscale debug rngdaemon pvcontrol xconnect xconnect-dbus-systembus container-mdev lxc-stable "
In distro includes, you must use :append or :remove — never +=:
# WRONG — clobbers ??= defaults, silently drops xconnect, pvcontrol, rngdaemon
PANTAVISOR_FEATURES += "appengine"
# CORRECT — preserves ??= defaults and appends
PANTAVISOR_FEATURES:append = " appengine"
Supported Yocto Releases
| Release | Status |
|---|---|
| scarthgap | Current |
| kirkstone | LTS |
Layer compatibility is declared in conf/layer.conf:
LAYERSERIES_COMPAT_meta-pantavisor = "kirkstone scarthgap"