feat: add binary optimization with strip and upx compression

- Added upx package to Dockerfile.alpine build dependencies
- Added optimize_binary() function to compile-components.sh
- Automatically strips debug symbols from all Zero-OS binaries
- Applies UPX compression with --best --lzma for maximum size reduction
- Optimizes binaries in both initramfs and output directories
- Shows size reduction stats (original → stripped → compressed)
- Graceful fallback if UPX fails, keeping stripped version

This significantly reduces initramfs size by compressing zinit, rfs, and mycelium binaries.
This commit is contained in:
2025-08-22 16:43:43 +02:00
parent 91d20b9226
commit 948a10a3ce
2 changed files with 51 additions and 3 deletions

View File

@@ -27,6 +27,7 @@ RUN apk add --no-cache \
bc \
perl \
python3 \
upx \
# Kernel build dependencies
linux-lts-dev \
linux-lts \