Skip to content

Auto-download firmware from OpenIPC when -f is omitted#4

Merged
widgetii merged 2 commits intomasterfrom
feature/auto-download-firmware
Mar 30, 2026
Merged

Auto-download firmware from OpenIPC when -f is omitted#4
widgetii merged 2 commits intomasterfrom
feature/auto-download-firmware

Conversation

@widgetii
Copy link
Copy Markdown
Member

Summary

Users under stress recovering a bricked camera don't want to hunt for the right U-Boot binary. Now defib downloads it automatically.

CLI — just specify chip and port:

defib burn -c hi3516ev300 -p /dev/ttyUSB0
# Downloads u-boot-hi3516ev300-universal.bin from OpenIPC, caches it, flashes

WebUI — one-click download button appears when chip is selected:
Select chip → "Download U-Boot for hi3516ev300" button → Start Recovery

Local file still works:

defib burn -c hi3516ev300 -f my-custom-uboot.bin -p /dev/ttyUSB0

Details

  • 26 chip models with pre-built OpenIPC firmware
  • Chip aliases (e.g. hi3518ev201 → hi3518ev200)
  • Platform-appropriate caching (~/.cache/defib/firmware/)
  • 11 new Python tests
  • WebUI: download button + local file picker side by side

🤖 Generated with Claude Code

widgetii and others added 2 commits March 30, 2026 15:41
When no firmware file is specified with -f, defib now automatically
downloads the appropriate U-Boot binary from OpenIPC releases.
Supports 26 chip models with caching to avoid re-downloads.

CLI:
  defib burn -c hi3516ev300 -p /dev/ttyUSB0
  (downloads u-boot-hi3516ev300-universal.bin automatically)
  defib burn -c hi3516ev300 -f my-custom.bin -p /dev/ttyUSB0
  (uses local file as before)

WebUI:
  Chip selection now shows "Download from OpenIPC" button when
  a pre-built firmware is available. Users can still pick a local
  file for custom builds.

- firmware.py: download, cache, URL resolution, chip aliases
- Cache: ~/.cache/defib/firmware/ (Linux), ~/Library/Caches/ (macOS)
- 11 new tests for firmware module

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@widgetii widgetii merged commit 3aa3d43 into master Mar 30, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant