Skip to main content

meta-pantavisor 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/lxc-pv/lxc-pv_git.bbPantavisor-specific LXC fork

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
tailscaleTailscale VPN integration
debugDebug features
pvcontrolpv-ctrl socket and CLI tools (pvcurl, pvcontrol)
xconnectService mesh for container-to-container communication
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)

Default: dm-crypt dm-verity autogrow runc tailscale debug rngdaemon pvcontrol xconnect container-mdev

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 container-mdev "

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"