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:
+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"
|
||||
Reference in New Issue
Block a user