Commit Graph

29 Commits

Author SHA1 Message Date
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
446eb02fb3 Update documentation for Rust workspace approach
- Update README.md to reflect git subtree + workspace architecture
- Document unified build process with 'cargo build --workspace'
- Add component update instructions using git subtree pull
- Remove references to git submodules and setup-submodules.sh
- Update development workflow with workspace commands
- Document new directory structure with Cargo.toml at root
2025-08-16 21:20:26 +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
c636d2baef Merge commit '9790ef4dacdf729d8825dbe745379bd6c669b9dd' as 'components/rfs' 2025-08-16 21:12:45 +02:00
9790ef4dac Squashed 'components/rfs/' content from commit 9808a5e
git-subtree-dir: components/rfs
git-subtree-split: 9808a5e9fc768edc7d8b1dfa5b91b3f018dff0cb
2025-08-16 21:12:45 +02:00
3d6caf7d91 Merge commit '10025f9fa5503865918cbae2af5366afe7fd7c54' as 'components/mycelium' 2025-08-16 21:12:34 +02:00
10025f9fa5 Squashed 'components/mycelium/' content from commit afb32e0
git-subtree-dir: components/mycelium
git-subtree-split: afb32e0cdb2d4cdd17f22a5693278068d061f08c
2025-08-16 21:12:34 +02:00
9293ee45cb Merge commit '2fda71af117a90da5f496d8bb8105f0ee9e07420' as 'components/zinit' 2025-08-16 21:12:16 +02:00
2fda71af11 Squashed 'components/zinit/' content from commit 1b76c06
git-subtree-dir: components/zinit
git-subtree-split: 1b76c062fe31d552d1b7b23484ce163995a81482
2025-08-16 21:12:16 +02:00
01491a088c Remove git submodules completely
- Remove .gitmodules file
- Remove all component submodules (zinit, mycelium, rfs, corex)
- Prepare for git subtree approach
2025-08-16 21:11:21 +02:00
f6d81986d9 Setup Rust workspace and remove git submodules
- Add workspace Cargo.toml with shared dependencies
- Remove .gitmodules file
- Remove components/ directory (will be replaced with subtrees)
- Prepare for workspace-based component management
2025-08-16 21:10:44 +02:00
7eb27ff376 Fix critical build pipeline and update documentation
CRITICAL FIXES:
- Fix build-initramfs.sh early exit preventing zinit installation
- Add binary detection/installation logic to setup-initramfs.sh
- Ensure compiled components are properly installed to initramfs

DOCUMENTATION:
- Update README.md to reflect actual implementation
- Document source compilation approach with git submodules
- Add development workflow and caching documentation
- Remove outdated GitHub releases references

This fixes the 'zinit not found' boot error by ensuring the build
pipeline completes all phases including initramfs assembly.
2025-08-16 21:04:07 +02:00
e3db295eb9 Add static OpenSSL libraries for Rust musl builds
- Add openssl-libs-static package to both Dockerfiles
- Add pkgconfig for proper SSL library detection
- Fixes mycelium compilation error with missing -lssl and -lcrypto
2025-08-16 20:38:45 +02:00
1bc6005a48 Fix cargo availability in dev-shell environment
- Add cargo to PATH in dev-shell service
- Add target-cache volume for Rust build caching
- Use login shell to properly source cargo environment
- Keeps existing build infrastructure and caching strategy
2025-08-16 20:35:13 +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
99485106d3 Update submodules: mycelium and rfs to latest commits 2025-08-16 20:22:11 +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
a3e56b9eeb Fix components mount: remove read-only for cargo build access 2025-08-15 23:19:36 +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
829f7d034e Add components volume mount to docker-compose services 2025-08-15 22:45:41 +02:00
f1829141a3 Update Rust build system: use rustup with musl target for static builds 2025-08-15 22:44:19 +02:00
756b7e5514 Add Zero-OS components: zinit, rfs v2.0.6, mycelium v0.6.1, corex v2.1.4 2025-08-15 22:40:31 +02:00
a489a052bb Clean up submodule references 2025-08-15 22:38:36 +02:00
ee842f3783 Fix .gitignore: allow tracking of components/ submodules directory 2025-08-15 22:12:14 +02:00
9b14d94bbe Initial commit: Alpine Zero-OS initramfs build system with cleaned Docker configuration 2025-08-15 22:11:44 +02:00