Add full firmware install via UART + TFTP#30
Merged
Conversation
Add `defib install` command that flashes a complete OpenIPC release (U-Boot + kernel + rootfs) to NOR flash in a single automated flow: - Extract and verify firmware tarball with MD5 checksums - Burn U-Boot to RAM via boot ROM, break into console - Start multi-file TFTP server, configure U-Boot networking - Flash each partition with CRC32 verification (RAM + read-back) - Save boot environment (setnor8m/setnor16m) and reset Also extends the TFTP server to support multiple files with filename-based routing (backward compatible with single-file mode). Tested on real hi3516ev300 hardware with 16MB NOR (W25Q128), PoE power cycling via CRS112-8P-4S, and verified boot into OpenIPC Linux. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
defib installcommand that flashes a complete OpenIPC firmware (U-Boot + kernel + rootfs) to NOR flash via UART boot ROM + TFTPHow it works
setenvnetworking →tftpboot→sf erase→sf writefor each partitionsetnor8m/setnor16m,saveenv,resetTFTP multi-file support
TFTPServerProtocolnow acceptsfiles: dict[str, bytes]for filename-based routing. U-Boot requests each file by name (tftpboot 0x42000000 uImage.hi3516ev300), and the server serves the matching data. Backward compatible — single-file mode still works.Test plan
4B3C3231, kernel4210590F, rootfs389C689C🤖 Generated with Claude Code