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
@@ -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
}