Skip to main content
Version: 031-rc11

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​

RecipeDescription
recipes-pv/pantavisor/pantavisor_git.bbCore Pantavisor runtime (C, cmake-based); SRCREV forwarded from pantavisor.inc
recipes-pv/images/pantavisor-initramfs.bbInitramfs image
recipes-pv/images/pantavisor-bsp.bbBSP image (generates pvrexport bundles)
recipes-pv/pvr/pvr_*.bbPVR CLI tool (Go-based)
recipes-pv/lxc6-pv/lxc6-pv_git.bbPantavisor-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​

ClassDescription
classes/pvbase.bbclassDefines PANTAVISOR_FEATURES variable and defaults
classes/pvrexport.bbclassPVR export functionality for images
classes/container-pvrexport.bbclassContainer pvrexport packaging
classes/pvr-ca.bbclassCertificate authority handling
classes/pvroot-image.bbclassRoot container image support

PANTAVISOR_FEATURES​

Controls which optional Pantavisor components are compiled in and installed. Defined in pvbase.bbclass:

FeatureDescription
dm-cryptStorage encryption
dm-verityContainer rootfs integrity verification
autogrowAutomatic partition growing
runcOCI 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
tailscaleTailscale VPN integration
debugDebug features
pvcontrolpv-ctrl socket and CLI tools (pvcurl, pvcontrol)
xconnectService mesh for container-to-container communication
xconnect-dbus-systembusD-Bus system bus support for xconnect
container-mdevPer-container mdev device-node hook (runs an mdev LXC mount hook on each container start)
rngdaemonRandom number generator daemon
squash-lz4LZ4 squashfs compression
squash-zstdZstd squashfs compression
rpi-trybootRaspberry Pi A/B boot partition support
bootchartdBoot timing analysis (writes to /; use rdinit=/sbin/bootchartd)
lxc-stableLXC 6.x (lxc6-pv), the default LXC runtime; on by default
lxc-nextLXC 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-deprecatedThe 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
wakelocksPM wakelocks + autosleep — adds the wakelock.cfg kernel fragment (see pantavisor wakelocks)
console-loggingBoot console logging on Raspberry Pi images
automodAutomatic kernel module loading (kmod in the initramfs)
caam-nxpNXP CAAM secure key support (caam-nxp.cfg kernel fragment, keyctl-caam)
dcpNXP DCP hardware-bound trusted keys (i.MX6ULL kernel patches, keyutils)
debug-hooksDebug hook scripts (-DPANTAVISOR_DEBUG_HOOKS=ON)
appengineContainer-hosted appengine build (-DPANTAVISOR_APPENGINE=ON); appended by the panta-appengine distro
pv-manifest-audit / pv-manifest-strictManifest 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: rngdaemon appears in the default string, but nothing in the layer gates on that token — pantavisor-initramfs.bb checks for a feature named rngd instead. Append rngd explicitly 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​

ReleaseStatus
scarthgapCurrent
kirkstoneLTS

Layer compatibility is declared in conf/layer.conf:

LAYERSERIES_COMPAT_meta-pantavisor = "kirkstone scarthgap"