Skip to content

Add NAND/UBI flash backup and restore guide#59

Merged
widgetii merged 1 commit intomasterfrom
docs/nand-ubi-restore-guide
Apr 22, 2026
Merged

Add NAND/UBI flash backup and restore guide#59
widgetii merged 1 commit intomasterfrom
docs/nand-ubi-restore-guide

Conversation

@widgetii
Copy link
Copy Markdown
Member

Comprehensive guide for backing up and restoring NAND-based camera firmware with proper UBI volume handling.

Based on the first successful NAND+UBIFS camera recovery in OpenIPC history — hi3516av200 with 128MB SPI NAND, 7 partitions, 5 UBI volumes, all restored and verified booting with vendor firmware.

Contents

  • NOR vs NAND vs eMMC identification
  • Proper backup: UBIFS volume dumps (/dev/ubiX_Y) vs raw MTD — and why it matters
  • The bad block problem with diagrams
  • Complete defib restore workflow
  • U-Boot requirements (CONFIG_CMD_UBI, CONFIG_SYS_MALLOC_LEN >= 2MB)
  • Troubleshooting: malloc exhaustion, ENODEV, boot corruption, PHY issues
  • Real-world example with actual test output

🤖 Generated with Claude Code

Comprehensive guide covering the complete workflow for backing up
vendor firmware from NAND-based cameras and restoring it with proper
UBI volume handling. Based on the first successful NAND+UBIFS camera
recovery in OpenIPC history (hi3516av200, 128MB SPI NAND, 5 UBI volumes).

Covers:
- NOR vs NAND vs eMMC identification
- Proper backup methods (UBIFS volumes vs raw MTD)
- The bad block problem and why ubi write is needed
- Complete defib restore workflow with examples
- U-Boot requirements (CONFIG_CMD_UBI, malloc size)
- Troubleshooting common issues
- Real-world test output from hi3516av200

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@widgetii widgetii merged commit 93d3252 into master Apr 22, 2026
13 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