Files
pi-multifx-pedal/docs/os-minimization-plan.md

1.8 KiB

Problem

Strip the DietPi install down to the minimum footprint for the pedal. Profile baseline resource usage, then remove unnecessary packages and services. Target < 60MB idle RAM and < 500MB disk.

File scope

  • scripts/dietpi-postinstall.sh — DietPi first-boot setup with minimal packages
  • scripts/minimize.sh — identify and remove unused packages, disable unnecessary systemd services
  • scripts/build-minimal-image.sh — take the stripped install and produce a flashable image
  • docs/baseline-footprint.md — before/after resource comparisons

Approach

  1. Install DietPi minimal (no desktop, no software options)
  2. Install only what's needed: JACK, Python, PyTorch, cmake, GPIO libs, I2C tools
  3. Run systemd-analyze blame to identify slow services
  4. Disable: avahi, triggerhappy, ModemManager, systemd-resolved if not needed
  5. KEEP: bluetooth (for MIDI controllers, wireless tuner apps), wifi (for web UI, preset downloads)
  6. Use dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -rn to find biggest packages, remove non-essentials
  7. Strip kernel modules not needed (remove sound modules for hardware we don't have, etc.)
  8. Document the removal process so it's repeatable
  9. Build a minimal SD card image from the stripped install

Dependencies

Blocks on: Audio system setup (t_9deaa72c) — need JACK working first for baselines

Acceptance Criteria

  • Baseline footprint documented (RAM + disk before/after)
  • All unnecessary systemd services disabled
  • Blutetooth and wifi preserved and functional
  • Unused kernel modules removed
  • No functionality lost — JACK, NAM, MIDI, GPIO, I2S all still work
  • < 60MB idle RAM, < 500MB disk
  • Repeatable minimize script committed to repo
  • Boot time < 15 seconds to pedal ready