Clean up submodule references
This commit is contained in:
@@ -143,35 +143,32 @@ fi
|
||||
# Build each Zero-OS component from submodules
|
||||
echo "Building Zero-OS components from submodules:"
|
||||
|
||||
# 1. Zinit - Init system (Go)
|
||||
# 1. Zinit - Init system (Go) - master branch
|
||||
if build_go_component "zinit" "zinit" "/sbin" "go build -o zinit"; then
|
||||
echo " Zinit built successfully"
|
||||
else
|
||||
echo " Warning: Failed to build zinit"
|
||||
fi
|
||||
|
||||
# 2. RFS - Rust filesystem (Rust)
|
||||
# 2. RFS - Rust filesystem (Rust) - v2.0.6 with musl
|
||||
if build_rust_component "rfs" "rfs" "/usr/bin"; then
|
||||
echo " RFS built successfully"
|
||||
else
|
||||
echo " Warning: Failed to build rfs"
|
||||
fi
|
||||
|
||||
# 3. Seektime - Disk detection (Go)
|
||||
if build_go_component "seektime" "seektime" "/usr/bin" "go build -o seektime"; then
|
||||
echo " Seektime built successfully"
|
||||
# 3. CoreX - Container control (static binary) - v2.1.4
|
||||
echo " Installing CoreX static binary..."
|
||||
if [ -f "$COMPONENTS_DIR/corex/corex" ]; then
|
||||
mkdir -p "$ALPINE_ROOT/usr/bin"
|
||||
cp "$COMPONENTS_DIR/corex/corex" "$ALPINE_ROOT/usr/bin/"
|
||||
chmod +x "$ALPINE_ROOT/usr/bin/corex"
|
||||
echo " CoreX installed successfully"
|
||||
else
|
||||
echo " Warning: Failed to build seektime"
|
||||
echo " Warning: CoreX binary not found"
|
||||
fi
|
||||
|
||||
# 4. Core-X - Container control (Go)
|
||||
if build_go_component "core-x" "core-x" "/usr/bin" "go build -o core-x"; then
|
||||
echo " Core-X built successfully"
|
||||
else
|
||||
echo " Warning: Failed to build core-x"
|
||||
fi
|
||||
|
||||
# 5. Mycelium - Networking layer (Rust)
|
||||
# 4. Mycelium - Networking layer (Rust) - 0.6.1 with musl
|
||||
if build_rust_component "mycelium" "mycelium" "/usr/bin"; then
|
||||
echo " Mycelium built successfully"
|
||||
else
|
||||
@@ -184,7 +181,7 @@ echo "[+] Zero-OS component compilation completed"
|
||||
# Show installed binaries info
|
||||
echo ""
|
||||
echo "[+] Compiled Zero-OS components in Alpine root:"
|
||||
for binary in "/sbin/zinit" "/usr/bin/rfs" "/usr/bin/seektime" "/usr/bin/core-x" "/usr/bin/mycelium"; do
|
||||
for binary in "/sbin/zinit" "/usr/bin/rfs" "/usr/bin/corex" "/usr/bin/mycelium"; do
|
||||
if [ -x "$ALPINE_ROOT$binary" ]; then
|
||||
size=$(stat -c%s "$ALPINE_ROOT$binary" 2>/dev/null || echo "unknown")
|
||||
echo " $binary (${size} bytes)"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "[+] Setting up Zero-OS component submodules..."
|
||||
echo "[+] Setting up Zero-OS components..."
|
||||
|
||||
# Check if we're in git repository
|
||||
if [ ! -d ".git" ]; then
|
||||
@@ -12,40 +12,48 @@ fi
|
||||
# Create components directory
|
||||
mkdir -p components
|
||||
|
||||
# Add Zero-OS components as git submodules
|
||||
echo " Adding zinit (init system)..."
|
||||
# 1. Zinit - master branch
|
||||
echo " Adding zinit (init system) from master branch..."
|
||||
if [ ! -d "components/zinit" ]; then
|
||||
git submodule add https://github.com/threefoldtech/zinit.git components/zinit
|
||||
cd components/zinit
|
||||
git checkout master
|
||||
cd ../..
|
||||
else
|
||||
echo " zinit submodule already exists"
|
||||
fi
|
||||
|
||||
echo " Adding seektime (disk detection)..."
|
||||
if [ ! -d "components/seektime" ]; then
|
||||
git submodule add https://github.com/threefoldtech/seektime.git components/seektime
|
||||
# 2. RFS - tag v2.0.6 (musl build)
|
||||
echo " Adding rfs (rust filesystem) tag v2.0.6..."
|
||||
if [ ! -d "components/rfs" ]; then
|
||||
git submodule add https://github.com/threefoldtech/rfs.git components/rfs
|
||||
cd components/rfs
|
||||
git checkout v2.0.6
|
||||
cd ../..
|
||||
else
|
||||
echo " seektime submodule already exists"
|
||||
echo " rfs submodule already exists"
|
||||
fi
|
||||
|
||||
echo " Adding core-x (container control)..."
|
||||
if [ ! -d "components/core-x" ]; then
|
||||
git submodule add https://github.com/threefoldtech/core-x.git components/core-x
|
||||
else
|
||||
echo " core-x submodule already exists"
|
||||
fi
|
||||
|
||||
echo " Adding mycelium (networking layer)..."
|
||||
# 3. Mycelium - tag 0.6.1 (musl build)
|
||||
echo " Adding mycelium (networking layer) tag 0.6.1..."
|
||||
if [ ! -d "components/mycelium" ]; then
|
||||
git submodule add https://github.com/threefoldtech/mycelium.git components/mycelium
|
||||
cd components/mycelium
|
||||
git checkout 0.6.1
|
||||
cd ../..
|
||||
else
|
||||
echo " mycelium submodule already exists"
|
||||
fi
|
||||
|
||||
echo " Adding rfs (rust filesystem)..."
|
||||
if [ ! -d "components/rfs" ]; then
|
||||
git submodule add https://github.com/threefoldtech/rfs.git components/rfs
|
||||
# 4. CoreX - direct download (static binary)
|
||||
echo " Downloading CoreX static binary v2.1.4..."
|
||||
mkdir -p components/corex
|
||||
if [ ! -f "components/corex/corex" ]; then
|
||||
curl -L -o components/corex/corex https://github.com/threefoldtech/corex/releases/download/2.1.4/corex-2.1.4-amd64-linux-static
|
||||
chmod +x components/corex/corex
|
||||
echo " CoreX binary downloaded successfully"
|
||||
else
|
||||
echo " rfs submodule already exists"
|
||||
echo " CoreX binary already exists"
|
||||
fi
|
||||
|
||||
# Initialize and update submodules
|
||||
@@ -53,10 +61,13 @@ echo " Initializing submodules..."
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
echo "[+] Zero-OS component submodules setup complete"
|
||||
echo "[+] Zero-OS components setup complete"
|
||||
echo ""
|
||||
echo "Submodules added:"
|
||||
ls -la components/
|
||||
echo "Components added:"
|
||||
echo " - zinit (master): $(ls -la components/zinit 2>/dev/null | wc -l) files"
|
||||
echo " - rfs (v2.0.6): $(ls -la components/rfs 2>/dev/null | wc -l) files"
|
||||
echo " - mycelium (0.6.1): $(ls -la components/mycelium 2>/dev/null | wc -l) files"
|
||||
echo " - corex (v2.1.4): $(ls -la components/corex/corex 2>/dev/null && echo "downloaded" || echo "missing")"
|
||||
echo ""
|
||||
echo "To update submodules later, run:"
|
||||
echo " git submodule update --remote"
|
||||
Reference in New Issue
Block a user