feat: Implement complete Zero OS Alpine Initramfs Builder

- Complete bash framework with strict error handling
- Modular library system (docker, alpine, components, initramfs, kernel, testing)
- Rust component integration (zinit, rfs, mycelium) with musl targeting
- Rootless Docker/Podman support for GitHub Actions
- Centralized configuration in config/build.conf
- 2-stage module loading system
- Strip + UPX optimization for minimal size
- Complete zinit integration replacing OpenRC
- GitHub Actions CI/CD pipeline
- Comprehensive documentation and usage guides

Components:
- Latest stable kernel 6.12.44
- Alpine Linux 3.22 base
- ThreeFold components: zinit, mycelium, rfs, corex
- Target: ~8-12MB final initramfs.cpio.xz
This commit is contained in:
2025-08-31 12:31:49 +02:00
commit 860b9aa161
81 changed files with 30118 additions and 0 deletions

46
config/build.conf Normal file
View File

@@ -0,0 +1,46 @@
# Zero OS Alpine Initramfs Builder Configuration
# This file contains all build-time configuration parameters
# System versions
ALPINE_VERSION="3.22"
KERNEL_VERSION="6.12.44"
# Rust configuration
RUST_TARGET="x86_64-unknown-linux-musl"
# Build optimization
OPTIMIZATION_LEVEL="max"
# Container configuration
CONTAINER_RUNTIME="auto"
BUILDER_IMAGE="zero-os-builder:latest"
# Compression settings
INITRAMFS_COMPRESSION="xz"
XZ_COMPRESSION_LEVEL="9"
# Testing configuration
QEMU_MEMORY="512M"
QEMU_TIMEOUT="60"
CLOUD_HYPERVISOR_MEMORY="512M"
# Build directories (relative to project root)
INSTALL_DIR="initramfs"
COMPONENTS_DIR="components"
KERNEL_DIR="kernel"
DIST_DIR="dist"
# Mirror configurations
ALPINE_MIRROR="https://dl-cdn.alpinelinux.org/alpine"
KERNEL_SOURCE_URL="https://cdn.kernel.org/pub/linux/kernel"
# Feature flags
ENABLE_STRIP="true"
ENABLE_UPX="true"
ENABLE_AGGRESSIVE_CLEANUP="true"
ENABLE_2STAGE_MODULES="true"
# Debug and development
DEBUG_DEFAULT="0"
KEEP_BUILD_ARTIFACTS="false"
PARALLEL_JOBS="auto"