[BPI-R3 mini] Install OpenWRT on BPI R3-mini (my way and issue)

Hello QooGeek, were you able to fix stuck mtk_uartboot on “BL2 UART DL version: 0x10” ? I have the same problem now… I’m trying with this:

./mtk_uartboot -s /dev/cu.usbserial-110 --aarch64 --fip bpi-r3mini_ram_fip.bin --payload bpi-r3mini_ram_bl2.bin

I got those files from FW-WEB.

Can you try setting speed/mode in cmdline to 115200 8n1

I tried it for --bl2-load-baudrate, but no luck. I’ll try it again now. BTW. Currently, I have eMMC bootable (ImmortalWRT) and NAND bricked :slight_smile: So what I’m trying to do is to recover NAND to whatever can boot from it.

I tried again now and got it working! Thank you!

./mtk_uartboot -s /dev/cu.usbserial-110 --aarch64 --bl2-load-baudrate 115200 --fip bpi-r3mini_ram_fip.bin --payload bpi-r3mini_ram_bl2.bin

mtk_uartboot - 0.1.1
Using serial port: /dev/cu.usbserial-110
Handshake...
hw code: 0x7986
hw sub code: 0x8a00
hw ver: 0xca01
sw ver: 0x1
Baud rate set to 460800
sending payload to 0x201000...
Checksum: 0x3663
Setting baudrate back to 115200
Jumping to 0x201000 in aarch64...
Waiting for BL2. Message below:
==================================
NOTICE: BL2: v2.9(release):v2.9.0-357-g553a16af808e ram
NOTICE: BL2: Built : 17:17:10, Mar 3 2024
NOTICE: WDT: Cold boot
NOTICE: WDT: disabled
NOTICE: CPU: MT7986 (2000MHz)
NOTICE: EMI: Using DDR4 settings
NOTICE: EMI: Detected DRAM size: 2048MB
NOTICE: EMI: complex R/W mem test passed
NOTICE: Starting UART download handshake ...
==================================
BL2 UART DL version: 0x10
Baudrate set to: 115200
FIP sent.
==================================
NOTICE: Received FIP 0x4d695 @ 0x40400000 ...
==================================

After that I was able to boot into uboot and restore stock firmware:

tftpboot mtk-bpi-r3mini-NAND-20231115-single-image.bin
nand erase 0x0 0x8000000
nand write $loadaddr 0 0x8000000

OpenWRT released 24.10.0. Banana pi’s version is now 3 major versions old.

I have the same problem. Did you find a solution to restore the NAND memory? Thank you

Zrzut ekranu 2025-03-17 185031

Can you explain how to do it? Where can I find the mtk_uartboot.exe file, how do I run the command

\mtk_uartboot.exe -s COM3 --aarch64 --payload .\bpi-r3mini_ram_bl2.bin --fip .\bpi-r3mini_ram_fip.bin 

In mobaxterm? Thank you for your help

Can you help me how you did it? A little more specific, I have a problem with my R3 Mini, I can’t program the NAND, thank you very much.

that’s easy… i take it you didn’t google “mtk_uartboot.exe” because if you did, you would’ve found…

there if you goto releases youll find the windows zip and from there you should be golden. also, you run this command from windows cmd or linux command prompt.

note… do not have putty/mobaxterm open and connected to the serial port when you go to run mtk_uartboot or it wont work.

This command runs via CMD from the directory where the file is located

I used mobaxterm just access UART

Thanks for your help, but where can I download the rest of the bin files?

You can read the correspondence more carefully. I have already described everything earlier.

image

Easy

1 Like

Thank you so much for your help. So now i have boot from mtk_uartboot.exe Everything looks fine but… Now I’m stuck here… i Have (i think) all files in USB, but what is next?


BPI-R3M> fatls usb 0:1
            System Volume Information/
   200072   bl2_emmc-r3mini.img
 88256491   mtk-bpi-r3mini-EMMC-20231115.img
 57933824   mtk-bpi-r3mini-NAND-20231115-single-image.bin
  1166121   openwrt-mediatek-filogic-bananapi_bpi-r3-mini-emmc-bl31-uboot.fip
    17408   openwrt-mediatek-filogic-bananapi_bpi-r3-mini-emmc-gpt.bin
   200793   openwrt-mediatek-filogic-bananapi_bpi-r3-mini-emmc-preloader (1).bin
   200793   openwrt-mediatek-filogic-bananapi_bpi-r3-mini-emmc-preloader.bin
  9437184   openwrt-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb
  1130193   openwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-bl31-uboot.fip
 15990784   openwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-factory.bin
   217824   openwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-preloader.bin
 11796799   openwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb

