BPi-R3 Mini Full Flashing Workflow — Detailed Guide
Tools & Hardware
Essential Hardware
PC / Laptop (Windows or Linux)
USB-TTL serial adapter → UART console (for BL2, U-Boot, and OpenWrt shell)
USB Flash Drive (FAT32 formatted, for USB boot / sysupgrade)
Ethernet cable → PC ↔ BPi-R3 Mini WAN port
Software
Flashing & Console
MTK UART Boot Tool (mtk_uartboot.exe) → load BL2 + FIP into RAM via UART
Serial monitor → PuTTY, Tera Term, minicom → UART console
TFTP server → serve NAND/eMMC images (Windows: tftpd64 / Linux: tftpd-hpa)
Web browser → OpenWrt WebUI flash
Optional
Rufus → format USB flash drive to FAT32
scp / wget / curl → copy files to running OpenWrt shell
Firmware / Image Files
UART → RAM loader
bpi-r3mini_ram_bl2.bin → BL2 Preloader
bpi-r3mini_ram_fip.bin → BL31 + U-Boot FIP
Source: UART Loader Google Drive
Old / Official OpenWrt single-image
mtk-bpi-r3mini-mac80211-NAND-YYYYMMDD-single-image.bin → NAND flash
mtk-bpi-r3mini-mac80211-EMMC-YYYYMMDD-single-image.bin → eMMC flash
Source: Old OpenWrt Google Drive
Latest OpenWrt
openwrt-24.10.2-…-initramfs-recovery.itb → RAM boot for safe sysupgrade
openwrt-24.10.2-…-emmc.img → final sysupgrade for eMMC
Files for eMMC flash via old OpenWrt shell
openwrt-emmc-gpt.bin → GPT partition table
openwrt-emmc-preloader.bin → BL2 / preloader
openwrt-emmc-bl31-uboot.fip → BL31 + U-Boot FIP
Step-by-Step Flashing Workflow
A. NAND Single-Image via UART Recovery
Boot BL2 + FIP into RAM
“C:\Program Files\mtk_uartboot\target\release\mtk_uartboot.exe” -s COM3 -p bpi-r3mini_ram_bl2.bin --aarch64 -f bpi-r3mini_ram_fip.bin
Temporary U-Boot console appears in RAM.
Configure U-Boot environment
setenv serverip 192.168.1.13
setenv ipaddr 192.168.1.1
setenv loadaddr 0x46000000
saveenv
Load NAND single-image via TFTP
tftpboot ${loadaddr} mtk-bpi-r3mini-mac80211-NAND-YYYYMMDD-single-image.bin
Prepare NAND
ubi detach
mtd erase bl2
mtd erase factory
mtd erase fip
mtd erase ubi
Write the single-image
mtd write spi-nand0 ${loadaddr} 0 ${filesize}
Verify
mtd read spi-nand0 ${loadaddr} 0 0x10000
md ${loadaddr} 0x40
Reboot
reset
Board boots into OpenWrt NAND.
B. eMMC Single-Image via UART Recovery (Optional if NAND failed)
Boot BL2 + FIP into RAM (if eMMC corrupted)
Configure U-Boot network
Load eMMC single-image via TFTP
Calculate block count and erase eMMC
Write image to eMMC
Verify
Reboot
Board boots directly from eMMC.
C. Flash GPT / BL2 / BL31 via Old OpenWrt Shell (booted from NAND)
Goal: Write GPT, BL2, and BL31 + U-Boot FIP to eMMC without UART loader, using old OpenWrt shell from NAND.
Copy files to /tmp
cd /tmp
tftp -g -r openwrt-emmc-gpt.bin 192.168.1.13
tftp -g -r openwrt-emmc-preloader.bin 192.168.1.13
tftp -g -r openwrt-emmc-bl31-uboot.fip 192.168.1.13
Flash GPT table
dd if=/tmp/openwrt-emmc-gpt.bin of=/dev/mmcblk0 bs=512 seek=0 count=34 conv=fsync
fdisk -l /dev/mmcblk0
Flash BL2 / Preloader
echo 0 > /sys/block/mmcblk0boot0/force_ro
dd if=/tmp/openwrt-emmc-preloader.bin of=/dev/mmcblk0boot0 bs=512 conv=fsync
echo 1 > /sys/block/mmcblk0boot0/force_ro
Flash BL31 + U-Boot FIP
dd if=/tmp/openwrt-emmc-bl31-uboot.fip of=/dev/mmcblk0 bs=512 seek=13312 conv=fsync
Verify
dd if=/dev/mmcblk0 bs=512 skip=13312 count=2048 of=/tmp/bl31_readback.bin
cmp /tmp/bl31_readback.bin /tmp/openwrt-emmc-bl31-uboot.fip
eMMC now bootable, U-Boot runs from eMMC.
D. Sysupgrade via USB → RAM → WebUI (booted from eMMC)
Boot into eMMC U-Boot
Power-cycle the board → board runs U-Boot from eMMC
Load Sysupgrade to RAM from USB
usb start
fatload usb 0:1 0x46000000 openwrt-24.10.2-…-emmc.img
bootm 0x46000000
Access OpenWrt WebUI
Navigate: System → Backup / Flash Firmware → Flash new firmware
Select the sysupgrade image (already in RAM or uploaded)
Reboot & verify
lsblk
df -h
Confirm rootfs and partitions are correct.
Acknowledgment
Special thanks to Frank-W for the guidance and support during the BPi-R3 Mini flashing workflow.
Note: This guide was AI-assisted in its preparation. If you find any inaccuracies, typos, or procedural errors, please feel free to correct them. The author and contributors appreciate any feedback to improve clarity and safety.