Commit Graph

38 Commits

Author SHA1 Message Date
9463d23693 Add missing kernel module dependencies for SCSI and PTP
- Added scsi_mod.ko and sd_mod.ko for virtio_scsi dependency resolution
- Added ptp.ko for e1000e and other ethernet driver PTP functionality
- Fixes 'Unknown symbol' errors during module loading at boot
- Ensures all network and storage drivers have proper dependencies
2025-08-19 18:30:51 +02:00
ef7363f53c Add chroot depmod for proper module dependencies in initramfs
- Added chroot + depmod -a step in setup-initramfs.sh before cpio creation
- Generates module dependencies within the actual initramfs environment
- Includes bind mounting of /proc, /sys, /dev for proper chroot operation
- Ensures TUN module and all network modules have correct dependencies
- Complements existing build-time depmod in install-firmware-minimal.sh
2025-08-19 18:27:32 +02:00
2d3b6371e8 Add TUN kernel module for Mycelium networking
- Added tun.ko module installation to scripts/install-firmware-minimal.sh
- Essential for Mycelium's tunnel networking functionality
- Module will be installed alongside other network drivers during build
2025-08-19 18:25:00 +02:00
abd0409ad1 Add dedicated module dependency and network services
- Added depmod.yaml service for rebuilding kernel module dependencies
- Added network.yaml service for DHCP network configuration with proper dependencies
- Cleaned up udev.sh to remove depmod call (now handled by dedicated service)
- Updated udev-trigger.yaml to depend on depmod for proper module loading order
- Ensures overlay.ko and other kernel modules have correct dependencies before hardware detection
2025-08-19 17:56:20 +02:00
b07788f8db Add debug flag to zinit init for better boot visibility
- Changed: exec switch_root /mnt/root /sbin/zinit init
- To: exec switch_root /mnt/root /sbin/zinit -d init
- Enables debug output during Zero-OS service startup
2025-08-19 14:19:32 +02:00
12156d458d Add overlay filesystem support and update zinit configuration
- Added overlay.ko module installation for container support in install-firmware-minimal.sh
- Added udevmon service for hardware event monitoring
- Updated udev-trigger dependency to include udevmon
- Added placeholder configurations for mycelium and shm services
2025-08-19 14:16:29 +02:00
e13034810d Clean up build system and update documentation
- Updated README.md to reflect current single-stage build architecture
- Removed obsolete scripts/build-boot.sh (unused two-stage boot approach)
- Updated cleanup.sh to remove reference to non-existent setup-submodules.sh
- Documented smart caching and component compilation workflow
- Added proper build variants (minimal vs full) documentation
2025-08-18 14:41:46 +02:00
e402de625d Update packages-minimal.txt configuration 2025-08-18 08:27:20 +02:00
7c4ab9dd7b fix: Complete Zero-OS initramfs networking and script permissions
- Add net_failover and failover modules for virtio_net dependency resolution
- Copy modules from both drivers/net and net/ kernel directories
- Fixes 'Unknown symbol net_failover_destroy/create' errors when loading virtio_net
- Set execute permissions on all zinit init scripts (*.sh files)
- Include proper kernel module metadata files (modules.order, modules.builtin, modules.builtin.modinfo)
- Expanded module search to include failover-related networking modules
- Now includes 77 network driver modules with complete dependency chain
- Ensures depmod -a works correctly without warnings
- Complete VirtIO network stack functionality with proper script execution
2025-08-16 23:46:45 +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
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