12 file(s), 1 dir(s)

BPI-R3M>

Afaik you can start the initramfs image to get into openwrt itself and follow install like described in their wiki

https://openwrt.org/toh/sinovoip/bananapi_bpi_r3_mini#installation

Have only found openwrt boot for r4 but r3 should be similar

dumpimage -l openwrt-24.10.0-mediatek-filogic-bananapi_bpi-r4-initramfs-recovery.itb
tftpboot 0x50000000 openwrt-mediatek-filogic-bananapi_bpi-r4-initramfs-recovery.itb
bootm 0x50000000#config-mt7988a-bananapi-bpi-r4#mt7988a-bananapi-bpi-r4-sd

maybe you do not need the first command for r3mini, as there are imho no additional overlays

so only loading the initramfs itb and the boot it without passing overlay (skip from #, only address)

and of course use “fatload usb 0:1 …” instead of tftpboot :slight_smile:

Im stuck in here as well :frowning_face:

what should be the command

bootm 0x50000000#config-mt7988a-bananapi-bpi-r4#mt7988a-bananapi-bpi-r4-sd

for my R3_Mini ?


Usage:
fatls <interface> [<dev[:part]>] [directory]
    - list files from 'dev' on 'interface' in a 'directory'
BPI-R3M> fatload usb 0:1 0x50000000 openwrt-24.10.0-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb
9306112 bytes read in 271 ms (32.7 MiB/s)
BPI-R3M> bootm 0x50000000#config-mt7988a-bananapi-bpi-r4#mt7988a-bananapi-bpi-r4-sd
## Loading kernel from FIT Image at 50000000 ...
Could not find configuration node
ERROR -2: can't get kernel image!
BPI-R3M>

Maybe there is some specific step-by-step instructions, with all the commands typical for R3_Mini? Then it would be easier for me, I didn’t think it was that complicated, and I still have to start the Quectel_Rm520 modem on this R3_Mini :frowning: Regards and sorry for my lack of knowledge, but I really want to start this router.

just try

bootm 0x50000000

here, imho no config/overlay name required on r3mini

thank You so much :+1: It started working, now I will try to upgrade nand/mmc to version 24

What is the next step? i Will try this, from this page - but problem is not solved… https://openwrt.org/toh/sinovoip/bananapi_bpi_r3_mini#supported_versions

from this as well https://wiki.banana-pi.org/Getting_Started_with_BPI-R3_MINI

 ImmortalWrt SNAPSHOT, r33471-6b3e77778f
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------

 OpenWrt recently switched to the "apk" package manager!

 OPKG Command           APK Equivalent      Description
 ------------------------------------------------------------------
 opkg install <pkg>     apk add <pkg>       Install a package
 opkg remove <pkg>      apk del <pkg>       Remove a package
 opkg upgrade           apk upgrade         Upgrade all packages
 opkg files <pkg>       apk info -L <pkg>   List package contents
 opkg list-installed    apk info            List installed packages
 opkg update            apk update          Update package lists
 opkg search <pkg>      apk search <pkg>    Search for packages
 ------------------------------------------------------------------

For more https://openwrt.org/docs/guide-user/additional-software/opkg-to-apk-cheatsheet

root@ImmortalWrt:~# mtd write /tmp/immortalwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-preloader.bin /dev/mtd0
ubiformat /dev/mtd1
ubiattach -m 1
volsize=$(wc -c < /tmp/immortalwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-bl31-uboot.fip)
ubimkvol /dev/ubi0 -N fip -n 0 -s $volsize -t static
Could not open mtd device: /dev/mtd0
Can't open device for writing!
root@ImmortalWrt:~# ubidetach -m 1
ubiupdatevol /dev/ubi0_0 /tmp/immortalwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-bl31-uboot.fip
cd /lib/firmware/airoha
cat EthMD32.dm.bin EthMD32.DSP.bin > /tmp/en8811h-fw.bin
ubimkvol /dev/ubi0 -N en8811h-firmware -n 1 -s 147456 -t static
ubiupdatevol /dev/ubi0_1 /tmp/en8811h-fw.bin
ubimkvol /dev/ubi0 -n 2 -N ubootenv -s 126976
ubimkvol /dev/ubi0 -n 3 -N ubootenv2 -s 126976
volsize=$(wc -c < /tmp/immortalwrt-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb)
ubimkvol /dev/ubi0 -n 4 -N recovery -s $volsize
ubiupdatevol /dev/ubi0_4 /tmp/immortalwrt-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb
volsize=$(wc -c < /tmp/immortalwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb)
ubimkvol /dev/ubi0 -n 5 -N fit -s $volsize
ubiupdatevol /dev/ubi0_5 /tmp/immortalwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itbroot@ImmortalWrt:~# ubiformat /dev/mtd1
ubiformat: mtd1 (nand), size 132120576 bytes (126.0 MiB), 1008 eraseblocks of 131072 bytes (128.0 KiB), min. I/O size 2048 bytes
libscan: scanning eraseblock 1007 -- 100 % complete
ubiformat: 1008 eraseblocks have valid erase counter, mean value is 5
ubiformat: formatting eraseblock 1007 -- 100 % complete
root@ImmortalWrt:~# ubiattach -m 1
UBI device number 0, total 1008 LEBs (127991808 bytes, 122.0 MiB), available 982 LEBs (124690432 bytes, 118.9 MiB), LEB size 126976 bytes (124.0 KiB)
root@ImmortalWrt:~# volsize=$(wc -c < /tmp/immortalwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-bl31-uboot.fip)
root@ImmortalWrt:~# ubimkvol /dev/ubi0 -N fip -n 0 -s $volsize -t static
Volume ID 0, size 9 LEBs (1142784 bytes, 1.0 MiB), LEB size 126976 bytes (124.0 KiB), static, name "fip", alignment 1
root@ImmortalWrt:~# ubiupdatevol /dev/ubi0_0 /tmp/immortalwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-bl31-uboot.fip
root@ImmortalWrt:~# cd /lib/firmware/airoha
root@ImmortalWrt:/lib/firmware/airoha# cat EthMD32.dm.bin EthMD32.DSP.bin > /tmp/en8811h-fw.bin
root@ImmortalWrt:/lib/firmware/airoha# ubimkvol /dev/ubi0 -N en8811h-firmware -n 1 -s 147456 -t static
Volume ID 1, size 2 LEBs (253952 bytes, 248.0 KiB), LEB size 126976 bytes (124.0 KiB), static, name "en8811h-firmware", alignment 1
root@ImmortalWrt:/lib/firmware/airoha# ubiupdatevol /dev/ubi0_1 /tmp/en8811h-fw.bin
root@ImmortalWrt:/lib/firmware/airoha# ubimkvol /dev/ubi0 -n 2 -N ubootenv -s 126976
Volume ID 2, size 1 LEBs (126976 bytes, 124.0 KiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "ubootenv", alignment 1
root@ImmortalWrt:/lib/firmware/airoha# ubimkvol /dev/ubi0 -n 3 -N ubootenv2 -s 126976
Volume ID 3, size 1 LEBs (126976 bytes, 124.0 KiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "ubootenv2", alignment 1
root@ImmortalWrt:/lib/firmware/airoha# volsize=$(wc -c < /tmp/immortalwrt-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb)
root@ImmortalWrt:/lib/firmware/airoha# ubimkvol /dev/ubi0 -n 4 -N recovery -s $volsize
Volume ID 4, size 107 LEBs (13586432 bytes, 12.9 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "recovery", alignment 1
root@ImmortalWrt:/lib/firmware/airoha# ubiupdatevol /dev/ubi0_4 /tmp/immortalwrt-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb
root@ImmortalWrt:/lib/firmware/airoha# volsize=$(wc -c < /tmp/immortalwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb)
root@ImmortalWrt:/lib/firmware/airoha# ubimkvol /dev/ubi0 -n 5 -N fit -s $volsize
Volume ID 5, size 134 LEBs (17014784 bytes, 16.2 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "fit", alignment 1
root@ImmortalWrt:/lib/firmware/airoha# ubiupdatevol /dev/ubi0_5 /tmp/immortalwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb

root@ImmortalWrt:/lib/firmware/airoha#

I wonder about immortalwrt…i thought you use openwrt…you should not mix images and instructions as they may vary.

But after flashing all, it should boot so just type “reboot”.