Build Pipeline spk-compile
spk-compile (Project SmechDeployV2) is the sovereign build orchestrator
for the entire Smech Labs OS stack. It is a single standalone Python 3 script with
zero external dependencies — no pip, no venv, no external build system abstraction.
Every build phase is implemented inline. SmechDeploy (the old collection of numbered
shell/Python scripts) is retired; spk-compile is the build system.
SmechDeploy is retired
The
Smech-Labs/SmechDeploy repository is archived. Do not use the old
numbered scripts (01_compile_core_system.sh etc.) — they are gone.
Use spk-compile.py for all OS builds.
Download
| File | Version |
|---|---|
| spk-compile.py | v2.2.0 |
curl -fsSL https://github.com/Smech-Labs/spk-compile/releases/download/v2.2.0/spk-compile.py -o spk-compile.py
python3 spk-compile.py --version
Full release notes: github.com/Smech-Labs/spk-compile/releases/tag/v2.2.0
Getting spk-compile
git clone https://github.com/Smech-Labs/spk-compile.git
cd spk-compile
Or call it directly from inside spk:
spk compile smechos
spk compile smechvisor --phase kde
spk compile --list smechos
spk locates spk-compile.py at
/usr/share/spk/spk-compile.py or
/opt/smechdeploy/spk-compile.py.
What it builds
| Output | Profile | Command |
|---|---|---|
| SmechOS root filesystem | smechos |
python3 spk-compile.py smechos |
| SmechOS install ISO | smechos |
python3 spk-compile.py smechos --iso install |
| SmechVisor root filesystem | smechvisor |
python3 spk-compile.py smechvisor |
| SmechVisor install ISO | smechvisor |
python3 spk-compile.py smechvisor --iso install |
| SmechVisor deploy shim ISO | smechvisor |
python3 spk-compile.py smechvisor --iso shim |
Prerequisites
- x86_64 Linux host (Debian or Ubuntu recommended)
- Python 3.8+ (stdlib only — no pip required)
- Root access (for
make install,ninja install, module installs) - Host packages:
build-essential cmake ninja-build meson cargo rustc xorriso grub-efi-amd64-bin grub-pc-bin libnewt-dev libdrm-dev libxkbcommon-dev libinput-dev - ~50 GB free disk space for source downloads and build artifacts
- Internet access (sources are downloaded on demand and cached)
Source tarballs are cached in ../spk-compile-sources/ (adjacent to --target).
Re-runs skip already-cached files.
Build Profiles
SmechOS
# Full build
sudo python3 spk-compile.py smechos
# Single phase
sudo python3 spk-compile.py smechos --phase kde
# Custom target path
sudo python3 spk-compile.py smechos --target /mnt/my_build_root
# Build install ISO
sudo python3 spk-compile.py smechos --iso install
SmechVisor
# Full build
sudo python3 spk-compile.py smechvisor
# Deploy shim ISO only
sudo python3 spk-compile.py smechvisor --iso shim
List phases
python3 spk-compile.py --list smechos
python3 spk-compile.py --list smechvisor
Phase Reference
SmechOS phases (15)
| # | Phase name | What it does |
|---|---|---|
| 1 | musl | Download + compile musl libc, install musl-gcc wrapper |
| 2 | userland | Compile GNU userland (bash, coreutils, grep, sed, tar, xz…) against musl |
| 3 | etc | Write /etc skeleton: hostname, hosts, fstab, passwd, group, os-release, locale.conf |
| 4 | openrc | Compile + deploy OpenRC, set default runlevel symlinks |
| 5 | inittab | Write /etc/inittab with OpenRC and autologin for smech on tty1 |
| 6 | grub | Compile GRUB 2.12 EFI (x86_64) + BIOS (i386) from source |
| 7 | qt-deps | Compile Qt6 modules: qtbase, qtdeclarative, qtsvg, qtwayland, qtmultimedia, qt5compat… |
| 8 | mesa | Compile Mesa with radeonsi, nouveau, swrast gallium + Vulkan AMD/nouveau drivers |
| 9 | kde | Compile KDE Frameworks 6.10.0 (30 modules) + Plasma 6.3.4 (13 components) |
| 10 | plasma-configure | Write SDDM config, autologin.conf, dbus + sddm OpenRC init scripts |
| 11 | kwin-deps | Copy KWin compositor runtime deps (libdrm, libxkbcommon, libinput) from build host |
| 12 | qt6uitools | Ensure Qt6UITools .so is present (copy from host if built-in install missed it) |
| 13 | kernel | Compile Linux 6.12.16: defconfig + KVM, VFIO, IOMMU, RDNA, EFI stub, virtio |
| 14 | patch-metadata | Patch /etc/os-release and KDE .desktop files for SmechOS branding |
| 15 | discover | Compile AppStream 1.0.3, PackageKit 1.3.0, install SPK backend script, compile Plasma Discover 6.3.4 |
SmechVisor phases (8)
| # | Phase name | What it does |
|---|---|---|
| 1 | musl | Same as SmechOS musl phase |
| 2 | userland | Same as SmechOS userland phase |
| 3 | etc | Same as SmechOS etc phase (no desktop entries) |
| 4 | openrc | Deploy OpenRC with hypervisor runlevel config |
| 5 | inittab | Write inittab (tty1 only, OpenRC) |
| 6 | kernel | Compile Linux 6.12.16 with KVM + VFIO + IOMMU mandatory |
| 7 | grub | Compile GRUB 2.12 EFI + BIOS with intel_iommu=on amd_iommu=on iommu=pt in boot cmdline |
| 8 | smechvisord | Fetch smechvisord binary, install to /usr/bin/, write OpenRC init script |
Source versions pinned
| Component | Version |
|---|---|
| Linux kernel | 6.12.16 |
| GRUB | 2.12 |
| musl libc | 1.2.5 |
| Qt6 | 6.8.2 |
| KDE Frameworks | 6.10.0 |
| KDE Plasma | 6.3.4 |
| Mesa | 24.3.4 |
| OpenRC | 0.54 |
| AppStream | 1.0.3 |
| PackageKit | 1.3.0 |
Adding a new phase
- Write a Python function
def phase_myfeature(target): ...inspk-compile.py. Usedownload(),extract(),cmake_install(), ormeson_install()helpers. - Add a tuple
("myfeature", phase_myfeature, "Description")toSMECHOS_PHASESorSMECHVISOR_PHASESat the correct position. - Run with
--phase myfeatureto test in isolation before committing to the full build.