Skip to content

01 — Vision, scope and requirements ​

Status: Draft v0.1 · Owner: TBD

Vision ​

Castmill OS is a slim, immutable, secure Linux distribution that turns supported hardware into a reliable Castmill signage player. Once installed and enrolled, a device should run unattended for years. It updates itself, recovers from failures without help, and never needs someone on site except for hardware faults.

Goals ​

  • A purpose-built OS for the Castmill player on Intel x86-64 and Raspberry Pi hardware.
  • Safe, automatic, atomic updates that can be rolled back, with security patches delivered quickly.
  • Hardware-accelerated graphics and video, 4K output and multiple displays.
  • Installation in minutes and zero-touch enrollment for large rollouts.
  • Small disk and memory footprint.
  • Fully open source and reproducible.

Non-goals ​

  • A general-purpose desktop or server distribution.
  • A package manager on the device. Software changes only through whole-image updates.
  • Running arbitrary third-party apps. (A sandboxed extension mechanism may come later; it is out of scope for v1.)
  • Supporting every ARM board. Hardware is added deliberately, by tiers.

Requirement levels ​

MUST = required for v1.0 · SHOULD = expected unless there's a documented reason · MAY = optional. IDs are stable and referenced from the other specs and tests.

Functional requirements ​

Security (see 04) ​

IDRequirementLevel
SEC-001The root filesystem is read-only and integrity-verified (dm-verity) at runtime.MUST
SEC-002Update bundles are cryptographically signed and verified before installation.MUST
SEC-003Verified boot chain on hardware that supports it (UEFI Secure Boot on x86-64, signed boot on Pi 5/CM5).MUST (x86) / SHOULD (Pi)
SEC-004No inbound network ports open by default.MUST
SEC-005Each device has a unique cryptographic identity used for mutual TLS with the Castmill backend.MUST
SEC-006Private keys are stored in a TPM when the hardware has one.SHOULD
SEC-007The data partition is encrypted at rest when a TPM is available.SHOULD
SEC-008Security updates are downloaded and staged automatically without operator action.MUST
SEC-009Each release ships an SBOM (SPDX) and a CVE report.MUST
SEC-010The player and agent run as unprivileged users with systemd sandboxing.MUST

Reliability (see 05) ​

IDRequirementLevel
REL-001A failed update is rolled back automatically, without human intervention.MUST
REL-002A new slot is committed only after a health check passes (network, player running, frame rendered).MUST
REL-003A hardware watchdog is enabled and fed by systemd.MUST
REL-004Crashed or hung player, compositor or agent is detected and restarted.MUST
REL-005Power loss at any moment, including during an update, never leaves the device unbootable.MUST
REL-006Writes to storage are minimised to extend SD/eMMC life (volatile logs, no swap on flash).MUST
REL-007Factory reset restores a working, unenrolled device by wiping the data partition.MUST
REL-008The device recovers on its own from network loss, display hotplug and time drift.MUST

Updates (see 03) ​

IDRequirementLevel
UPD-001Updates are A/B and atomic.MUST
UPD-002Downloading and writing an update never disturbs playback.MUST
UPD-003Reboots into a new version happen only inside a configurable maintenance window, unless an operator forces it.MUST
UPD-004Release channels (e.g. canary, beta, stable) and staged percentage rollouts are supported.MUST
UPD-005A rollout pauses automatically when the failure rate goes above a threshold.SHOULD
UPD-006Updates are streamed and only changed chunks are downloaded where possible.SHOULD

Display and media (see 06) ​

IDRequirementLevel
MED-001GPU-accelerated rendering through KMS/DRM and Mesa (no X11).MUST
MED-002Hardware video decoding on every tier-1 platform for the codecs Castmill delivers to that platform.MUST
MED-0034K60 output and 4K video playback with no dropped frames on tier-1 Intel hardware.MUST
MED-0044K video playback on Raspberry Pi 5 (HEVC).SHOULD
MED-005Multiple outputs with independent content, plus per-output resolution and rotation.MUST
MED-006Display power control on a schedule (HDMI-CEC and/or DDC/CI).SHOULD
MED-007The device reports its decode capabilities so the backend can pick suitable renditions.MUST

Device management (see 07) ​

IDRequirementLevel
MGT-001Remote reboot, screenshot, log collection and status reporting from Castmill.MUST
MGT-002An on-demand, time-limited, audited remote shell, opened only by an authorized operator.SHOULD
MGT-003Remote access keeps working when the player has crashed.MUST
MGT-004Health and telemetry: CPU, memory, temperature, storage wear, dropped video frames.SHOULD

Installation and provisioning (see 08) ​

IDRequirementLevel
PRV-001x86-64 unattended install from USB to internal storage in under 3 minutes.MUST
PRV-002Pi images can be flashed with standard tools (Raspberry Pi Imager, bmaptool, Etcher).MUST
PRV-003Zero-touch enrollment: pairing code or QR code on screen, or a pre-provisioning file for bulk enrollment.MUST
PRV-004Network-boot (PXE/HTTP boot) installation for large rollouts.MAY
PRV-005Wi-Fi and proxy configuration without a keyboard.MUST

Development (see development guide) ​

IDRequirementLevel
DEV-001Developers can run Castmill OS on an Apple Silicon Mac in a VM (QEMU/UTM with hardware virtualization), booting the same way as real hardware.MUST
DEV-002The development VM supports multiple virtual displays, A/B updates and rollback, so these can be tested before shipping.MUST
DEV-003Images for every target are built in CI for every branch and can be downloaded with one command.MUST
DEV-004Development images (SSH, root login, debug tools) are clearly separated from production images and never production-signed.MUST

Licensing and compliance (see ADR-0007) ​

IDRequirementLevel
LIC-001Every file in the repository has machine-readable licensing (REUSE compliant).MUST
LIC-002Production images contain no GPL-3.0, LGPL-3.0 or AGPL-3.0 packages, unless an ADR approves an exception.MUST
LIC-003Each release publishes the license manifest, SPDX SBOM and the corresponding source of all GPL/LGPL packages.MUST

Non-functional targets ​

These are initial targets. The prototype phase will validate them.

IDTarget
NFR-001Compressed image ≤ 350 MB (including Electron).
NFR-002Idle memory use of the OS plus agent, excluding the player, ≤ 150 MB.
NFR-003Time from power-on to first content ≤ 30 s on tier-1 hardware.
NFR-004Minimum supported RAM 2 GB; recommended 4 GB.
NFR-00530-day soak test with zero manual interventions per release candidate.
NFR-006Critical CVE fixes released within 7 days of upstream availability.

Open questions ​

  1. License Decided: permissive licenses, GPLv3-free production images (ADR-0007).
  2. Standalone use: will Castmill OS be usable without the Castmill backend, for example with other CMSs or by OEMs? This affects the update server choice (ADR-0005).
  3. Pi encryption: is at-rest encryption on Raspberry Pi (no TPM) required, or is CM5 with eMMC the recommended secure Pi option?
  4. Player delivery: does the player ship only inside the OS image, or can its web assets update independently? (Current proposal: inside the image. See 02.)
  5. Branding and naming of images and channels, and whether OEM/white-label builds are needed (own logo, backend URL and name). For now the boot logo, backend URL and player URL are build-time variables in meta-castmill, so a white-label build would be a configuration change, not a fork.

Documentation licensed under CC BY 4.0. Code under MIT and Apache-2.0.