How hylmithecoder/opi_installer works
opiinstaller is a GUI and headless provisioning tool for writing Orange Pi OS or Armbian images to SD cards and configuring them offline. The primary workflow is drive discovery and safety filtering, confirmation, optional unmounting and image flashing, root-filesystem provisioning, then syncing. Configure-only mode enters provisioning without flashing. The README documents networking, account and SSH setup, SPI overlays, and factory-service deployment. The excerpts show the main orchestration and core module responsibilities; detailed wiring within unsampled code is represented only where documented.
Main entry points: configurator.rs Offline rootfs setup · main.rs Worker orchestration · flasher.rs Image streaming · device.rs Drive discovery and safety
Components 20
User interface
- Iced GUI
src/main.rs - Write confirmation
src/main.rs
Privileged execution
- Worker orchestration
src/main.rs - Drive discovery and safety
src/device.rs - Partition unmounting
src/device.rs - Image streaming
src/flasher.rs - Progress and IPC
src/main.rs
Rootfs provisioning
- Offline rootfs setup
src/configurator.rs - Wi-Fi profiles
src/configurator.rs - Account password setup
src/configurator.rs - SSH enablement
src/configurator.rs - SPI overlay setup
src/configurator.rs - Factory service deployment
src/configurator.rs
Host and target
- Host block devices
- Linux utilities
- OS image file
- Target root filesystem
- Factory assets
factory - Systemd service setup
Other components
- Operator
Connections 23
- Operator → Iced GUI: configures
- Iced GUI → Drive discovery and safety: refreshes drives
- Drive discovery and safety → Linux utilities: runs lsblk
- Drive discovery and safety → Host block devices: inspects devices
- Iced GUI → Write confirmation: requests confirmation
- Write confirmation → Worker orchestration: starts job
- Worker orchestration → Partition unmounting: unmounts partitions
- Partition unmounting → Linux utilities: runs umount
- Worker orchestration → Image streaming: flashes when requested
- Image streaming → OS image file: reads
- Image streaming → Linux utilities: uses xz
- Image streaming → Host block devices: writes image
- Worker orchestration → Offline rootfs setup: provisions target
- Offline rootfs setup → Target root filesystem: mounts and updates
- Offline rootfs setup → Wi-Fi profiles: writes profiles
- Offline rootfs setup → Account password setup: updates credentials
- Offline rootfs setup → SSH enablement: enables access
- Offline rootfs setup → SPI overlay setup: configures boot overlays
- Offline rootfs setup → Factory service deployment: installs service
- Factory service deployment → Factory assets: copies binary and env
- Factory service deployment → Systemd service setup: creates and enables unit
- Worker orchestration → Progress and IPC: streams status
- Progress and IPC → Iced GUI: reports progress