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.
This commit is contained in:
2025-08-16 21:04:07 +02:00
parent e3db295eb9
commit 7eb27ff376
3 changed files with 140 additions and 39 deletions

View File

@@ -42,7 +42,6 @@ echo "[+] Compiling Zero-OS components..."
if [ -f /build/scripts/build-smart.sh ]; then
# Use smart build if available (with caching)
/build/scripts/build-smart.sh
exit $?
else
# Fallback to direct component compilation
/build/scripts/compile-components.sh

View File

@@ -85,6 +85,50 @@ EOF
chmod +x "$INITRAMFS_ROOT/init-debug"
# Ensure compiled Zero-OS binaries are installed
echo " Checking Zero-OS binaries..."
echo "[DEBUG] Checking for compiled binaries..."
# Check if binaries exist and copy them if needed
BINARIES_FOUND=true
# Check zinit (critical for boot)
if [ ! -f "$INITRAMFS_ROOT/sbin/zinit" ]; then
if [ -f "/build/output/zinit" ]; then
echo " Installing zinit from output directory..."
mkdir -p "$INITRAMFS_ROOT/sbin"
cp "/build/output/zinit" "$INITRAMFS_ROOT/sbin/"
chmod +x "$INITRAMFS_ROOT/sbin/zinit"
else
echo " ERROR: zinit binary not found! Build may have failed."
BINARIES_FOUND=false
fi
else
echo " ✓ zinit found at $INITRAMFS_ROOT/sbin/zinit"
fi
# Check other binaries
for binary in "usr/bin/rfs" "usr/bin/mycelium" "usr/bin/corex"; do
if [ ! -f "$INITRAMFS_ROOT/$binary" ]; then
basename_binary=$(basename "$binary")
if [ -f "/build/output/$basename_binary" ]; then
echo " Installing $basename_binary from output directory..."
mkdir -p "$INITRAMFS_ROOT/$(dirname $binary)"
cp "/build/output/$basename_binary" "$INITRAMFS_ROOT/$binary"
chmod +x "$INITRAMFS_ROOT/$binary"
else
echo " Warning: $basename_binary not found in output directory"
fi
else
echo "$basename_binary found"
fi
done
if [ "$BINARIES_FOUND" = "false" ]; then
echo "[DEBUG] ERROR: Critical binaries missing - initramfs will not boot properly"
echo "[DEBUG] Make sure to run compile-components.sh before setup-initramfs.sh"
fi
# Copy other system configurations
echo " Setting up system configuration..."