Build System
VyomaOS uses a Docker-based build system to ensure fully reproducible builds across any development machine.
Build Pipeline
Section titled “Build Pipeline”make kernel → out/bzImage (2.3 MB)make supervisor → supervisor binary (697 KB, static musl)make apps → 200+ .wasm binaries (1-10 KB each)make rootfs → out/initramfs.cpio.gz (18 MB compressed)make run → QEMU bootDocker Environment
Section titled “Docker Environment”All compilation happens inside a Docker container:
- Base image: Ubuntu 22.04
- Kernel build deps: gcc, make, bc, flex, bison
- Rust toolchain: Stable, with
x86_64-unknown-linux-muslandwasm32-wasip2targets - Verified binaries: Wasmtime 43.0.0 and BusyBox 1.35.0 (SHA-256 checked)
Build the Docker image:
make imageBuild Targets
Section titled “Build Targets”| Target | Description |
|---|---|
make build | Full build: kernel + supervisor + apps + rootfs + disk |
make kernel | Compile Linux 5.10 kernel (allnoconfig) |
make supervisor | Compile Rust supervisor for musl |
make apps | Compile all WASM apps (incremental) |
make rootfs | Package initramfs from all artifacts |
make run | Boot headless in QEMU |
make run-gui | Boot with virtio-gpu display |
make run-net | Boot with virtio-net networking |
make run-gui-net | Display + networking |
make shell | Open bash inside builder container |
make clean | Remove out/ directory |
make clean-image | Remove Docker builder image |
Incremental Builds
Section titled “Incremental Builds”Per-app stamp files (out/.apps/<name>.stamp) ensure only changed apps recompile:
# Only the touched app recompilestouch apps/snake/src/main.rsmake appsBuild Artifacts
Section titled “Build Artifacts”| Artifact | Path | Size |
|---|---|---|
| Linux kernel | out/bzImage | 2.3 MB |
| Initramfs | out/initramfs.cpio.gz | 18 MB |
| Data disk | out/disk.img | 64 MB (ext4, created once) |
| Supervisor | supervisor/target/.../supervisor | 697 KB |
| WASM apps | apps/*/target/.../release/*.wasm | 1-10 KB each |
Testing
Section titled “Testing”# Full CI suitemake test
# Unit tests only (cargo test in Docker)make unit-test
# Manifest validationmake check-manifests
# Headless QEMU smoke test (30s timeout)make smokeSmoke Test
Section titled “Smoke Test”make smoke boots QEMU headless, waits for [lifecycle] all apps spawned on serial output, then exits. Pass/fail is printed as SMOKE: PASS or SMOKE: FAIL: <reason>.
Unit Tests
Section titled “Unit Tests”Unit tests live in supervisor/tests/ and cover manifest parsing, IPC routing, process lifecycle, display commands, font rendering, input handling, mouse events, watchdog, and window management.
Development Workflow
Section titled “Development Workflow”Supervisor changes
Section titled “Supervisor changes”cd supervisorcargo build --target x86_64-unknown-linux-musl --releasecd ..make rootfs && make runSingle app changes
Section titled “Single app changes”cd apps/my-appcargo build --target wasm32-wasip2 --releasecd ../..make rootfs && make runInteractive debugging
Section titled “Interactive debugging”make shell # Opens bash in the Docker container