How kaanergun/pi-usbboot works
Pi USB Boot is a macOS/Linux desktop app that exposes supported Raspberry Pi storage over USB and opens the bundled Raspberry Pi Imager to flash it. The main workflow runs from the UI through Tauri commands: detect a single boot-mode board, select matching bundled boot files, run rpiboot with elevated privileges, then wait for the resulting external disk and launch Imager. The source excerpts show the command and runtime relationships; Imager’s image-writing behavior is documented in the README.
Main entry points: lib.rs Tauri commands · runtime.rs Imager launcher · main.ts App UI · disks.rs External disk listing
Components 15
Desktop interface
- App UI
src-ui/main.ts - Tauri commands
src-tauri/src/lib.rs
Board boot workflow
- RPIBOOT board
- USB detection
src-tauri/src/usb.rs - Payload selection
src-tauri/src/rpiboot.rs - Privileged rpiboot
src-tauri/src/rpiboot.rs
Bundled tools
- Runtime paths
src-tauri/src/runtime.rs - Bundled tools and boot files
src-tauri/src/runtime.rs - Imager launcher
src-tauri/src/runtime.rs
Disk imaging
- External disk listing
src-tauri/src/disks.rs - Host disk services
- Raspberry Pi Imager
- OS image catalog
- OS image
Other components
- User
Connections 19
- User → App UI: uses
README.md - App UI → Tauri commands: invokes commands
src-ui/main.ts - Tauri commands → USB detection: detects board
src-tauri/src/lib.rs - USB detection → RPIBOOT board: enumerates USB
README.md - Tauri commands → Payload selection: locates payload
src-tauri/src/lib.rs - Tauri commands → Privileged rpiboot: starts boot transfer
src-tauri/src/lib.rs - Privileged rpiboot → RPIBOOT board: transfers boot files
README.md - Tauri commands → Runtime paths: resolves runtime
src-tauri/src/lib.rs - Runtime paths → Bundled tools and boot files: locates bundled assets
src-tauri/src/runtime.rs - Tauri commands → External disk listing: lists disks
src-tauri/src/lib.rs - External disk listing → Host disk services: queries disk services
src-tauri/src/disks.rs - App UI → Imager launcher: requests launch
src-ui/main.ts - Tauri commands → Imager launcher: opens Imager
src-tauri/src/lib.rs - Imager launcher → Bundled tools and boot files: launches bundled app
src-tauri/src/runtime.rs - Imager launcher → Raspberry Pi Imager: starts
README.md - Raspberry Pi Imager → OS image catalog: loads OS choices
README.md - OS image catalog → OS image: provides image
README.md - Raspberry Pi Imager → External disk listing: writes selected disk
README.md - User → Raspberry Pi Imager: selects disk
README.md