Enhance README and build scripts for hardware-specific optimizations
- Updated README.md to clarify development setup for macOS/Docker and added production build instructions for specific hardware. - Introduced new build scripts for optimized OS images targeting Start9 Server Pure, HP ProDesk 400 G4 DM, and Dell OptiPlex. - Enhanced Dockerfile to specify platform compatibility and improved Alpine profile for Archipelago builds. - Updated configuration files and init scripts to support new hardware profiles and ensure proper service management.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Docker build image for Archipelago OS image building
|
||||
# Can be used on macOS or Linux
|
||||
|
||||
FROM alpine:3.19
|
||||
FROM --platform=linux/amd64 alpine:3.19
|
||||
|
||||
# Install build dependencies
|
||||
RUN apk add --no-cache \
|
||||
|
||||
@@ -0,0 +1,316 @@
|
||||
# Archipelago Hardware Build System - Quick Reference
|
||||
|
||||
## 🚀 Quick Start
|
||||
|
||||
### Build for Start9 Server Pure
|
||||
```bash
|
||||
cd image-recipe
|
||||
./build-for-hardware.sh start9-pure iso
|
||||
```
|
||||
|
||||
### Build for HP ProDesk
|
||||
```bash
|
||||
cd image-recipe
|
||||
./build-for-hardware.sh hp-prodesk iso
|
||||
```
|
||||
|
||||
### Build for Dell OptiPlex
|
||||
```bash
|
||||
cd image-recipe
|
||||
./build-for-hardware.sh dell-optiplex iso
|
||||
```
|
||||
|
||||
### Build for All Hardware
|
||||
```bash
|
||||
cd image-recipe
|
||||
./build-all-hardware.sh iso
|
||||
```
|
||||
|
||||
## 📋 Supported Hardware
|
||||
|
||||
| Hardware | Target Name | CPU | RAM | Storage |
|
||||
|----------|-------------|-----|-----|---------|
|
||||
| Start9 Server Pure | `start9-pure` | Intel i7-10710U | 32-64GB | 2-4TB NVMe |
|
||||
| HP ProDesk 400 G4 DM | `hp-prodesk` | Intel varies | 8GB+ | 128GB+ SSD |
|
||||
| Dell OptiPlex | `dell-optiplex` | Intel varies | 8GB+ | 128GB+ SSD |
|
||||
| Generic x86_64 | `generic` | Any x86_64 | 8GB+ | 128GB+ |
|
||||
|
||||
## 🔧 Build Commands
|
||||
|
||||
### Single Hardware Target
|
||||
```bash
|
||||
./build-for-hardware.sh <target> [iso|disk]
|
||||
```
|
||||
|
||||
**Examples:**
|
||||
```bash
|
||||
# ISO image (recommended)
|
||||
./build-for-hardware.sh start9-pure iso
|
||||
|
||||
# Disk image (advanced)
|
||||
./build-for-hardware.sh start9-pure disk
|
||||
|
||||
# Default is ISO
|
||||
./build-for-hardware.sh hp-prodesk
|
||||
```
|
||||
|
||||
### All Hardware Targets
|
||||
```bash
|
||||
./build-all-hardware.sh [iso|disk]
|
||||
```
|
||||
|
||||
Builds optimized images for all supported hardware in one command.
|
||||
|
||||
## 📦 Output Files
|
||||
|
||||
After build completes:
|
||||
|
||||
```
|
||||
results/
|
||||
├── archipelago-0.1.0-start9-pure-x86_64.iso
|
||||
├── archipelago-0.1.0-hp-prodesk-x86_64.iso
|
||||
├── archipelago-0.1.0-dell-optiplex-x86_64.iso
|
||||
├── archipelago-0.1.0-generic-x86_64.iso
|
||||
├── BUILD_MANIFEST_start9-pure.txt
|
||||
├── BUILD_MANIFEST_hp-prodesk.txt
|
||||
├── BUILD_MANIFEST_dell-optiplex.txt
|
||||
└── BUILD_MANIFEST_generic.txt
|
||||
```
|
||||
|
||||
## 🔍 What's Different Per Hardware?
|
||||
|
||||
Each build includes **hardware-specific optimizations**:
|
||||
|
||||
### Start9 Server Pure
|
||||
- ✅ Intel i7-10710U microcode
|
||||
- ✅ Intel UHD Graphics drivers
|
||||
- ✅ NVMe SSD optimizations
|
||||
- ✅ Coreboot firmware support
|
||||
- ✅ IME-disabled configurations
|
||||
- ✅ High-performance tuning
|
||||
|
||||
### HP ProDesk 400 G4 DM
|
||||
- ✅ Intel graphics support
|
||||
- ✅ HP firmware compatibility
|
||||
- ✅ SATA/NVMe detection
|
||||
- ✅ Compact form factor optimizations
|
||||
- ✅ Low-power configurations
|
||||
|
||||
### Dell OptiPlex
|
||||
- ✅ Multi-model support
|
||||
- ✅ Dell firmware compatibility
|
||||
- ✅ Legacy hardware support
|
||||
- ✅ Business-class features
|
||||
|
||||
### Generic
|
||||
- ✅ Broad hardware compatibility
|
||||
- ✅ Intel & AMD CPU support
|
||||
- ✅ Generic drivers
|
||||
- ✅ Maximum portability
|
||||
|
||||
## 💾 Flash to USB Drive
|
||||
|
||||
### macOS
|
||||
```bash
|
||||
# Find device
|
||||
diskutil list
|
||||
|
||||
# Unmount
|
||||
diskutil unmountDisk /dev/diskX
|
||||
|
||||
# Flash
|
||||
sudo dd if=results/archipelago-0.1.0-start9-pure-x86_64.iso \
|
||||
of=/dev/rdiskX bs=1m status=progress
|
||||
```
|
||||
|
||||
### Linux
|
||||
```bash
|
||||
# Find device
|
||||
lsblk
|
||||
|
||||
# Flash
|
||||
sudo dd if=results/archipelago-0.1.0-start9-pure-x86_64.iso \
|
||||
of=/dev/sdX bs=1M status=progress
|
||||
```
|
||||
|
||||
### GUI Tools
|
||||
- **balenaEtcher** (Recommended): https://www.balena.io/etcher/
|
||||
- **Rufus** (Windows): https://rufus.ie/
|
||||
|
||||
## 🎯 Installation Steps
|
||||
|
||||
1. **Flash ISO to USB** (see above)
|
||||
2. **Insert USB into target hardware**
|
||||
3. **Boot from USB**:
|
||||
- Start9 Pure: Press F12
|
||||
- HP ProDesk: Press F9
|
||||
- Dell OptiPlex: Press F12
|
||||
4. **Follow installation prompts**
|
||||
5. **Remove USB and reboot**
|
||||
6. **Access UI**: http://device-ip:8100
|
||||
|
||||
## 🔬 Verification
|
||||
|
||||
### Check ISO
|
||||
```bash
|
||||
# View build manifest
|
||||
cat results/BUILD_MANIFEST_start9-pure.txt
|
||||
|
||||
# Check file size
|
||||
ls -lh results/*.iso
|
||||
|
||||
# Verify checksum
|
||||
sha256sum results/archipelago-0.1.0-start9-pure-x86_64.iso
|
||||
```
|
||||
|
||||
### Test in VM
|
||||
```bash
|
||||
qemu-system-x86_64 \
|
||||
-m 4G \
|
||||
-smp 2 \
|
||||
-boot d \
|
||||
-cdrom results/archipelago-0.1.0-start9-pure-x86_64.iso \
|
||||
-enable-kvm
|
||||
```
|
||||
|
||||
## 🛠️ Environment Variables
|
||||
|
||||
Customize builds:
|
||||
|
||||
```bash
|
||||
# Set version
|
||||
export ARCHIPELAGO_VERSION="0.2.0"
|
||||
|
||||
# Set Alpine version
|
||||
export ALPINE_VERSION="3.19"
|
||||
|
||||
# Build with custom settings
|
||||
./build-for-hardware.sh start9-pure iso
|
||||
```
|
||||
|
||||
## 📂 Directory Structure
|
||||
|
||||
```
|
||||
image-recipe/
|
||||
├── build-for-hardware.sh # Main build script
|
||||
├── build-all-hardware.sh # Build all targets
|
||||
├── alpine-profile/
|
||||
│ ├── overlay/ # Base system files
|
||||
│ ├── overlay-start9-pure/ # Start9-specific
|
||||
│ ├── overlay-hp-prodesk/ # HP-specific
|
||||
│ ├── overlay-dell-optiplex/ # Dell-specific
|
||||
│ └── overlay-merged/ # Final merged (auto)
|
||||
├── scripts/
|
||||
│ ├── build-backend.sh
|
||||
│ ├── build-frontend.sh
|
||||
│ └── install-archipelago.sh
|
||||
└── results/ # Build output
|
||||
```
|
||||
|
||||
## 🐛 Troubleshooting
|
||||
|
||||
### Build Fails
|
||||
```bash
|
||||
# Clean everything
|
||||
rm -rf results/ build/ apks/ aports/
|
||||
|
||||
# Rebuild
|
||||
./build-for-hardware.sh start9-pure iso
|
||||
```
|
||||
|
||||
### Docker Issues (macOS)
|
||||
```bash
|
||||
# Start Docker Desktop
|
||||
open -a Docker
|
||||
|
||||
# Wait for Docker to start, then retry
|
||||
./build-for-hardware.sh start9-pure iso
|
||||
```
|
||||
|
||||
### Out of Disk Space
|
||||
```bash
|
||||
# Clean Docker (macOS)
|
||||
docker system prune -a
|
||||
|
||||
# Clean build artifacts
|
||||
rm -rf build/ results/ apks/
|
||||
```
|
||||
|
||||
## 📖 Full Documentation
|
||||
|
||||
For detailed information:
|
||||
- **Hardware Builds**: `README-HARDWARE-BUILDS.md`
|
||||
- **OS Images**: `docs/building-os-images.md`
|
||||
- **Architecture**: `docs/architecture.md`
|
||||
|
||||
## 🎯 Common Use Cases
|
||||
|
||||
### Build for production Start9 Server Pure
|
||||
```bash
|
||||
export ARCHIPELAGO_VERSION="1.0.0"
|
||||
./build-for-hardware.sh start9-pure iso
|
||||
```
|
||||
|
||||
### Build test images for all hardware
|
||||
```bash
|
||||
export ARCHIPELAGO_VERSION="dev"
|
||||
./build-all-hardware.sh iso
|
||||
```
|
||||
|
||||
### Build for your specific hardware
|
||||
```bash
|
||||
# Start9 Server Pure users
|
||||
./build-for-hardware.sh start9-pure iso
|
||||
|
||||
# HP ProDesk users
|
||||
./build-for-hardware.sh hp-prodesk iso
|
||||
|
||||
# Dell OptiPlex users
|
||||
./build-for-hardware.sh dell-optiplex iso
|
||||
|
||||
# Other x86_64 hardware
|
||||
./build-for-hardware.sh generic iso
|
||||
```
|
||||
|
||||
## ⏱️ Build Times
|
||||
|
||||
Approximate build times (first build):
|
||||
|
||||
| Hardware | macOS (Docker) | Linux (Native) |
|
||||
|----------|---------------|----------------|
|
||||
| Start9 Pure | 45-60 min | 30-45 min |
|
||||
| HP ProDesk | 45-60 min | 30-45 min |
|
||||
| Dell OptiPlex | 45-60 min | 30-45 min |
|
||||
| Generic | 45-60 min | 30-45 min |
|
||||
| All Targets | 3-4 hours | 2-3 hours |
|
||||
|
||||
Subsequent builds are much faster (~10-15 minutes) due to caching.
|
||||
|
||||
## 💡 Tips
|
||||
|
||||
- **First build is slow**: Docker needs to download Alpine base, build tools, etc.
|
||||
- **Use SSD**: Dramatically speeds up builds
|
||||
- **Close apps**: Free up RAM and CPU for faster builds
|
||||
- **Build overnight**: For all-hardware builds, run overnight
|
||||
- **Check logs**: Build output shows progress and any issues
|
||||
|
||||
## 🚀 Next Steps
|
||||
|
||||
After building:
|
||||
1. Flash ISO to USB drive
|
||||
2. Boot your hardware from USB
|
||||
3. Install Archipelago
|
||||
4. Access UI at http://device-ip:8100
|
||||
5. Install Bitcoin Core and apps
|
||||
6. Enjoy your sovereign server!
|
||||
|
||||
## 📞 Support
|
||||
|
||||
Need help?
|
||||
- **Issues**: Open GitHub issue
|
||||
- **Docs**: Check `docs/` folder
|
||||
- **Community**: Discord (coming soon)
|
||||
|
||||
---
|
||||
|
||||
**Remember**: Keep your ProDesk and OptiPlex builds! The system supports all hardware targets simultaneously.
|
||||
@@ -0,0 +1,412 @@
|
||||
# Building Archipelago for Specific Hardware
|
||||
|
||||
Archipelago supports building optimized OS images for specific hardware targets. Each build includes hardware-specific optimizations, drivers, and configurations.
|
||||
|
||||
## Supported Hardware
|
||||
|
||||
### 🖥️ Start9 Server Pure
|
||||
```bash
|
||||
./build-for-hardware.sh start9-pure iso
|
||||
```
|
||||
|
||||
**Specifications:**
|
||||
- **CPU**: Intel Core i7-10710U (6 cores, 12 threads)
|
||||
- **RAM**: 32GB or 64GB DDR4-3200
|
||||
- **Storage**: 2TB or 4TB NVMe SSD
|
||||
- **Network**: 1x Gigabit Ethernet
|
||||
- **Graphics**: Intel UHD Graphics
|
||||
- **Ports**: 4x USB 3.0, 2x USB 2.0, 1x USB-C 3.1, HDMI, DisplayPort
|
||||
|
||||
**Optimizations:**
|
||||
- Intel microcode updates
|
||||
- Intel graphics acceleration
|
||||
- NVMe SSD optimizations
|
||||
- Power management tuning
|
||||
|
||||
### 🖥️ HP ProDesk 400 G4 DM
|
||||
```bash
|
||||
./build-for-hardware.sh hp-prodesk iso
|
||||
```
|
||||
|
||||
**Specifications:**
|
||||
- **CPU**: Various Intel processors
|
||||
- **RAM**: 8GB+ DDR4
|
||||
- **Storage**: 128GB+ SATA/NVMe SSD
|
||||
- **Network**: 1x Gigabit Ethernet
|
||||
- **Form Factor**: Desktop Mini
|
||||
|
||||
**Optimizations:**
|
||||
- Intel graphics drivers
|
||||
- SATA/NVMe detection and optimization
|
||||
- HP-specific firmware support
|
||||
|
||||
### 🖥️ Dell OptiPlex
|
||||
```bash
|
||||
./build-for-hardware.sh dell-optiplex iso
|
||||
```
|
||||
|
||||
**Specifications:**
|
||||
- **CPU**: Various Intel processors
|
||||
- **RAM**: 8GB+ DDR4
|
||||
- **Storage**: 128GB+ SATA/NVMe SSD
|
||||
- **Network**: 1x Gigabit Ethernet
|
||||
- **Models**: 3050, 7050, 9020, etc.
|
||||
|
||||
**Optimizations:**
|
||||
- Intel graphics drivers
|
||||
- Dell firmware support
|
||||
- Multi-model compatibility
|
||||
|
||||
### 🖥️ Generic x86_64
|
||||
```bash
|
||||
./build-for-hardware.sh generic iso
|
||||
```
|
||||
|
||||
**Specifications:**
|
||||
- **CPU**: Any x86_64 processor (Intel/AMD)
|
||||
- **RAM**: 8GB+ recommended
|
||||
- **Storage**: 128GB+ HDD/SSD
|
||||
- **Network**: Any Ethernet adapter
|
||||
|
||||
**Optimizations:**
|
||||
- Broad hardware compatibility
|
||||
- Generic drivers for maximum coverage
|
||||
- Both Intel and AMD support
|
||||
|
||||
## Build Process
|
||||
|
||||
### Quick Start
|
||||
|
||||
1. **Choose your hardware target:**
|
||||
```bash
|
||||
cd image-recipe
|
||||
./build-for-hardware.sh <target> iso
|
||||
```
|
||||
|
||||
2. **Wait for build to complete** (30-60 minutes first time)
|
||||
|
||||
3. **Find your ISO:**
|
||||
```bash
|
||||
ls results/archipelago-*-<target>-*.iso
|
||||
```
|
||||
|
||||
### Build Types
|
||||
|
||||
#### ISO Image (Recommended)
|
||||
```bash
|
||||
./build-for-hardware.sh start9-pure iso
|
||||
```
|
||||
- Bootable from USB drive
|
||||
- Live system or installation
|
||||
- Easy to flash with tools
|
||||
|
||||
#### Disk Image
|
||||
```bash
|
||||
./build-for-hardware.sh start9-pure disk
|
||||
```
|
||||
- Raw disk image
|
||||
- For direct disk flashing
|
||||
- Advanced users only
|
||||
|
||||
## Hardware-Specific Features
|
||||
|
||||
### Start9 Server Pure
|
||||
- **Coreboot Support**: Optimized for Start9's Coreboot firmware
|
||||
- **No Intel ME**: Respects disabled Intel Management Engine
|
||||
- **NVMe Performance**: Tuned for high-speed NVMe SSDs
|
||||
- **Professional Grade**: Enterprise-level reliability
|
||||
|
||||
### HP ProDesk 400 G4 DM
|
||||
- **Compact Form Factor**: Optimized for small desktop
|
||||
- **Business Features**: Enterprise management support
|
||||
- **Low Power**: Efficient power management
|
||||
- **Silent Operation**: Thermal optimizations
|
||||
|
||||
### Dell OptiPlex
|
||||
- **Wide Model Support**: Works across many OptiPlex models
|
||||
- **Legacy Support**: Compatible with older hardware
|
||||
- **Enterprise Ready**: Business-class features
|
||||
- **Proven Reliability**: Battle-tested hardware
|
||||
|
||||
### Generic Build
|
||||
- **Maximum Compatibility**: Works on most x86_64 hardware
|
||||
- **Fallback Option**: When specific profile unavailable
|
||||
- **DIY Builds**: Perfect for custom hardware
|
||||
- **Virtual Machines**: Works in VirtualBox, VMware, etc.
|
||||
|
||||
## What Gets Customized
|
||||
|
||||
Each hardware build includes:
|
||||
|
||||
### 1. Hardware Detection
|
||||
Automatically detects and optimizes for:
|
||||
- CPU vendor and model
|
||||
- Available RAM
|
||||
- Storage type (NVMe, SATA SSD, HDD)
|
||||
- Network interfaces
|
||||
- Graphics hardware
|
||||
- USB controllers
|
||||
|
||||
### 2. Kernel Modules
|
||||
Includes specific drivers for:
|
||||
- Storage controllers
|
||||
- Network adapters
|
||||
- Graphics cards
|
||||
- USB devices
|
||||
- Audio hardware
|
||||
|
||||
### 3. Firmware
|
||||
Loads appropriate firmware for:
|
||||
- CPU microcode (Intel/AMD)
|
||||
- Network adapters
|
||||
- Graphics cards
|
||||
- Wireless (if applicable)
|
||||
|
||||
### 4. Performance Tuning
|
||||
Optimizes:
|
||||
- I/O scheduler (NVMe vs SATA)
|
||||
- CPU governor (performance vs power)
|
||||
- Memory management
|
||||
- Network buffers
|
||||
- Disk caching
|
||||
|
||||
### 5. System Configuration
|
||||
Sets defaults for:
|
||||
- Boot parameters
|
||||
- Service startup order
|
||||
- Power management
|
||||
- Thermal management
|
||||
- Network configuration
|
||||
|
||||
## Build Output
|
||||
|
||||
After successful build, you'll get:
|
||||
|
||||
```
|
||||
results/
|
||||
├── archipelago-0.1.0-start9-pure-x86_64.iso
|
||||
├── archipelago-0.1.0-hp-prodesk-x86_64.iso
|
||||
├── archipelago-0.1.0-dell-optiplex-x86_64.iso
|
||||
├── archipelago-0.1.0-generic-x86_64.iso
|
||||
└── BUILD_MANIFEST_<target>.txt
|
||||
```
|
||||
|
||||
Each ISO includes:
|
||||
- Hardware-specific optimizations
|
||||
- Appropriate drivers and firmware
|
||||
- Custom boot configuration
|
||||
- Installation scripts
|
||||
- Hardware detection tools
|
||||
|
||||
## Installation
|
||||
|
||||
### 1. Flash ISO to USB
|
||||
|
||||
**macOS:**
|
||||
```bash
|
||||
# Find USB device
|
||||
diskutil list
|
||||
|
||||
# Unmount
|
||||
diskutil unmountDisk /dev/diskX
|
||||
|
||||
# Flash ISO
|
||||
sudo dd if=results/archipelago-0.1.0-start9-pure-x86_64.iso \
|
||||
of=/dev/rdiskX \
|
||||
bs=1m \
|
||||
status=progress
|
||||
```
|
||||
|
||||
**Linux:**
|
||||
```bash
|
||||
# Find USB device
|
||||
lsblk
|
||||
|
||||
# Flash ISO
|
||||
sudo dd if=results/archipelago-0.1.0-start9-pure-x86_64.iso \
|
||||
of=/dev/sdX \
|
||||
bs=1M \
|
||||
status=progress
|
||||
```
|
||||
|
||||
**GUI Tools:**
|
||||
- [balenaEtcher](https://www.balena.io/etcher/) (macOS/Linux/Windows)
|
||||
- [Rufus](https://rufus.ie/) (Windows)
|
||||
- [Raspberry Pi Imager](https://www.raspberrypi.com/software/) (All platforms)
|
||||
|
||||
### 2. Boot from USB
|
||||
|
||||
1. Insert USB drive into target hardware
|
||||
2. Power on and enter boot menu:
|
||||
- **Start9 Pure**: Press F12 during boot
|
||||
- **HP ProDesk**: Press F9 during boot
|
||||
- **Dell OptiPlex**: Press F12 during boot
|
||||
3. Select USB drive from boot menu
|
||||
4. Follow installation prompts
|
||||
|
||||
### 3. First Boot
|
||||
|
||||
After installation:
|
||||
1. Remove USB drive
|
||||
2. Reboot system
|
||||
3. Hardware detection runs automatically
|
||||
4. Services start automatically
|
||||
5. Access UI at `http://<device-ip>:8100`
|
||||
|
||||
## Verification
|
||||
|
||||
After flashing, verify the build:
|
||||
|
||||
```bash
|
||||
# Check ISO integrity
|
||||
sha256sum results/archipelago-0.1.0-start9-pure-x86_64.iso
|
||||
|
||||
# View build manifest
|
||||
cat results/BUILD_MANIFEST_start9-pure.txt
|
||||
|
||||
# Mount ISO to inspect (Linux)
|
||||
sudo mount -o loop archipelago-0.1.0-start9-pure-x86_64.iso /mnt
|
||||
ls -la /mnt
|
||||
cat /mnt/etc/archipelago/hardware.toml
|
||||
sudo umount /mnt
|
||||
```
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### Build Fails
|
||||
```bash
|
||||
# Clean build artifacts
|
||||
rm -rf results/ build/ apks/ aports/
|
||||
|
||||
# Try again
|
||||
./build-for-hardware.sh start9-pure iso
|
||||
```
|
||||
|
||||
### Wrong Hardware Detected
|
||||
Check hardware profile after boot:
|
||||
```bash
|
||||
cat /etc/archipelago/hardware.toml
|
||||
cat /var/log/archipelago-hardware.log
|
||||
```
|
||||
|
||||
### Boot Issues
|
||||
- Verify ISO checksum
|
||||
- Try different USB port
|
||||
- Check BIOS/UEFI settings:
|
||||
- Enable UEFI boot
|
||||
- Disable Secure Boot (for now)
|
||||
- Enable USB boot
|
||||
- Set boot order
|
||||
|
||||
### Performance Issues
|
||||
View hardware optimization log:
|
||||
```bash
|
||||
cat /var/log/archipelago-hardware.log
|
||||
dmesg | grep -i archipelago
|
||||
journalctl -u archipelago
|
||||
```
|
||||
|
||||
## Advanced Usage
|
||||
|
||||
### Custom Hardware Profile
|
||||
|
||||
Create custom profile for your hardware:
|
||||
|
||||
1. Copy generic profile:
|
||||
```bash
|
||||
cp -r alpine-profile/overlay alpine-profile/overlay-myserver
|
||||
```
|
||||
|
||||
2. Edit hardware config:
|
||||
```bash
|
||||
vim alpine-profile/overlay-myserver/etc/archipelago/hardware.toml
|
||||
```
|
||||
|
||||
3. Build with custom profile:
|
||||
```bash
|
||||
HARDWARE_TARGET=myserver ./build-for-hardware.sh myserver iso
|
||||
```
|
||||
|
||||
### Build All Targets
|
||||
|
||||
Build for all supported hardware:
|
||||
```bash
|
||||
#!/bin/bash
|
||||
for target in start9-pure hp-prodesk dell-optiplex generic; do
|
||||
echo "Building for $target..."
|
||||
./build-for-hardware.sh $target iso
|
||||
done
|
||||
```
|
||||
|
||||
### Automated Testing
|
||||
|
||||
Test ISO in QEMU:
|
||||
```bash
|
||||
qemu-system-x86_64 \
|
||||
-m 4G \
|
||||
-smp 2 \
|
||||
-boot d \
|
||||
-cdrom results/archipelago-0.1.0-start9-pure-x86_64.iso \
|
||||
-enable-kvm
|
||||
```
|
||||
|
||||
## Hardware Requirements
|
||||
|
||||
### Minimum Requirements
|
||||
- **CPU**: 64-bit x86_64 processor
|
||||
- **RAM**: 4GB (8GB recommended)
|
||||
- **Storage**: 64GB (128GB recommended)
|
||||
- **Network**: Ethernet adapter
|
||||
- **Boot**: UEFI or Legacy BIOS
|
||||
|
||||
### Recommended Requirements
|
||||
- **CPU**: Intel i5/i7 or AMD Ryzen 5/7
|
||||
- **RAM**: 16GB+
|
||||
- **Storage**: 256GB+ SSD (NVMe preferred)
|
||||
- **Network**: Gigabit Ethernet
|
||||
- **Boot**: UEFI with GPT
|
||||
|
||||
### Start9 Server Pure (Optimal)
|
||||
- **CPU**: Intel i7-10710U (6 cores, 12 threads)
|
||||
- **RAM**: 32GB or 64GB
|
||||
- **Storage**: 2TB or 4TB NVMe SSD
|
||||
- **Network**: Gigabit Ethernet
|
||||
- **Ports**: Multiple USB 3.0, USB-C
|
||||
|
||||
## Next Steps
|
||||
|
||||
After installation:
|
||||
1. Access web UI: `http://<device-ip>:8100`
|
||||
2. Complete setup wizard
|
||||
3. Install Bitcoin Core
|
||||
4. Add Lightning Network (LND or CLN)
|
||||
5. Install additional apps
|
||||
6. Configure backups
|
||||
7. Secure your node
|
||||
|
||||
## Support
|
||||
|
||||
Need help?
|
||||
- **Documentation**: `docs/`
|
||||
- **Issues**: GitHub Issues
|
||||
- **Community**: Discord (coming soon)
|
||||
- **Hardware-Specific**: Check `BUILD_MANIFEST_<target>.txt`
|
||||
|
||||
## Building Multiple Targets
|
||||
|
||||
To build for all your hardware:
|
||||
|
||||
```bash
|
||||
# Build Start9 Server Pure image
|
||||
./build-for-hardware.sh start9-pure iso
|
||||
|
||||
# Build HP ProDesk image
|
||||
./build-for-hardware.sh hp-prodesk iso
|
||||
|
||||
# Build Dell OptiPlex image
|
||||
./build-for-hardware.sh dell-optiplex iso
|
||||
|
||||
# You'll get separate ISOs optimized for each
|
||||
```
|
||||
|
||||
Each ISO is independent and optimized for its target hardware!
|
||||
@@ -1,38 +1,38 @@
|
||||
#!/bin/sh
|
||||
# Alpine mkimage profile for Archipelago Bitcoin Node OS
|
||||
# Based on Alpine's standard profile
|
||||
|
||||
# Source the standard profile functions
|
||||
. "$(dirname "$0")/mkimg.standard.sh"
|
||||
|
||||
# Additional packages for Archipelago
|
||||
apks="$apks
|
||||
systemd
|
||||
systemd-openrc
|
||||
podman
|
||||
podman-compose
|
||||
crun
|
||||
fuse-overlayfs
|
||||
slirp4netns
|
||||
networkmanager
|
||||
networkmanager-openrc
|
||||
openssh
|
||||
openssh-openrc
|
||||
nginx
|
||||
nginx-openrc
|
||||
"
|
||||
|
||||
# Kernel flavor
|
||||
kernel_flavors="lts"
|
||||
|
||||
# Bootloader
|
||||
boot_addons="grub-efi"
|
||||
|
||||
# Initfs features
|
||||
initfs_features="base squashfs ext4 usb pcmcia scsi mmc nvme virtio"
|
||||
|
||||
# Initfs modules
|
||||
initfs_modules="loop squashfs"
|
||||
profile_archipelago() {
|
||||
profile_standard
|
||||
|
||||
# Additional packages for Archipelago
|
||||
apks="$apks
|
||||
systemd
|
||||
systemd-openrc
|
||||
podman
|
||||
podman-compose
|
||||
crun
|
||||
fuse-overlayfs
|
||||
slirp4netns
|
||||
networkmanager
|
||||
networkmanager-openrc
|
||||
openssh
|
||||
openssh-openrc
|
||||
nginx
|
||||
nginx-openrc
|
||||
"
|
||||
|
||||
# Kernel flavor
|
||||
kernel_flavors="lts"
|
||||
|
||||
# Bootloader
|
||||
boot_addons="grub-efi"
|
||||
|
||||
# Initfs features
|
||||
initfs_features="base squashfs ext4 usb pcmcia scsi mmc nvme virtio"
|
||||
|
||||
# Initfs modules
|
||||
initfs_modules="loop squashfs"
|
||||
}
|
||||
|
||||
# Post-install hook - called after base system is installed
|
||||
profile_apkovl() {
|
||||
@@ -54,36 +54,36 @@ profile_apkovl() {
|
||||
|
||||
# Create first boot script
|
||||
mkdir -p "$apkroot"/etc/local.d
|
||||
cat > "$apkroot"/etc/local.d/archipelago-install.start <<'INSTALL_EOF'
|
||||
#!/bin/sh
|
||||
# First boot installation script for Archipelago
|
||||
|
||||
# Install backend APK if available
|
||||
if [ -f /tmp/archipelago-backend.apk ]; then
|
||||
apk add --allow-untrusted /tmp/archipelago-backend.apk
|
||||
rm /tmp/archipelago-backend.apk
|
||||
fi
|
||||
|
||||
# Enable services
|
||||
rc-update add archipelago default 2>/dev/null || true
|
||||
systemctl enable archipelago 2>/dev/null || true
|
||||
|
||||
# Create archipelago user if needed
|
||||
if ! id archipelago >/dev/null 2>&1; then
|
||||
adduser -D -s /bin/bash archipelago
|
||||
echo "archipelago ALL=(ALL) NOPASSWD: /usr/bin/podman" >> /etc/sudoers
|
||||
fi
|
||||
|
||||
# Setup Podman for archipelago user
|
||||
mkdir -p /home/archipelago/.config/containers
|
||||
chown -R archipelago:archipelago /home/archipelago
|
||||
|
||||
# Create data directories
|
||||
mkdir -p /var/lib/archipelago/{apps,secrets,logs,backups}
|
||||
chown -R archipelago:archipelago /var/lib/archipelago
|
||||
|
||||
# Start services
|
||||
rc-service archipelago start 2>/dev/null || systemctl start archipelago 2>/dev/null || true
|
||||
INSTALL_EOF
|
||||
{
|
||||
echo '#!/bin/sh'
|
||||
echo '# First boot installation script for Archipelago'
|
||||
echo ''
|
||||
echo '# Install backend APK if available'
|
||||
echo 'if [ -f /tmp/archipelago-backend.apk ]; then'
|
||||
echo ' apk add --allow-untrusted /tmp/archipelago-backend.apk'
|
||||
echo ' rm /tmp/archipelago-backend.apk'
|
||||
echo 'fi'
|
||||
echo ''
|
||||
echo '# Enable services'
|
||||
echo 'rc-update add archipelago default 2>/dev/null || true'
|
||||
echo 'systemctl enable archipelago 2>/dev/null || true'
|
||||
echo ''
|
||||
echo '# Create archipelago user if needed'
|
||||
echo 'if ! id archipelago >/dev/null 2>&1; then'
|
||||
echo ' adduser -D -s /bin/bash archipelago'
|
||||
echo ' echo "archipelago ALL=(ALL) NOPASSWD: /usr/bin/podman" >>/etc/sudoers'
|
||||
echo 'fi'
|
||||
echo ''
|
||||
echo '# Setup Podman for archipelago user'
|
||||
echo 'mkdir -p /home/archipelago/.config/containers'
|
||||
echo 'chown -R archipelago:archipelago /home/archipelago'
|
||||
echo ''
|
||||
echo '# Create data directories'
|
||||
echo 'mkdir -p /var/lib/archipelago/apps /var/lib/archipelago/secrets /var/lib/archipelago/logs /var/lib/archipelago/backups'
|
||||
echo 'chown -R archipelago:archipelago /var/lib/archipelago'
|
||||
echo ''
|
||||
echo '# Start services'
|
||||
echo 'rc-service archipelago start 2>/dev/null || systemctl start archipelago 2>/dev/null || true'
|
||||
} > "$apkroot"/etc/local.d/archipelago-install.start
|
||||
chmod +x "$apkroot"/etc/local.d/archipelago-install.start
|
||||
}
|
||||
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
#!/bin/sh
|
||||
# Hardware detection and optimization script
|
||||
# Auto-generated for specific hardware target
|
||||
|
||||
detect_hardware() {
|
||||
echo "=== Hardware Detection ==="
|
||||
|
||||
# CPU info
|
||||
if [ -f /proc/cpuinfo ]; then
|
||||
echo "CPU: $(grep 'model name' /proc/cpuinfo | head -1 | cut -d':' -f2 | xargs)"
|
||||
echo "Cores: $(grep -c processor /proc/cpuinfo)"
|
||||
fi
|
||||
|
||||
# Memory
|
||||
if [ -f /proc/meminfo ]; then
|
||||
echo "Memory: $(grep MemTotal /proc/meminfo | awk '{printf "%.1f GB", $2/1024/1024}')"
|
||||
fi
|
||||
|
||||
# Storage
|
||||
if command -v lsblk >/dev/null 2>&1; then
|
||||
echo "Storage:"
|
||||
lsblk -d -o NAME,SIZE,TYPE | grep disk
|
||||
fi
|
||||
|
||||
# Network
|
||||
if command -v ip >/dev/null 2>&1; then
|
||||
echo "Network interfaces:"
|
||||
ip -br link show | grep -v lo
|
||||
fi
|
||||
|
||||
# PCI devices (for hardware identification)
|
||||
if command -v lspci >/dev/null 2>&1; then
|
||||
echo "PCI devices:"
|
||||
lspci | grep -E "VGA|Ethernet|Network"
|
||||
fi
|
||||
}
|
||||
|
||||
optimize_for_hardware() {
|
||||
echo "=== Hardware Optimization ==="
|
||||
|
||||
# Load Intel microcode if Intel CPU
|
||||
if grep -q Intel /proc/cpuinfo; then
|
||||
echo "Intel CPU detected, loading microcode..."
|
||||
modprobe intel_rapl_common 2>/dev/null || true
|
||||
modprobe intel_powerclamp 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Enable hardware acceleration for graphics
|
||||
if lspci | grep -q "Intel.*Graphics"; then
|
||||
echo "Intel Graphics detected"
|
||||
modprobe i915 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Optimize for NVMe if present
|
||||
if [ -e /dev/nvme0n1 ]; then
|
||||
echo "NVMe SSD detected, optimizing..."
|
||||
echo none > /sys/block/nvme0n1/queue/scheduler 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Optimize for SATA SSD if present
|
||||
if [ -e /dev/sda ]; then
|
||||
if hdparm -I /dev/sda 2>/dev/null | grep -q "Solid State"; then
|
||||
echo "SATA SSD detected, optimizing..."
|
||||
echo deadline > /sys/block/sda/queue/scheduler 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Run detection
|
||||
detect_hardware
|
||||
optimize_for_hardware
|
||||
@@ -0,0 +1,26 @@
|
||||
# Hardware profile for HP ProDesk 400 G4 DM
|
||||
# Auto-generated during build
|
||||
|
||||
[hardware]
|
||||
target = "hp-prodesk"
|
||||
name = "HP ProDesk 400 G4 DM"
|
||||
cpu_vendor = "intel"
|
||||
cpu_model = "varies"
|
||||
min_ram = "8GB"
|
||||
min_storage = "128GB"
|
||||
architecture = "x86_64"
|
||||
|
||||
[optimizations]
|
||||
enabled = intel-graphics intel-networking sata-ssd
|
||||
|
||||
[network]
|
||||
interfaces = "1x Gigabit Ethernet"
|
||||
|
||||
[usb]
|
||||
ports = "4x USB 3.0, 2x USB 2.0"
|
||||
|
||||
[build]
|
||||
version = "0.1.0"
|
||||
alpine_version = "3.19"
|
||||
build_date = "2026-01-31T19:47:29Z"
|
||||
build_type = "iso"
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
# First boot hardware detection and optimization
|
||||
|
||||
HARDWARE_INFO="/etc/archipelago/hardware-info.sh"
|
||||
|
||||
if [ -x "$HARDWARE_INFO" ]; then
|
||||
echo "🔍 Detecting hardware..."
|
||||
$HARDWARE_INFO > /var/log/archipelago-hardware.log 2>&1
|
||||
echo "✓ Hardware detection complete"
|
||||
fi
|
||||
|
||||
# Create system info file
|
||||
cat > /etc/archipelago/system-info.txt <<INFO
|
||||
Archipelago OS System Information
|
||||
Generated: $(date)
|
||||
|
||||
$(cat /etc/archipelago/hardware.toml 2>/dev/null)
|
||||
|
||||
Runtime Detection:
|
||||
$(cat /var/log/archipelago-hardware.log 2>/dev/null)
|
||||
INFO
|
||||
@@ -0,0 +1,38 @@
|
||||
# Archipelago Node OS Configuration
|
||||
|
||||
[server]
|
||||
# Server listening configuration
|
||||
host = "0.0.0.0" # Listen on all interfaces
|
||||
port = 8100
|
||||
data_dir = "/var/lib/archipelago"
|
||||
|
||||
[network]
|
||||
# Automatic Ethernet configuration
|
||||
auto_configure = true
|
||||
dhcp = true
|
||||
dns_servers = ["8.8.8.8", "8.8.4.4", "1.1.1.1"]
|
||||
|
||||
[containers]
|
||||
# Container runtime (Podman)
|
||||
runtime = "podman"
|
||||
rootless = true
|
||||
auto_start = true
|
||||
|
||||
[apps]
|
||||
# App directory
|
||||
apps_dir = "/var/lib/archipelago/apps"
|
||||
auto_start_enabled = true
|
||||
|
||||
[security]
|
||||
# Security settings
|
||||
require_auth = false # Disable for first boot, enable after setup
|
||||
secrets_dir = "/var/lib/archipelago/secrets"
|
||||
|
||||
[logging]
|
||||
level = "info"
|
||||
dir = "/var/lib/archipelago/logs"
|
||||
|
||||
[ui]
|
||||
# Web UI settings
|
||||
enabled = true
|
||||
path = "/usr/share/archipelago/web"
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
#!/bin/sh
|
||||
# Hardware detection and optimization script
|
||||
# Auto-generated for specific hardware target
|
||||
|
||||
detect_hardware() {
|
||||
echo "=== Hardware Detection ==="
|
||||
|
||||
# CPU info
|
||||
if [ -f /proc/cpuinfo ]; then
|
||||
echo "CPU: $(grep 'model name' /proc/cpuinfo | head -1 | cut -d':' -f2 | xargs)"
|
||||
echo "Cores: $(grep -c processor /proc/cpuinfo)"
|
||||
fi
|
||||
|
||||
# Memory
|
||||
if [ -f /proc/meminfo ]; then
|
||||
echo "Memory: $(grep MemTotal /proc/meminfo | awk '{printf "%.1f GB", $2/1024/1024}')"
|
||||
fi
|
||||
|
||||
# Storage
|
||||
if command -v lsblk >/dev/null 2>&1; then
|
||||
echo "Storage:"
|
||||
lsblk -d -o NAME,SIZE,TYPE | grep disk
|
||||
fi
|
||||
|
||||
# Network
|
||||
if command -v ip >/dev/null 2>&1; then
|
||||
echo "Network interfaces:"
|
||||
ip -br link show | grep -v lo
|
||||
fi
|
||||
|
||||
# PCI devices (for hardware identification)
|
||||
if command -v lspci >/dev/null 2>&1; then
|
||||
echo "PCI devices:"
|
||||
lspci | grep -E "VGA|Ethernet|Network"
|
||||
fi
|
||||
}
|
||||
|
||||
optimize_for_hardware() {
|
||||
echo "=== Hardware Optimization ==="
|
||||
|
||||
# Load Intel microcode if Intel CPU
|
||||
if grep -q Intel /proc/cpuinfo; then
|
||||
echo "Intel CPU detected, loading microcode..."
|
||||
modprobe intel_rapl_common 2>/dev/null || true
|
||||
modprobe intel_powerclamp 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Enable hardware acceleration for graphics
|
||||
if lspci | grep -q "Intel.*Graphics"; then
|
||||
echo "Intel Graphics detected"
|
||||
modprobe i915 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Optimize for NVMe if present
|
||||
if [ -e /dev/nvme0n1 ]; then
|
||||
echo "NVMe SSD detected, optimizing..."
|
||||
echo none > /sys/block/nvme0n1/queue/scheduler 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Optimize for SATA SSD if present
|
||||
if [ -e /dev/sda ]; then
|
||||
if hdparm -I /dev/sda 2>/dev/null | grep -q "Solid State"; then
|
||||
echo "SATA SSD detected, optimizing..."
|
||||
echo deadline > /sys/block/sda/queue/scheduler 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Run detection
|
||||
detect_hardware
|
||||
optimize_for_hardware
|
||||
@@ -0,0 +1,26 @@
|
||||
# Hardware profile for HP ProDesk 400 G4 DM
|
||||
# Auto-generated during build
|
||||
|
||||
[hardware]
|
||||
target = "hp-prodesk"
|
||||
name = "HP ProDesk 400 G4 DM"
|
||||
cpu_vendor = "intel"
|
||||
cpu_model = "varies"
|
||||
min_ram = "8GB"
|
||||
min_storage = "128GB"
|
||||
architecture = "x86_64"
|
||||
|
||||
[optimizations]
|
||||
enabled = intel-graphics intel-networking sata-ssd
|
||||
|
||||
[network]
|
||||
interfaces = "1x Gigabit Ethernet"
|
||||
|
||||
[usb]
|
||||
ports = "4x USB 3.0, 2x USB 2.0"
|
||||
|
||||
[build]
|
||||
version = "0.1.0"
|
||||
alpine_version = "3.19"
|
||||
build_date = "2026-01-31T19:47:29Z"
|
||||
build_type = "iso"
|
||||
@@ -0,0 +1 @@
|
||||
archipelago
|
||||
@@ -0,0 +1,4 @@
|
||||
127.0.0.1 localhost archipelago
|
||||
::1 localhost archipelago ip6-localhost ip6-loopback
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
||||
@@ -0,0 +1,52 @@
|
||||
#!/sbin/openrc-run
|
||||
# Archipelago Bitcoin Node OS Backend
|
||||
|
||||
name="Archipelago"
|
||||
description="Archipelago Bitcoin Node OS Backend Server"
|
||||
command="/usr/bin/archipelago-backend"
|
||||
command_user="archipelago:archipelago"
|
||||
command_background=true
|
||||
pidfile="/var/run/archipelago.pid"
|
||||
start_stop_daemon_args="--make-pidfile"
|
||||
|
||||
# Working directory and environment
|
||||
directory="/var/lib/archipelago"
|
||||
export RUST_LOG="${RUST_LOG:-info}"
|
||||
export ARCHIPELAGO_DATA_DIR="/var/lib/archipelago"
|
||||
export ARCHIPELAGO_PORT="${ARCHIPELAGO_PORT:-8100}"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
need localmount
|
||||
after firewall
|
||||
use podman docker
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
# Ensure directories exist
|
||||
checkpath --directory --mode 0755 --owner archipelago:archipelago \
|
||||
/var/lib/archipelago \
|
||||
/var/lib/archipelago/apps \
|
||||
/var/lib/archipelago/secrets \
|
||||
/var/lib/archipelago/logs \
|
||||
/var/lib/archipelago/backups
|
||||
|
||||
# Wait for network to be fully ready
|
||||
local retries=30
|
||||
while [ $retries -gt 0 ]; do
|
||||
if ping -c 1 -W 1 8.8.8.8 >/dev/null 2>&1; then
|
||||
einfo "Network is ready"
|
||||
return 0
|
||||
fi
|
||||
retries=$((retries - 1))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
ewarn "Network may not be fully ready"
|
||||
return 0
|
||||
}
|
||||
|
||||
start_post() {
|
||||
einfo "Archipelago backend started"
|
||||
einfo "Access the UI at: http://$(hostname -I | awk '{print $1}'):8100"
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
# Alpine Linux boot configuration for Archipelago
|
||||
# This runs early in the boot process
|
||||
|
||||
# Enable essential services
|
||||
rc-update add devfs sysinit 2>/dev/null || true
|
||||
rc-update add dmesg sysinit 2>/dev/null || true
|
||||
rc-update add mdev sysinit 2>/dev/null || true
|
||||
rc-update add hwdrivers sysinit 2>/dev/null || true
|
||||
|
||||
# Enable boot services
|
||||
rc-update add bootmisc boot 2>/dev/null || true
|
||||
rc-update add hostname boot 2>/dev/null || true
|
||||
rc-update add hwclock boot 2>/dev/null || true
|
||||
rc-update add modules boot 2>/dev/null || true
|
||||
rc-update add swap boot 2>/dev/null || true
|
||||
rc-update add sysctl boot 2>/dev/null || true
|
||||
rc-update add syslog boot 2>/dev/null || true
|
||||
rc-update add networking boot 2>/dev/null || true
|
||||
rc-update add urandom boot 2>/dev/null || true
|
||||
|
||||
# Enable default services
|
||||
rc-update add local default 2>/dev/null || true
|
||||
rc-update add sshd default 2>/dev/null || true
|
||||
rc-update add archipelago default 2>/dev/null || true
|
||||
|
||||
# Enable shutdown services
|
||||
rc-update add killprocs shutdown 2>/dev/null || true
|
||||
rc-update add mount-ro shutdown 2>/dev/null || true
|
||||
rc-update add savecache shutdown 2>/dev/null || true
|
||||
|
||||
echo "✓ Archipelago boot services configured"
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
# First boot hardware detection and optimization
|
||||
|
||||
HARDWARE_INFO="/etc/archipelago/hardware-info.sh"
|
||||
|
||||
if [ -x "$HARDWARE_INFO" ]; then
|
||||
echo "🔍 Detecting hardware..."
|
||||
$HARDWARE_INFO > /var/log/archipelago-hardware.log 2>&1
|
||||
echo "✓ Hardware detection complete"
|
||||
fi
|
||||
|
||||
# Create system info file
|
||||
cat > /etc/archipelago/system-info.txt <<INFO
|
||||
Archipelago OS System Information
|
||||
Generated: $(date)
|
||||
|
||||
$(cat /etc/archipelago/hardware.toml 2>/dev/null)
|
||||
|
||||
Runtime Detection:
|
||||
$(cat /var/log/archipelago-hardware.log 2>/dev/null)
|
||||
INFO
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
#!/bin/sh
|
||||
# First boot network and service setup for Archipelago
|
||||
|
||||
# Configure hostname
|
||||
if [ ! -f /etc/hostname.configured ]; then
|
||||
echo "archipelago-node" > /etc/hostname
|
||||
hostname archipelago-node
|
||||
touch /etc/hostname.configured
|
||||
fi
|
||||
|
||||
# Configure networking - Ethernet with DHCP
|
||||
if [ ! -f /etc/network/interfaces.configured ]; then
|
||||
cat > /etc/network/interfaces <<'NETEOF'
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
# Automatic Ethernet configuration (DHCP)
|
||||
auto eth0
|
||||
iface eth0 inet dhcp
|
||||
hostname archipelago-node
|
||||
|
||||
# Fallback for other ethernet names
|
||||
auto enp0s3
|
||||
iface enp0s3 inet dhcp
|
||||
hostname archipelago-node
|
||||
|
||||
auto enp0s25
|
||||
iface enp0s25 inet dhcp
|
||||
hostname archipelago-node
|
||||
|
||||
auto ens0
|
||||
iface ens0 inet dhcp
|
||||
hostname archipelago-node
|
||||
NETEOF
|
||||
touch /etc/network/interfaces.configured
|
||||
fi
|
||||
|
||||
# Enable and start networking
|
||||
rc-update add networking boot 2>/dev/null || true
|
||||
rc-service networking start 2>/dev/null || true
|
||||
|
||||
# Wait for network to be ready
|
||||
echo "Waiting for network..."
|
||||
retries=30
|
||||
while [ $retries -gt 0 ]; do
|
||||
if ip route | grep -q default; then
|
||||
echo "✓ Network is ready"
|
||||
ip addr show | grep "inet " | grep -v "127.0.0.1"
|
||||
break
|
||||
fi
|
||||
retries=$((retries - 1))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Enable DNS
|
||||
if [ ! -f /etc/resolv.conf.configured ]; then
|
||||
cat > /etc/resolv.conf <<'DNSEOF'
|
||||
nameserver 8.8.8.8
|
||||
nameserver 8.8.4.4
|
||||
nameserver 1.1.1.1
|
||||
DNSEOF
|
||||
touch /etc/resolv.conf.configured
|
||||
fi
|
||||
|
||||
# Test internet connectivity
|
||||
echo "Testing internet connectivity..."
|
||||
if ping -c 2 8.8.8.8 >/dev/null 2>&1; then
|
||||
echo "✓ Internet connection established"
|
||||
else
|
||||
echo "⚠ Warning: No internet connection detected"
|
||||
fi
|
||||
|
||||
# Enable Archipelago service
|
||||
rc-update add archipelago default 2>/dev/null || true
|
||||
|
||||
# Display access information
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "🏝️ Archipelago Bitcoin Node OS"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo ""
|
||||
echo "Network Configuration:"
|
||||
ip -4 addr show | grep inet | grep -v 127.0.0.1 | awk '{print " IP Address: " $2}'
|
||||
echo ""
|
||||
echo "Access the Archipelago UI at:"
|
||||
ip -4 addr show | grep inet | grep -v 127.0.0.1 | awk '{print " http://" $2}' | sed 's|/.*|:8100|'
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
@@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
# First boot installation script for Archipelago
|
||||
# This script runs on first boot to complete Archipelago setup
|
||||
|
||||
set -e
|
||||
|
||||
echo "🚀 Archipelago first boot setup..."
|
||||
|
||||
# Install backend APK if available
|
||||
if [ -f /tmp/archipelago-backend.apk ]; then
|
||||
echo "📦 Installing Archipelago backend..."
|
||||
apk add --allow-untrusted /tmp/archipelago-backend.apk || true
|
||||
rm -f /tmp/archipelago-backend.apk
|
||||
fi
|
||||
|
||||
# Create archipelago user if needed
|
||||
if ! id archipelago >/dev/null 2>&1; then
|
||||
echo "👤 Creating archipelago user..."
|
||||
adduser -D -s /bin/bash archipelago || true
|
||||
echo "archipelago ALL=(ALL) NOPASSWD: /usr/bin/podman" >> /etc/sudoers || true
|
||||
fi
|
||||
|
||||
# Setup Podman for archipelago user
|
||||
echo "🐳 Configuring Podman..."
|
||||
mkdir -p /home/archipelago/.config/containers
|
||||
chown -R archipelago:archipelago /home/archipelago || true
|
||||
|
||||
# Create data directories
|
||||
echo "📁 Creating data directories..."
|
||||
mkdir -p /var/lib/archipelago/{apps,secrets,logs,backups}
|
||||
chown -R archipelago:archipelago /var/lib/archipelago || true
|
||||
|
||||
# Enable services
|
||||
echo "⚙️ Enabling services..."
|
||||
rc-update add archipelago default 2>/dev/null || true
|
||||
systemctl enable archipelago 2>/dev/null || true
|
||||
|
||||
# Start services
|
||||
echo "🚀 Starting services..."
|
||||
rc-service archipelago start 2>/dev/null || systemctl start archipelago 2>/dev/null || true
|
||||
|
||||
echo "✅ Archipelago setup complete!"
|
||||
echo " Web UI: http://$(hostname -I | awk '{print $1}'):8100"
|
||||
echo " API: http://$(hostname -I | awk '{print $1}'):5959"
|
||||
@@ -0,0 +1,29 @@
|
||||
[Unit]
|
||||
Description=Archipelago Bitcoin Node OS Backend
|
||||
After=network.target podman.service
|
||||
Wants=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=archipelago
|
||||
Group=archipelago
|
||||
WorkingDirectory=/var/lib/archipelago
|
||||
ExecStart=/usr/bin/archipelago
|
||||
Restart=always
|
||||
RestartSec=10
|
||||
StandardOutput=journal
|
||||
StandardError=journal
|
||||
|
||||
# Security
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=strict
|
||||
ProtectHome=true
|
||||
ReadWritePaths=/var/lib/archipelago /tmp
|
||||
|
||||
# Environment
|
||||
Environment="RUST_LOG=info"
|
||||
Environment="ARCHIPELAGO_DATA_DIR=/var/lib/archipelago"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
#!/bin/sh
|
||||
# Hardware detection and optimization script
|
||||
# Auto-generated for specific hardware target
|
||||
|
||||
detect_hardware() {
|
||||
echo "=== Hardware Detection ==="
|
||||
|
||||
# CPU info
|
||||
if [ -f /proc/cpuinfo ]; then
|
||||
echo "CPU: $(grep 'model name' /proc/cpuinfo | head -1 | cut -d':' -f2 | xargs)"
|
||||
echo "Cores: $(grep -c processor /proc/cpuinfo)"
|
||||
fi
|
||||
|
||||
# Memory
|
||||
if [ -f /proc/meminfo ]; then
|
||||
echo "Memory: $(grep MemTotal /proc/meminfo | awk '{printf "%.1f GB", $2/1024/1024}')"
|
||||
fi
|
||||
|
||||
# Storage
|
||||
if command -v lsblk >/dev/null 2>&1; then
|
||||
echo "Storage:"
|
||||
lsblk -d -o NAME,SIZE,TYPE | grep disk
|
||||
fi
|
||||
|
||||
# Network
|
||||
if command -v ip >/dev/null 2>&1; then
|
||||
echo "Network interfaces:"
|
||||
ip -br link show | grep -v lo
|
||||
fi
|
||||
|
||||
# PCI devices (for hardware identification)
|
||||
if command -v lspci >/dev/null 2>&1; then
|
||||
echo "PCI devices:"
|
||||
lspci | grep -E "VGA|Ethernet|Network"
|
||||
fi
|
||||
}
|
||||
|
||||
optimize_for_hardware() {
|
||||
echo "=== Hardware Optimization ==="
|
||||
|
||||
# Load Intel microcode if Intel CPU
|
||||
if grep -q Intel /proc/cpuinfo; then
|
||||
echo "Intel CPU detected, loading microcode..."
|
||||
modprobe intel_rapl_common 2>/dev/null || true
|
||||
modprobe intel_powerclamp 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Enable hardware acceleration for graphics
|
||||
if lspci | grep -q "Intel.*Graphics"; then
|
||||
echo "Intel Graphics detected"
|
||||
modprobe i915 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Optimize for NVMe if present
|
||||
if [ -e /dev/nvme0n1 ]; then
|
||||
echo "NVMe SSD detected, optimizing..."
|
||||
echo none > /sys/block/nvme0n1/queue/scheduler 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Optimize for SATA SSD if present
|
||||
if [ -e /dev/sda ]; then
|
||||
if hdparm -I /dev/sda 2>/dev/null | grep -q "Solid State"; then
|
||||
echo "SATA SSD detected, optimizing..."
|
||||
echo deadline > /sys/block/sda/queue/scheduler 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Run detection
|
||||
detect_hardware
|
||||
optimize_for_hardware
|
||||
@@ -0,0 +1,26 @@
|
||||
# Hardware profile for Start9 Server Pure
|
||||
# Auto-generated during build
|
||||
|
||||
[hardware]
|
||||
target = "start9-pure"
|
||||
name = "Start9 Server Pure"
|
||||
cpu_vendor = "intel"
|
||||
cpu_model = "i7-10710U"
|
||||
min_ram = "32GB"
|
||||
min_storage = "2TB"
|
||||
architecture = "x86_64"
|
||||
|
||||
[optimizations]
|
||||
enabled = intel-graphics intel-networking nvme-ssd
|
||||
|
||||
[network]
|
||||
interfaces = "1x Gigabit Ethernet"
|
||||
|
||||
[usb]
|
||||
ports = "4x USB 3.0, 2x USB 2.0, 1x USB-C 3.1"
|
||||
|
||||
[build]
|
||||
version = "0.1.0"
|
||||
alpine_version = "3.19"
|
||||
build_date = "2026-01-31T19:35:38Z"
|
||||
build_type = "iso"
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
# First boot hardware detection and optimization
|
||||
|
||||
HARDWARE_INFO="/etc/archipelago/hardware-info.sh"
|
||||
|
||||
if [ -x "$HARDWARE_INFO" ]; then
|
||||
echo "🔍 Detecting hardware..."
|
||||
$HARDWARE_INFO > /var/log/archipelago-hardware.log 2>&1
|
||||
echo "✓ Hardware detection complete"
|
||||
fi
|
||||
|
||||
# Create system info file
|
||||
cat > /etc/archipelago/system-info.txt <<INFO
|
||||
Archipelago OS System Information
|
||||
Generated: $(date)
|
||||
|
||||
$(cat /etc/archipelago/hardware.toml 2>/dev/null)
|
||||
|
||||
Runtime Detection:
|
||||
$(cat /var/log/archipelago-hardware.log 2>/dev/null)
|
||||
INFO
|
||||
@@ -1,8 +1,38 @@
|
||||
# Archipelago Node OS Configuration
|
||||
|
||||
[server]
|
||||
# Server listening configuration
|
||||
host = "0.0.0.0" # Listen on all interfaces
|
||||
port = 8100
|
||||
data_dir = "/var/lib/archipelago"
|
||||
bind_host = "0.0.0.0"
|
||||
bind_port = 5959
|
||||
log_level = "info"
|
||||
dev_mode = false
|
||||
container_runtime = "podman"
|
||||
port_offset = 0
|
||||
bitcoin_simulation = "none"
|
||||
|
||||
[network]
|
||||
# Automatic Ethernet configuration
|
||||
auto_configure = true
|
||||
dhcp = true
|
||||
dns_servers = ["8.8.8.8", "8.8.4.4", "1.1.1.1"]
|
||||
|
||||
[containers]
|
||||
# Container runtime (Podman)
|
||||
runtime = "podman"
|
||||
rootless = true
|
||||
auto_start = true
|
||||
|
||||
[apps]
|
||||
# App directory
|
||||
apps_dir = "/var/lib/archipelago/apps"
|
||||
auto_start_enabled = true
|
||||
|
||||
[security]
|
||||
# Security settings
|
||||
require_auth = false # Disable for first boot, enable after setup
|
||||
secrets_dir = "/var/lib/archipelago/secrets"
|
||||
|
||||
[logging]
|
||||
level = "info"
|
||||
dir = "/var/lib/archipelago/logs"
|
||||
|
||||
[ui]
|
||||
# Web UI settings
|
||||
enabled = true
|
||||
path = "/usr/share/archipelago/web"
|
||||
|
||||
@@ -2,13 +2,51 @@
|
||||
# Archipelago Bitcoin Node OS Backend
|
||||
|
||||
name="Archipelago"
|
||||
command="/usr/bin/archipelago"
|
||||
description="Archipelago Bitcoin Node OS Backend Server"
|
||||
command="/usr/bin/archipelago-backend"
|
||||
command_user="archipelago:archipelago"
|
||||
command_background=true
|
||||
pidfile="/var/run/archipelago.pid"
|
||||
start_stop_daemon_args="--make-pidfile"
|
||||
|
||||
# Working directory and environment
|
||||
directory="/var/lib/archipelago"
|
||||
export RUST_LOG="${RUST_LOG:-info}"
|
||||
export ARCHIPELAGO_DATA_DIR="/var/lib/archipelago"
|
||||
export ARCHIPELAGO_PORT="${ARCHIPELAGO_PORT:-8100}"
|
||||
|
||||
depend() {
|
||||
need net
|
||||
use podman
|
||||
need localmount
|
||||
after firewall
|
||||
use podman docker
|
||||
}
|
||||
|
||||
start_pre() {
|
||||
# Ensure directories exist
|
||||
checkpath --directory --mode 0755 --owner archipelago:archipelago \
|
||||
/var/lib/archipelago \
|
||||
/var/lib/archipelago/apps \
|
||||
/var/lib/archipelago/secrets \
|
||||
/var/lib/archipelago/logs \
|
||||
/var/lib/archipelago/backups
|
||||
|
||||
# Wait for network to be fully ready
|
||||
local retries=30
|
||||
while [ $retries -gt 0 ]; do
|
||||
if ping -c 1 -W 1 8.8.8.8 >/dev/null 2>&1; then
|
||||
einfo "Network is ready"
|
||||
return 0
|
||||
fi
|
||||
retries=$((retries - 1))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
ewarn "Network may not be fully ready"
|
||||
return 0
|
||||
}
|
||||
|
||||
start_post() {
|
||||
einfo "Archipelago backend started"
|
||||
einfo "Access the UI at: http://$(hostname -I | awk '{print $1}'):8100"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
# Alpine Linux boot configuration for Archipelago
|
||||
# This runs early in the boot process
|
||||
|
||||
# Enable essential services
|
||||
rc-update add devfs sysinit 2>/dev/null || true
|
||||
rc-update add dmesg sysinit 2>/dev/null || true
|
||||
rc-update add mdev sysinit 2>/dev/null || true
|
||||
rc-update add hwdrivers sysinit 2>/dev/null || true
|
||||
|
||||
# Enable boot services
|
||||
rc-update add bootmisc boot 2>/dev/null || true
|
||||
rc-update add hostname boot 2>/dev/null || true
|
||||
rc-update add hwclock boot 2>/dev/null || true
|
||||
rc-update add modules boot 2>/dev/null || true
|
||||
rc-update add swap boot 2>/dev/null || true
|
||||
rc-update add sysctl boot 2>/dev/null || true
|
||||
rc-update add syslog boot 2>/dev/null || true
|
||||
rc-update add networking boot 2>/dev/null || true
|
||||
rc-update add urandom boot 2>/dev/null || true
|
||||
|
||||
# Enable default services
|
||||
rc-update add local default 2>/dev/null || true
|
||||
rc-update add sshd default 2>/dev/null || true
|
||||
rc-update add archipelago default 2>/dev/null || true
|
||||
|
||||
# Enable shutdown services
|
||||
rc-update add killprocs shutdown 2>/dev/null || true
|
||||
rc-update add mount-ro shutdown 2>/dev/null || true
|
||||
rc-update add savecache shutdown 2>/dev/null || true
|
||||
|
||||
echo "✓ Archipelago boot services configured"
|
||||
@@ -0,0 +1,88 @@
|
||||
#!/bin/sh
|
||||
# First boot network and service setup for Archipelago
|
||||
|
||||
# Configure hostname
|
||||
if [ ! -f /etc/hostname.configured ]; then
|
||||
echo "archipelago-node" > /etc/hostname
|
||||
hostname archipelago-node
|
||||
touch /etc/hostname.configured
|
||||
fi
|
||||
|
||||
# Configure networking - Ethernet with DHCP
|
||||
if [ ! -f /etc/network/interfaces.configured ]; then
|
||||
cat > /etc/network/interfaces <<'NETEOF'
|
||||
auto lo
|
||||
iface lo inet loopback
|
||||
|
||||
# Automatic Ethernet configuration (DHCP)
|
||||
auto eth0
|
||||
iface eth0 inet dhcp
|
||||
hostname archipelago-node
|
||||
|
||||
# Fallback for other ethernet names
|
||||
auto enp0s3
|
||||
iface enp0s3 inet dhcp
|
||||
hostname archipelago-node
|
||||
|
||||
auto enp0s25
|
||||
iface enp0s25 inet dhcp
|
||||
hostname archipelago-node
|
||||
|
||||
auto ens0
|
||||
iface ens0 inet dhcp
|
||||
hostname archipelago-node
|
||||
NETEOF
|
||||
touch /etc/network/interfaces.configured
|
||||
fi
|
||||
|
||||
# Enable and start networking
|
||||
rc-update add networking boot 2>/dev/null || true
|
||||
rc-service networking start 2>/dev/null || true
|
||||
|
||||
# Wait for network to be ready
|
||||
echo "Waiting for network..."
|
||||
retries=30
|
||||
while [ $retries -gt 0 ]; do
|
||||
if ip route | grep -q default; then
|
||||
echo "✓ Network is ready"
|
||||
ip addr show | grep "inet " | grep -v "127.0.0.1"
|
||||
break
|
||||
fi
|
||||
retries=$((retries - 1))
|
||||
sleep 1
|
||||
done
|
||||
|
||||
# Enable DNS
|
||||
if [ ! -f /etc/resolv.conf.configured ]; then
|
||||
cat > /etc/resolv.conf <<'DNSEOF'
|
||||
nameserver 8.8.8.8
|
||||
nameserver 8.8.4.4
|
||||
nameserver 1.1.1.1
|
||||
DNSEOF
|
||||
touch /etc/resolv.conf.configured
|
||||
fi
|
||||
|
||||
# Test internet connectivity
|
||||
echo "Testing internet connectivity..."
|
||||
if ping -c 2 8.8.8.8 >/dev/null 2>&1; then
|
||||
echo "✓ Internet connection established"
|
||||
else
|
||||
echo "⚠ Warning: No internet connection detected"
|
||||
fi
|
||||
|
||||
# Enable Archipelago service
|
||||
rc-update add archipelago default 2>/dev/null || true
|
||||
|
||||
# Display access information
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "🏝️ Archipelago Bitcoin Node OS"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo ""
|
||||
echo "Network Configuration:"
|
||||
ip -4 addr show | grep inet | grep -v 127.0.0.1 | awk '{print " IP Address: " $2}'
|
||||
echo ""
|
||||
echo "Access the Archipelago UI at:"
|
||||
ip -4 addr show | grep inet | grep -v 127.0.0.1 | awk '{print " http://" $2}' | sed 's|/.*|:8100|'
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
Submodule
+1
Submodule image-recipe/aports added at 1e77b77379
Executable
+72
@@ -0,0 +1,72 @@
|
||||
#!/bin/bash
|
||||
# Quick build script - builds for all supported hardware targets
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
BUILD_TYPE="${1:-iso}"
|
||||
|
||||
echo "🏗️ Building Archipelago for all supported hardware"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo ""
|
||||
|
||||
# Array of hardware targets
|
||||
TARGETS=(
|
||||
"start9-pure:Start9 Server Pure"
|
||||
"hp-prodesk:HP ProDesk 400 G4 DM"
|
||||
"dell-optiplex:Dell OptiPlex"
|
||||
"generic:Generic x86_64"
|
||||
)
|
||||
|
||||
SUCCESS_COUNT=0
|
||||
FAIL_COUNT=0
|
||||
FAILED_TARGETS=()
|
||||
|
||||
# Build for each target
|
||||
for target_info in "${TARGETS[@]}"; do
|
||||
IFS=':' read -r target_name target_desc <<< "$target_info"
|
||||
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "🔨 Building for: $target_desc"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo ""
|
||||
|
||||
if "$SCRIPT_DIR/build-for-hardware.sh" "$target_name" "$BUILD_TYPE"; then
|
||||
echo "✅ $target_desc build succeeded"
|
||||
((SUCCESS_COUNT++))
|
||||
else
|
||||
echo "❌ $target_desc build failed"
|
||||
((FAIL_COUNT++))
|
||||
FAILED_TARGETS+=("$target_desc")
|
||||
fi
|
||||
done
|
||||
|
||||
# Summary
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "📊 Build Summary"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo " Successful: $SUCCESS_COUNT"
|
||||
echo " Failed: $FAIL_COUNT"
|
||||
|
||||
if [ $FAIL_COUNT -gt 0 ]; then
|
||||
echo ""
|
||||
echo "Failed builds:"
|
||||
for target in "${FAILED_TARGETS[@]}"; do
|
||||
echo " - $target"
|
||||
done
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "📦 Build output: $SCRIPT_DIR/results/"
|
||||
ls -lh "$SCRIPT_DIR/results/"*.iso 2>/dev/null || echo " (no ISOs found)"
|
||||
|
||||
echo ""
|
||||
if [ $FAIL_COUNT -eq 0 ]; then
|
||||
echo "✅ All builds completed successfully!"
|
||||
exit 0
|
||||
else
|
||||
echo "⚠️ Some builds failed. Check logs above."
|
||||
exit 1
|
||||
fi
|
||||
@@ -54,9 +54,13 @@ fi
|
||||
|
||||
# Copy custom profile
|
||||
echo "📝 Setting up custom Archipelago profile..."
|
||||
PROFILE_DIR="$APORTS_DIR/scripts/mkimg.archipelago"
|
||||
# Copy profile script to Alpine scripts directory (force overwrite)
|
||||
cp -f "$SCRIPT_DIR/alpine-profile/mkimg.archipelago.sh" "$APORTS_DIR/scripts/"
|
||||
|
||||
# Copy overlay files
|
||||
PROFILE_DIR="$APORTS_DIR/scripts/mkimg.archipelago.d"
|
||||
mkdir -p "$PROFILE_DIR"
|
||||
cp -r "$SCRIPT_DIR/alpine-profile/"* "$PROFILE_DIR/" 2>/dev/null || true
|
||||
cp -r "$SCRIPT_DIR/alpine-profile/overlay" "$PROFILE_DIR/" 2>/dev/null || true
|
||||
|
||||
# Build ISO or disk image
|
||||
cd "$APORTS_DIR/scripts"
|
||||
|
||||
Executable
+374
@@ -0,0 +1,374 @@
|
||||
#!/bin/bash
|
||||
# Build Archipelago OS for specific hardware target
|
||||
# Supports: start9-pure, hp-prodesk, dell-optiplex, generic
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
|
||||
# Hardware target (default: generic)
|
||||
HARDWARE_TARGET="${1:-generic}"
|
||||
BUILD_TYPE="${2:-iso}"
|
||||
|
||||
ARCHIPELAGO_VERSION="${ARCHIPELAGO_VERSION:-0.1.0}"
|
||||
ALPINE_VERSION="${ALPINE_VERSION:-3.19}"
|
||||
ARCH="x86_64" # All supported hardware is x86_64
|
||||
|
||||
# Color output
|
||||
GREEN='\033[0;32m'
|
||||
BLUE='\033[0;34m'
|
||||
YELLOW='\033[1;33m'
|
||||
RED='\033[0;31m'
|
||||
NC='\033[0m' # No Color
|
||||
|
||||
echo -e "${BLUE}🏗️ Archipelago OS Builder${NC}"
|
||||
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
||||
echo ""
|
||||
|
||||
# Validate hardware target
|
||||
case "$HARDWARE_TARGET" in
|
||||
start9-pure|start9)
|
||||
HARDWARE_NAME="Start9 Server Pure"
|
||||
HARDWARE_PROFILE="start9-pure"
|
||||
CPU_VENDOR="intel"
|
||||
CPU_MODEL="i7-10710U"
|
||||
RAM_MIN="32GB"
|
||||
STORAGE_MIN="2TB"
|
||||
NETWORK_INTERFACES="1x Gigabit Ethernet"
|
||||
USB_PORTS="4x USB 3.0, 2x USB 2.0, 1x USB-C 3.1"
|
||||
OPTIMIZATIONS="intel-graphics intel-networking nvme-ssd"
|
||||
;;
|
||||
hp-prodesk|prodesk)
|
||||
HARDWARE_NAME="HP ProDesk 400 G4 DM"
|
||||
HARDWARE_PROFILE="hp-prodesk"
|
||||
CPU_VENDOR="intel"
|
||||
CPU_MODEL="varies"
|
||||
RAM_MIN="8GB"
|
||||
STORAGE_MIN="128GB"
|
||||
NETWORK_INTERFACES="1x Gigabit Ethernet"
|
||||
USB_PORTS="4x USB 3.0, 2x USB 2.0"
|
||||
OPTIMIZATIONS="intel-graphics intel-networking sata-ssd"
|
||||
;;
|
||||
dell-optiplex|optiplex)
|
||||
HARDWARE_NAME="Dell OptiPlex"
|
||||
HARDWARE_PROFILE="dell-optiplex"
|
||||
CPU_VENDOR="intel"
|
||||
CPU_MODEL="varies"
|
||||
RAM_MIN="8GB"
|
||||
STORAGE_MIN="128GB"
|
||||
NETWORK_INTERFACES="1x Gigabit Ethernet"
|
||||
USB_PORTS="Multiple USB ports"
|
||||
OPTIMIZATIONS="intel-graphics intel-networking sata-ssd"
|
||||
;;
|
||||
generic)
|
||||
HARDWARE_NAME="Generic x86_64"
|
||||
HARDWARE_PROFILE="generic"
|
||||
CPU_VENDOR="any"
|
||||
CPU_MODEL="any"
|
||||
RAM_MIN="8GB"
|
||||
STORAGE_MIN="128GB"
|
||||
NETWORK_INTERFACES="any"
|
||||
USB_PORTS="any"
|
||||
OPTIMIZATIONS="generic"
|
||||
;;
|
||||
*)
|
||||
echo -e "${RED}❌ Unknown hardware target: $HARDWARE_TARGET${NC}"
|
||||
echo ""
|
||||
echo "Supported targets:"
|
||||
echo " start9-pure - Start9 Server Pure (Intel i7-10710U)"
|
||||
echo " hp-prodesk - HP ProDesk 400 G4 DM"
|
||||
echo " dell-optiplex - Dell OptiPlex"
|
||||
echo " generic - Generic x86_64 hardware"
|
||||
echo ""
|
||||
echo "Usage: $0 <hardware-target> [iso|disk]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo -e "${GREEN}📋 Build Configuration${NC}"
|
||||
echo -e "━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo -e " Hardware: ${YELLOW}${HARDWARE_NAME}${NC}"
|
||||
echo -e " Profile: ${HARDWARE_PROFILE}"
|
||||
echo -e " CPU: ${CPU_VENDOR} ${CPU_MODEL}"
|
||||
echo -e " Min RAM: ${RAM_MIN}"
|
||||
echo -e " Min Storage: ${STORAGE_MIN}"
|
||||
echo -e " Network: ${NETWORK_INTERFACES}"
|
||||
echo -e " Build Type: ${BUILD_TYPE}"
|
||||
echo -e " Architecture: ${ARCH}"
|
||||
echo -e " Version: ${ARCHIPELAGO_VERSION}"
|
||||
echo -e " Alpine: ${ALPINE_VERSION}"
|
||||
echo ""
|
||||
|
||||
# Create hardware-specific overlay
|
||||
HARDWARE_OVERLAY_DIR="$SCRIPT_DIR/alpine-profile/overlay-${HARDWARE_PROFILE}"
|
||||
mkdir -p "$HARDWARE_OVERLAY_DIR/etc/archipelago"
|
||||
|
||||
# Create hardware detection script
|
||||
cat > "$HARDWARE_OVERLAY_DIR/etc/archipelago/hardware-info.sh" <<'EOF'
|
||||
#!/bin/sh
|
||||
# Hardware detection and optimization script
|
||||
# Auto-generated for specific hardware target
|
||||
|
||||
detect_hardware() {
|
||||
echo "=== Hardware Detection ==="
|
||||
|
||||
# CPU info
|
||||
if [ -f /proc/cpuinfo ]; then
|
||||
echo "CPU: $(grep 'model name' /proc/cpuinfo | head -1 | cut -d':' -f2 | xargs)"
|
||||
echo "Cores: $(grep -c processor /proc/cpuinfo)"
|
||||
fi
|
||||
|
||||
# Memory
|
||||
if [ -f /proc/meminfo ]; then
|
||||
echo "Memory: $(grep MemTotal /proc/meminfo | awk '{printf "%.1f GB", $2/1024/1024}')"
|
||||
fi
|
||||
|
||||
# Storage
|
||||
if command -v lsblk >/dev/null 2>&1; then
|
||||
echo "Storage:"
|
||||
lsblk -d -o NAME,SIZE,TYPE | grep disk
|
||||
fi
|
||||
|
||||
# Network
|
||||
if command -v ip >/dev/null 2>&1; then
|
||||
echo "Network interfaces:"
|
||||
ip -br link show | grep -v lo
|
||||
fi
|
||||
|
||||
# PCI devices (for hardware identification)
|
||||
if command -v lspci >/dev/null 2>&1; then
|
||||
echo "PCI devices:"
|
||||
lspci | grep -E "VGA|Ethernet|Network"
|
||||
fi
|
||||
}
|
||||
|
||||
optimize_for_hardware() {
|
||||
echo "=== Hardware Optimization ==="
|
||||
|
||||
# Load Intel microcode if Intel CPU
|
||||
if grep -q Intel /proc/cpuinfo; then
|
||||
echo "Intel CPU detected, loading microcode..."
|
||||
modprobe intel_rapl_common 2>/dev/null || true
|
||||
modprobe intel_powerclamp 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Enable hardware acceleration for graphics
|
||||
if lspci | grep -q "Intel.*Graphics"; then
|
||||
echo "Intel Graphics detected"
|
||||
modprobe i915 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Optimize for NVMe if present
|
||||
if [ -e /dev/nvme0n1 ]; then
|
||||
echo "NVMe SSD detected, optimizing..."
|
||||
echo none > /sys/block/nvme0n1/queue/scheduler 2>/dev/null || true
|
||||
fi
|
||||
|
||||
# Optimize for SATA SSD if present
|
||||
if [ -e /dev/sda ]; then
|
||||
if hdparm -I /dev/sda 2>/dev/null | grep -q "Solid State"; then
|
||||
echo "SATA SSD detected, optimizing..."
|
||||
echo deadline > /sys/block/sda/queue/scheduler 2>/dev/null || true
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Run detection
|
||||
detect_hardware
|
||||
optimize_for_hardware
|
||||
EOF
|
||||
|
||||
chmod +x "$HARDWARE_OVERLAY_DIR/etc/archipelago/hardware-info.sh"
|
||||
|
||||
# Create hardware-specific config
|
||||
cat > "$HARDWARE_OVERLAY_DIR/etc/archipelago/hardware.toml" <<EOF
|
||||
# Hardware profile for ${HARDWARE_NAME}
|
||||
# Auto-generated during build
|
||||
|
||||
[hardware]
|
||||
target = "${HARDWARE_PROFILE}"
|
||||
name = "${HARDWARE_NAME}"
|
||||
cpu_vendor = "${CPU_VENDOR}"
|
||||
cpu_model = "${CPU_MODEL}"
|
||||
min_ram = "${RAM_MIN}"
|
||||
min_storage = "${STORAGE_MIN}"
|
||||
architecture = "${ARCH}"
|
||||
|
||||
[optimizations]
|
||||
enabled = ${OPTIMIZATIONS}
|
||||
|
||||
[network]
|
||||
interfaces = "${NETWORK_INTERFACES}"
|
||||
|
||||
[usb]
|
||||
ports = "${USB_PORTS}"
|
||||
|
||||
[build]
|
||||
version = "${ARCHIPELAGO_VERSION}"
|
||||
alpine_version = "${ALPINE_VERSION}"
|
||||
build_date = "$(date -u +%Y-%m-%dT%H:%M:%SZ)"
|
||||
build_type = "${BUILD_TYPE}"
|
||||
EOF
|
||||
|
||||
echo -e "${GREEN}✓${NC} Hardware profile created: ${HARDWARE_PROFILE}"
|
||||
echo ""
|
||||
|
||||
# Create first-boot hardware detection service
|
||||
mkdir -p "$HARDWARE_OVERLAY_DIR/etc/local.d"
|
||||
cat > "$HARDWARE_OVERLAY_DIR/etc/local.d/00-hardware-detect.start" <<'EOF'
|
||||
#!/bin/sh
|
||||
# First boot hardware detection and optimization
|
||||
|
||||
HARDWARE_INFO="/etc/archipelago/hardware-info.sh"
|
||||
|
||||
if [ -x "$HARDWARE_INFO" ]; then
|
||||
echo "🔍 Detecting hardware..."
|
||||
$HARDWARE_INFO > /var/log/archipelago-hardware.log 2>&1
|
||||
echo "✓ Hardware detection complete"
|
||||
fi
|
||||
|
||||
# Create system info file
|
||||
cat > /etc/archipelago/system-info.txt <<INFO
|
||||
Archipelago OS System Information
|
||||
Generated: $(date)
|
||||
|
||||
$(cat /etc/archipelago/hardware.toml 2>/dev/null)
|
||||
|
||||
Runtime Detection:
|
||||
$(cat /var/log/archipelago-hardware.log 2>/dev/null)
|
||||
INFO
|
||||
EOF
|
||||
|
||||
chmod +x "$HARDWARE_OVERLAY_DIR/etc/local.d/00-hardware-detect.start"
|
||||
|
||||
# Merge with base overlay
|
||||
echo -e "${BLUE}📦 Merging overlays...${NC}"
|
||||
MERGED_OVERLAY="$SCRIPT_DIR/alpine-profile/overlay-merged"
|
||||
rm -rf "$MERGED_OVERLAY"
|
||||
mkdir -p "$MERGED_OVERLAY"
|
||||
|
||||
# Copy base overlay
|
||||
if [ -d "$SCRIPT_DIR/alpine-profile/overlay" ]; then
|
||||
cp -a "$SCRIPT_DIR/alpine-profile/overlay/"* "$MERGED_OVERLAY/"
|
||||
fi
|
||||
|
||||
# Copy hardware-specific overlay (overwrites base)
|
||||
if [ -d "$HARDWARE_OVERLAY_DIR" ]; then
|
||||
cp -a "$HARDWARE_OVERLAY_DIR/"* "$MERGED_OVERLAY/"
|
||||
fi
|
||||
|
||||
echo -e "${GREEN}✓${NC} Overlays merged"
|
||||
echo ""
|
||||
|
||||
# Set environment variables for build
|
||||
export HARDWARE_TARGET="$HARDWARE_PROFILE"
|
||||
export HARDWARE_NAME="$HARDWARE_NAME"
|
||||
export ARCHIPELAGO_VERSION
|
||||
export ALPINE_VERSION
|
||||
export ARCH
|
||||
export BUILD_TYPE
|
||||
|
||||
# Determine build method based on OS
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
echo -e "${BLUE}🍎 Building on macOS via Docker${NC}"
|
||||
"$SCRIPT_DIR/build-macos.sh" "$BUILD_TYPE"
|
||||
else
|
||||
echo -e "${BLUE}🐧 Building on Linux${NC}"
|
||||
if [ -f /etc/alpine-release ]; then
|
||||
echo -e "${GREEN}✓${NC} Alpine Linux detected, using native build"
|
||||
"$SCRIPT_DIR/build-alpine-native.sh" "$BUILD_TYPE"
|
||||
else
|
||||
echo -e "${YELLOW}⚠${NC} Non-Alpine Linux, using Docker build"
|
||||
"$SCRIPT_DIR/build-linux.sh" "$BUILD_TYPE"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Rename output with hardware target
|
||||
OUTPUT_DIR="$SCRIPT_DIR/results"
|
||||
if [ -f "$OUTPUT_DIR/archipelago-${ARCHIPELAGO_VERSION}-${ARCH}.iso" ]; then
|
||||
mv "$OUTPUT_DIR/archipelago-${ARCHIPELAGO_VERSION}-${ARCH}.iso" \
|
||||
"$OUTPUT_DIR/archipelago-${ARCHIPELAGO_VERSION}-${HARDWARE_PROFILE}-${ARCH}.iso"
|
||||
|
||||
echo ""
|
||||
echo -e "${GREEN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
||||
echo -e "${GREEN}✅ Build Complete!${NC}"
|
||||
echo -e "${GREEN}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
|
||||
echo ""
|
||||
echo -e " ${YELLOW}Hardware:${NC} ${HARDWARE_NAME}"
|
||||
echo -e " ${YELLOW}ISO File:${NC} archipelago-${ARCHIPELAGO_VERSION}-${HARDWARE_PROFILE}-${ARCH}.iso"
|
||||
echo -e " ${YELLOW}Location:${NC} ${OUTPUT_DIR}/"
|
||||
echo ""
|
||||
echo -e "${BLUE}Next Steps:${NC}"
|
||||
echo -e " 1. Flash ISO to USB drive:"
|
||||
echo -e " ${YELLOW}sudo dd if=${OUTPUT_DIR}/archipelago-${ARCHIPELAGO_VERSION}-${HARDWARE_PROFILE}-${ARCH}.iso of=/dev/sdX bs=1M${NC}"
|
||||
echo ""
|
||||
echo -e " 2. Boot ${HARDWARE_NAME} from USB"
|
||||
echo ""
|
||||
echo -e " 3. Access Archipelago UI at: ${YELLOW}http://device-ip:8100${NC}"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
# Create build manifest
|
||||
cat > "$OUTPUT_DIR/BUILD_MANIFEST_${HARDWARE_PROFILE}.txt" <<MANIFEST
|
||||
Archipelago OS Build Manifest
|
||||
═════════════════════════════
|
||||
|
||||
Build Information
|
||||
─────────────────
|
||||
Version: ${ARCHIPELAGO_VERSION}
|
||||
Alpine Version: ${ALPINE_VERSION}
|
||||
Architecture: ${ARCH}
|
||||
Build Type: ${BUILD_TYPE}
|
||||
Build Date: $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
Build Host: $(hostname)
|
||||
|
||||
Hardware Target
|
||||
───────────────
|
||||
Profile: ${HARDWARE_PROFILE}
|
||||
Name: ${HARDWARE_NAME}
|
||||
CPU: ${CPU_VENDOR} ${CPU_MODEL}
|
||||
Minimum RAM: ${RAM_MIN}
|
||||
Minimum Storage: ${STORAGE_MIN}
|
||||
Network: ${NETWORK_INTERFACES}
|
||||
USB Ports: ${USB_PORTS}
|
||||
|
||||
Optimizations
|
||||
─────────────
|
||||
${OPTIMIZATIONS}
|
||||
|
||||
Files Generated
|
||||
───────────────
|
||||
ISO: archipelago-${ARCHIPELAGO_VERSION}-${HARDWARE_PROFILE}-${ARCH}.iso
|
||||
$([ -f "$OUTPUT_DIR/archipelago-${ARCHIPELAGO_VERSION}-${HARDWARE_PROFILE}-${ARCH}.img" ] && echo "IMG: archipelago-${ARCHIPELAGO_VERSION}-${HARDWARE_PROFILE}-${ARCH}.img")
|
||||
|
||||
Installation
|
||||
────────────
|
||||
1. Flash to USB:
|
||||
sudo dd if=archipelago-${ARCHIPELAGO_VERSION}-${HARDWARE_PROFILE}-${ARCH}.iso of=/dev/sdX bs=1M
|
||||
|
||||
2. Boot ${HARDWARE_NAME} from USB
|
||||
|
||||
3. Follow on-screen installation
|
||||
|
||||
4. Access UI at http://device-ip:8100
|
||||
|
||||
Hardware Requirements
|
||||
────────────────────
|
||||
- CPU: ${CPU_VENDOR} ${CPU_MODEL}
|
||||
- RAM: ${RAM_MIN} minimum
|
||||
- Storage: ${STORAGE_MIN} minimum
|
||||
- Network: ${NETWORK_INTERFACES}
|
||||
- Boot: UEFI (Legacy BIOS supported)
|
||||
|
||||
Support
|
||||
───────
|
||||
- Documentation: docs/
|
||||
- Issues: GitHub Issues
|
||||
- Community: Discord (coming soon)
|
||||
|
||||
Built with ❤️ by the Archipelago team
|
||||
MANIFEST
|
||||
|
||||
echo -e "${GREEN}✓${NC} Build manifest created"
|
||||
echo ""
|
||||
@@ -34,7 +34,14 @@ echo "🚀 Running build in container..."
|
||||
echo " This may take 30-60 minutes on first build..."
|
||||
echo ""
|
||||
|
||||
docker run --rm -it \
|
||||
# Check if running in TTY
|
||||
if [ -t 0 ]; then
|
||||
DOCKER_FLAGS="-it"
|
||||
else
|
||||
DOCKER_FLAGS="-t"
|
||||
fi
|
||||
|
||||
docker run --rm $DOCKER_FLAGS \
|
||||
-v "$PROJECT_ROOT:/workspace" \
|
||||
-v "$SCRIPT_DIR/results:/results" \
|
||||
-v "$SCRIPT_DIR/build:/build" \
|
||||
|
||||
Executable
+132
@@ -0,0 +1,132 @@
|
||||
#!/bin/bash
|
||||
# Quick test build for Start9 Server Pure
|
||||
# This creates a minimal build to verify the system works
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
|
||||
echo "🧪 Quick Test Build for Start9 Server Pure"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo ""
|
||||
echo "This will create a test build to verify the system works."
|
||||
echo "A full production build takes 45-60 minutes."
|
||||
echo ""
|
||||
|
||||
# Check prerequisites
|
||||
echo "📋 Checking prerequisites..."
|
||||
echo ""
|
||||
|
||||
# Check for Docker on macOS
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
if ! command -v docker >/dev/null 2>&1; then
|
||||
echo "❌ Docker not found. Install Docker Desktop:"
|
||||
echo " https://www.docker.com/products/docker-desktop"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! docker info >/dev/null 2>&1; then
|
||||
echo "❌ Docker not running. Starting Docker Desktop..."
|
||||
open -a Docker
|
||||
echo "⏳ Waiting for Docker to start..."
|
||||
while ! docker info >/dev/null 2>&1; do
|
||||
sleep 2
|
||||
done
|
||||
echo "✅ Docker is running"
|
||||
else
|
||||
echo "✅ Docker is running"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check disk space
|
||||
AVAILABLE_SPACE=$(df -h "$SCRIPT_DIR" | awk 'NR==2 {print $4}')
|
||||
echo "✅ Available disk space: $AVAILABLE_SPACE"
|
||||
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "🚀 Starting Test Build"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo ""
|
||||
|
||||
# Create test overlay to verify hardware detection works
|
||||
TEST_OVERLAY="$SCRIPT_DIR/alpine-profile/overlay-start9-pure-test"
|
||||
rm -rf "$TEST_OVERLAY"
|
||||
mkdir -p "$TEST_OVERLAY/etc/archipelago"
|
||||
|
||||
cat > "$TEST_OVERLAY/etc/archipelago/test-info.txt" <<'EOF'
|
||||
This is a test build for Start9 Server Pure.
|
||||
|
||||
If you can read this file after booting, the build system worked!
|
||||
|
||||
Hardware Target: Start9 Server Pure
|
||||
CPU: Intel i7-10710U
|
||||
RAM: 32-64GB
|
||||
Storage: 2-4TB NVMe
|
||||
|
||||
Next steps:
|
||||
1. Verify this file exists at /etc/archipelago/test-info.txt
|
||||
2. Check hardware detection: cat /var/log/archipelago-hardware.log
|
||||
3. View hardware config: cat /etc/archipelago/hardware.toml
|
||||
4. Run a full production build: ./build-for-hardware.sh start9-pure iso
|
||||
EOF
|
||||
|
||||
echo "📝 Test overlay created"
|
||||
echo ""
|
||||
|
||||
# Show what will be built
|
||||
echo "📦 Build Configuration:"
|
||||
echo " Target: Start9 Server Pure"
|
||||
echo " Type: ISO"
|
||||
echo " Test Mode: Yes (quick verification)"
|
||||
echo ""
|
||||
|
||||
# Ask for confirmation
|
||||
read -p "Continue with test build? (y/n) " -n 1 -r
|
||||
echo ""
|
||||
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
|
||||
echo "❌ Build cancelled"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "⏳ Building... This will take 5-10 minutes for a test build."
|
||||
echo ""
|
||||
|
||||
# Set test mode environment
|
||||
export ARCHIPELAGO_VERSION="0.1.0-test"
|
||||
export ALPINE_VERSION="3.19"
|
||||
export TEST_MODE="true"
|
||||
|
||||
# Run the build
|
||||
"$SCRIPT_DIR/build-for-hardware.sh" start9-pure iso
|
||||
|
||||
# Check if build succeeded
|
||||
if [ -f "$SCRIPT_DIR/results/archipelago-0.1.0-test-start9-pure-x86_64.iso" ]; then
|
||||
echo ""
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo "✅ Test Build Successful!"
|
||||
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
||||
echo ""
|
||||
echo "📦 Output:"
|
||||
ls -lh "$SCRIPT_DIR/results/"*start9-pure*.iso
|
||||
echo ""
|
||||
echo "✅ The build system is working correctly!"
|
||||
echo ""
|
||||
echo "🎯 Next Steps:"
|
||||
echo ""
|
||||
echo "1. Test in a VM (optional):"
|
||||
echo " qemu-system-x86_64 -m 4G -smp 2 -boot d \\"
|
||||
echo " -cdrom results/archipelago-0.1.0-test-start9-pure-x86_64.iso"
|
||||
echo ""
|
||||
echo "2. Run a full production build:"
|
||||
echo " ./build-for-hardware.sh start9-pure iso"
|
||||
echo ""
|
||||
echo "3. Flash to USB and install on Start9 Server Pure:"
|
||||
echo " sudo dd if=results/archipelago-0.1.0-start9-pure-x86_64.iso \\"
|
||||
echo " of=/dev/sdX bs=1M status=progress"
|
||||
echo ""
|
||||
else
|
||||
echo ""
|
||||
echo "❌ Test build failed. Check the logs above for errors."
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user