e3db295eb95e92fd30898c11b820048b4d55efa5
- Add openssl-libs-static package to both Dockerfiles - Add pkgconfig for proper SSL library detection - Fixes mycelium compilation error with missing -lssl and -lcrypto
Alpine-based Zero-OS Initramfs
Modern Alpine Linux based approach to building Zero-OS initramfs, replacing the complex build-from-source system with Alpine packages.
Architecture Overview
This system uses:
- Alpine Linux LTS as base system (latest packages, no building from source)
- Alpine kernel with embedded essential storage/ethernet modules
- GitHub components: zinit, core-x, seektime, rfs (only custom builds needed)
- Same init flow: tmpfs copy approach for compatibility
- Alpine packages: All standard tools (busybox, openssh, btrfs-progs, etc.)
Directory Structure
alpine-initramfs/
├── build/ # Build orchestration
│ ├── Dockerfile.alpine # Alpine build environment
│ ├── docker-compose.yml # Build orchestration
│ └── build-initramfs.sh # Main build script
├── configs/ # Configuration files
│ ├── packages.txt # Alpine packages to install
│ ├── kernel-modules.txt # Essential modules to embed
│ ├── init # Custom init script (Alpine → zinit)
│ └── zinit/ # Zinit service configs (from ../config/etc/zinit/)
├── scripts/ # Build helper scripts
│ ├── fetch-github.sh # Download zinit, core-x, seektime, rfs
│ ├── install-packages.sh # Install Alpine packages to initramfs
│ ├── setup-initramfs.sh # Create initramfs structure
│ └── build-kernel.sh # Build kernel with embedded initramfs
├── output/ # Build artifacts
│ ├── initramfs.cpio.xz # Generated initramfs
│ ├── vmlinuz.efi # Final bootable kernel
│ └── modules/ # Kernel modules
└── docs/ # Documentation
├── PACKAGES.md # Package mapping (old build → Alpine)
├── MODULES.md # Kernel modules reference
└── BUILD.md # Build process guide
Build Flow
- Alpine Environment: Setup Alpine LTS build container
- Package Installation: Install all required Alpine packages
- GitHub Components: Fetch zinit, core-x, seektime, rfs from releases
- Initramfs Assembly: Create filesystem structure with same tmpfs approach
- Kernel Build: Compile Alpine kernel with embedded essential modules
- Output: Generate bootable vmlinuz.efi with embedded initramfs
Quick Start
cd alpine-initramfs/build
docker compose build
docker compose run --rm builder
# Output: ../output/vmlinuz.efi
Key Advantages
- ✅ No source compilation - Use Alpine's maintained packages
- ✅ Latest versions - Always current with Alpine package updates
- ✅ Faster builds - Minutes vs hours
- ✅ Smaller footprint - Alpine's minimal design
- ✅ Same functionality - Identical init flow and service management
- ✅ Better maintenance - Package updates handled by Alpine team
Description
dockerized/podman-ized build system for zos, based on Alpine pakaging system, zinit and zos-specific binaries
Languages
Shell
99.5%
Dockerfile
0.5%