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:
Dorian
2026-01-31 19:47:52 +00:00
parent 7069b20064
commit ba1a7bd3f6
40 changed files with 4780 additions and 85 deletions
@@ -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,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