Commit Graph

13 Commits

Author SHA1 Message Date
948a10a3ce feat: add binary optimization with strip and upx compression
- Added upx package to Dockerfile.alpine build dependencies
- Added optimize_binary() function to compile-components.sh
- Automatically strips debug symbols from all Zero-OS binaries
- Applies UPX compression with --best --lzma for maximum size reduction
- Optimizes binaries in both initramfs and output directories
- Shows size reduction stats (original → stripped → compressed)
- Graceful fallback if UPX fails, keeping stripped version

This significantly reduces initramfs size by compressing zinit, rfs, and mycelium binaries.
2025-08-22 16:43:43 +02:00
bf62e887e8 feat: Create minimal Zero-OS initramfs with console support
- Fixed build system to clone source repositories instead of downloading binaries
- Enhanced scripts/fetch-github.sh with proper git repo cloning and branch handling
- Updated scripts/compile-components.sh for RFS compilation with build-binary feature
- Added minimal firmware installation for essential network drivers (73 modules)
- Created comprehensive zinit configuration set (15 config files including getty)
- Added util-linux package for getty/agetty console support
- Optimized package selection for minimal 27MB initramfs footprint
- Successfully builds bootable vmlinuz.efi with embedded initramfs
- Confirmed working: VM boot, console login, network drivers, zinit init system

Components:
- initramfs.cpio.xz: 27MB compressed minimal Zero-OS image
- vmlinuz.efi: 35MB bootable kernel with embedded initramfs
- Complete Zero-OS toolchain: zinit, rfs, mycelium compiled from source
2025-08-16 23:25:59 +02:00
eca0cca470 Migrate to Rust workspace with git subtrees
MAJOR ARCHITECTURAL CHANGE:
- Add Rust components as git subtrees: zinit, mycelium, rfs
- Replace git submodules with unified Rust workspace
- Update compile-components.sh to use workspace build
- Remove obsolete setup-submodules.sh script
- Keep CoreX handling in fetch-github.sh (Go binary)

BENEFITS:
- Unified dependency management across Rust components
- Single 'cargo build --workspace' command
- Better IDE support and shared target directory
- Improved build caching and version consistency

Components structure:
- components/zinit (subtree from threefoldtech/zinit)
- components/mycelium (subtree from threefoldtech/mycelium)
- components/rfs (subtree from threefoldtech/rfs)
- CoreX handled by fetch-github.sh (binary download)
2025-08-16 21:18:40 +02:00
23180a1b0e Fix component build issues
- Add binary detection logic for RFS build to handle different binary names
- Remove non-existent 'vendored-openssl' feature from mycelium build
- Add debugging output to show actual build results
2025-08-16 20:23:25 +02:00
d94a4829a2 Add cleanup script and remove unused git version variables
- Add comprehensive cleanup script (scripts/cleanup.sh) to remove build artifacts
- Remove unused VERGEN_GIT_* environment variables from Rust build functions
- Cleanup script preserves source code while removing outputs, cache, and temp files
2025-08-16 20:21:51 +02:00
653c751535 Lots of fixes
details
  details
  details
2025-08-16 00:52:30 +02:00
809c4efece Add comprehensive git environment variables for build scripts 2025-08-15 23:27:26 +02:00
caebd0eeda Fix git version detection for zinit build 2025-08-15 23:22:39 +02:00
e347332ee5 Fix zinit: it's Rust, not Go 2025-08-15 22:59:09 +02:00
5f262d6efb Fix Alpine root path to use initramfs directory 2025-08-15 22:46:15 +02:00
f1829141a3 Update Rust build system: use rustup with musl target for static builds 2025-08-15 22:44:19 +02:00
a489a052bb Clean up submodule references 2025-08-15 22:38:36 +02:00
9b14d94bbe Initial commit: Alpine Zero-OS initramfs build system with cleaned Docker configuration 2025-08-15 22:11:44 +02:00