Skip to content

ADR-002: OS Building Tool Selection

Accepted (2025-03-01)

paiOS needs a tool to build customized Debian-based OS images for various target platforms (Raspberry Pi, x86, etc.). The image building process must:

  1. Be reproducible: Same inputs produce identical outputs
  2. Support CI/CD: Integrate cleanly with GitHub Actions
  3. Be maintainable: Low learning curve for contributors
  4. Leverage Debian ecosystem: Use existing .deb packages rather than cross-compiling everything

Three tools were evaluated:

ToolConfigurationApproachComplexity
DebosYAMLUses Debian packagesLow
YoctoBitBake layersCross-compiles from sourceHigh
ElbeXMLUses Debian packages + VMMedium
ToolLearning CurveDocumentationOnboarding Time
DebosLow: Simple YAML recipesGood, examples availableHours
YoctoHigh: BitBake, layers, metadataExtensive but complexWeeks
ElbeMedium: XML + initvm conceptsModerateDays

Winner: Debos: Contributors can understand and modify recipes without specialized knowledge.

ToolApproachTypical Build Time
DebosDownloads pre-built .deb packagesMinutes
YoctoCross-compiles everything from sourceHours
ElbeDownloads packages, builds in VM10-30 minutes

Winner: Debos: Leverages Debian’s package repository instead of rebuilding the world.

ToolPackage SourceCustom Packages
DebosNative Debian reposAdd custom .deb via overlay
YoctoEverything from sourceRequires BitBake recipes
ElbeDebian repos + custom buildsBetter custom package support

Winner: Debos/Elbe tie: Both leverage Debian packages natively.

ToolContainer SupportGitHub Actions
Debosgodebos/debos Docker image✅ Works well
YoctoComplex, needs large runners⚠️ Needs 150GB+ storage
ElbeRequires nested VM (initvm)⚠️ Complex setup

Winner: Debos: Official Docker image simplifies CI/CD integration.

ToolSecurity Patches in ImagesPatch TurnaroundCVE Tracking
DebosVia Debian Security TeamHours–daysAutomatic via APT
YoctoManual integrationDays–weeksRequires layer maintenance
ElbeVia Debian Security TeamHours–daysAutomatic via APT

Winner: Debos/Elbe: Both inherit Debian’s mature security infrastructure for building images:

  • Debian Security Team monitors and patches vulnerabilities upstream
  • Rebuilding images pulls latest security fixes automatically
  • No custom CVE tracking required: Debian handles it upstream

Yocto requires manual effort: security patches must be backported into BitBake recipes.

We adopt Debos as the image building tool for paiOS.

Debos aligns with paiOS’s pragmatic philosophy:

  • KISS: YAML recipes are readable and maintainable
  • Don’t Reinvent the Wheel: Uses Debian’s existing package infrastructure
  • 80/20 Rule: Simple tool that covers our needs without complexity overhead
  • Low-Hanging Fruits: Fast iteration with quick build times

Yocto is the industry standard for deeply customized embedded Linux, but it’s over-engineering for the current phase of paiOS:

  1. Unnecessary complexity: We don’t need to cross-compile everything; Debian packages exist
  2. Steep learning curve: BitBake syntax and layer management takes weeks to master
  3. Long build times: Hours vs. minutes for equivalent images
  4. Resource intensive: Requires 150GB+ disk space and powerful build machines

Yocto would be the better choice if we needed:

  • Minimal footprint embedded systems (< 100MB)
  • Complete source control over every package
  • Complex BSPs from silicon vendors with proprietary components

Elbe is a solid middle-ground option, but has drawbacks:

  1. XML configuration: Less readable than YAML, harder to maintain
  2. initvm requirement: Runs builds inside a VM, complicating CI/CD
  3. Smaller community: Fewer examples and community resources than Debos

Elbe would be preferable if we needed:

  • Complex custom package builds from source
  • Strict license compliance tooling (Elbe has built-in license management)
  • Ubuntu image support (Elbe supports Ubuntu, Debos is Debian-only)
  • Fast builds: Minutes instead of hours
  • Easy onboarding: YAML recipes are self-documenting
  • Simple CI/CD: Docker container works out of the box
  • Debian-native: Direct access to Debian’s package ecosystem
  • Reproducible: Same recipe produces identical images
  • ⚠️ Debian-only: Cannot build non-Debian distributions
  • ⚠️ Privileged containers: CI needs --privileged flag for loop device access
  • Custom kernels: Supported via .deb packages: no need for Yocto. Radxa’s rsdk uses a similar Debian-native approach.
  • Reproducibility: Achieved via Debian Snapshots, Git-versioned recipes, and pinned Docker images.
  • CI/CD: Requires --privileged Docker flag for loop device access (GitHub Actions supports this natively).