[BPI-R3 Mini] How to unbricked NAND and EMMC

Do I have to follow those steps because I have the usb fonction now ?

i guess this guide is similar…have not tried flashing openwrt yet, so i cannot report from own experience

Ok it didn’t work.

And my bootmenu lokk like this.

2

What do you suggest ?

The files i have provided do not have the openwrt specific vars like emmc_write_production

The link in the posting i linked shows manual install in linux

dd if=/tmp/openwrt-*-bananapi_bpi-r3-mini-emmc-preloader.bin of=/dev/mmcblk0boot0
dd if=/tmp/openwrt-*-bananapi_bpi-r3-mini-emmc-bl31-uboot.fip of=/dev/mmcblk0p3
dd if=/tmp/openwrt-*-bananapi_bpi-r3-mini-initramfs-recovery.itb of=/dev/mmcblk0p4
dd if=/tmp/openwrt-*-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb of=/dev/mmcblk0p5

As you are “only” in uboot you have to convert it to uboot commands

So printing the correct filenames

ls usb 0:1
load usb 0:1 $loadaddr filename
mmc write ...

the problem is that mmc write needs offsets and cannot write to partitions…

one option would be starting a linux-kernel with initrd and doing the linux-steps i linked, or chainloading a openwrt u-boot (load …$uaddr u-boot.bin;go $uaddr) to do the steps manually.

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=package/boot/uboot-mediatek/patches/442-add-bpi-r3-mini.patch;h=5409f7fa0de71ed406727c1d53cc5a1e733afdeb;hb=HEAD#l533

i have an initrd here:

you can set it in my uboot with “setenv initrd rootfs.cpio.zst” and running newboot

so when all files on usb basicly

  • run useusb
  • setenv initrd rootfs.cpio.zst
  • setenv fit bpi-r3.itb # needs to be a kernel with config for r3mini (you can use a recent bpi-r3.itb from my kernel-repo)
  • run newboot

I get an error.

1

what is the output of

printenv bootconf

?

It should show name of this config

If not please set it like this (maybe with # before)

Amd you have downloaded bpi-r3.itb from 6.6-main release? Previous images have no r3mini support.

But it is possible that bootconf is overwritten by setbootconf as r3 has a detection of devices…So could you do

printenv setbootconf

And if there is the detection (checkmmc,checkspi) just change it to fixed bootconf

setenv setbootconf 'setenv bootconf "#conf-emmc-mini"'

Ok it works.

Do I have to put root as login and follow the link in the posting in a Linux terminal or UART console ?

Yes simply use username root…no pw in initrd

Ok and do I have to follow those steps on a Linux terminal ?

dd if=/tmp/openwrt-*-bananapi_bpi-r3-mini-emmc-preloader.bin of=/dev/mmcblk0boot0
dd if=/tmp/openwrt-*-bananapi_bpi-r3-mini-emmc-bl31-uboot.fip of=/dev/mmcblk0p3
dd if=/tmp/openwrt-*-bananapi_bpi-r3-mini-initramfs-recovery.itb of=/dev/mmcblk0p4
dd if=/tmp/openwrt-*-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb of=/dev/mmcblk0p5

Yes,it is possible you have to disable boot0 readonly mode first

I think I did it. I just follow your guide for the BPI R3.

Now its asking me to do tftp for the recovery file but it dosn’t work.

I cannot help much with openwrt specific stuff,but it looks it loads something from mmc first without error…only has error with the leds (missing config option in uboot?). You can try adding the uboot option to uboot (but i do not know how).

Hello, can not flash nand or emmc, there is no even nand device listed by lsblk. But i have a programmer. Has anyone dump for bpi r3 mini, please?

Hello, Frank-W

I have a Banana Pi R3 Mini (MT7986 SoC) that is now bricked. The problem started when I switched the boot source between eMMC and SNAND.

Now, when powering on, the serial log always stops at:


F0: 102B 0000
FA: 1040 0000
FA: 1040 0000 [0200]
F9: 103F 0000
F3: 0000 0000 [0200]
V0: 0000 0000 [0001]
00: 0000 0000
BP: 2400 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [2000]
T0: 0000 016F [010F]
Jump to BL

NOTICE:  BL2: v2.6(release):
NOTICE:  BL2: Built : 20:16:38, May  7 2023
NOTICE:  WDT: disabled
NOTICE:  CPU: MT7986 (1998MHz)
NOTICE:  EMI: Using DDR4 settings
NOTICE:  EMI: Detected DRAM size: 2048MB
NOTICE:  EMI: complex R/W mem test passed
ERROR:   BL2: Failed to load image id 3 (-2)

  • The board has no SD card slot, only SNAND + eMMC + USB.
  • I tried to force USB Boot (BootROM) with mtkclient by holding the reset button while powering on, but there is no BootROM handshake.
  • The device always tries to boot SNAND/eMMC instead of entering BootROM.

I have access to:

  • Serial console (Waveshare FT232/CH343 USB-TTL).
  • mtkclient installed on PC.

I need your help to:

  1. Force the board into BootROM mode (USB/UART download) — maybe via DIP switch, jumper, or shorting boot strap pins.
  2. Reflash U-Boot / BL2 into SNAND or eMMC so the board can boot again.
  3. Confirm if recovery via UART (X/Ymodem transfer) is possible if BootROM is not accessible.

Thank you.

The uartboot should work independ of bootswitch position.

You need a bl2 and fip for ramboot (you can find them in releases page of my uboot repo) and the mtk_uartboot binary (i have only tested in linux).

https://wiki.fw-web.de/doku.php?id=en:bpi-r3mini:start#fix_bricked_boot

Just start the mtk_uartboot application with parameters pointing to ram bl2+fip and then poweron your r3mini.

After mtk_uartboot exits start minicom or your preferered uart application on same device and you should have uboot console.

There you can reinstall your preferered os.