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

Hi, guys I badly need help on how to unbrick NAND and install OpenWRT Snapshot. My NAND (switch switch set to NAND) is broken.

Here’s the output log when booting from NAND:

F0: 102B 0000
FA: 1040 0000
FA: 1040 0000 [0200]
F9: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 2400 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [1000]
T0: 0000 021E [010F]
Jump to BL

NOTICE:  BL2: v2.6(release):
NOTICE:  BL2: Built : 20:18:14, May  7 2023
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:  SPI_NAND parses attributes from parameter page.
NOTICE:  SPI_NAND Detected ID 0xef
NOTICE:  Page size 2048, Block size 131072, size 134217728
NOTICE:  Initializing NMBM ...
NOTICE:  NMBM management region starts at block 960 [0x07800000]
NOTICE:  NMBM has been initialized in read-only mode
ERROR:   BL2: Failed to load image id 3 (-2)

I tried following the steps found here: Getting Started with BPI-R3 MINI - Banana Pi Wiki to revive NAND and install OS. But USBs are not detected during recovery mode (Green LED) or maybe I’m just not knowledgeable enough to enable USB.

I am also unable to boot OpenWRT on the eMMC. I believe I may have made a mistake during the installation process. Fortunately, I can still access the UBOOT and bootmenu from it unlike on NAND.

Also, I think the RX pin (UART pins) on my board is broken because I can’t send any keyboard inputs on it. I checked the USB TTL adapter by shorting the TX and RX pin and it seemed to work so I think my USB TTL adapter is not the problem.

My only option is to debug using type C connector.

The good thing is I can still run mtk_uartboot on EMMC (switch stick set to EMMC) connected via TYPE C.

All i want is to be able to install the latest OpenWRT snapshot on either of the storage :frowning:

Please help. Thank you

Boot from ram or emmc and install openwrt to nand like daniel suggests here in step5

Hi Frank thanks for the help :slight_smile: I managed to fix the issue with the help of @stich86. Thank you so much @stich86 for the help. I really appreciate the time you’ve spent to help me!

1 Like

Which UART adapter do you use? I had the same problem with the ch340g, replaced it with the pl2303 and everything is fine :slight_smile:

Good afternoon. For some reason my EMMC\NAND switch doesn’t work! Loading is always from NAND. In the end I made a mistake and got a brick. I’ve already tried everything possible. Tell me which images to install and with what offset? I would like this firmware https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=mediatek%2Ffilogic&id=bananapi_bpi-r3-mini

BPI-R3M> mtd list
spi-nand: spi_nand spi_nand@0: Winbond SPI NAND was found.
spi-nand: spi_nand spi_nand@0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64
Could not find a valid device for nmbm0
List of MTD devices:
* spi-nand0
  - device: spi_nand@0
  - parent: spi@1100a000
  - driver: spi_nand
  - path: /spi@1100a000/spi_nand@0
  - type: NAND flash
  - block size: 0x20000 bytes
  - min I/O: 0x800 bytes
  - OOB size: 64 bytes
  - OOB available: 24 bytes
  - 0x000000000000-0x000008000000 : "spi-nand0"
          - 0x000000000000-0x000000080000 : "bl2"
          - 0x000000100000-0x000000180000 : "orig-env"
          - 0x000000080000-0x000000380000 : "factory"
          - 0x000000380000-0x000000580000 : "fip"
          - 0x000000580000-0x000008000000 : "ubi" 

I boot via mtk_uartboot.

Which UART adapter do you use?

I bought the bpi-r3-mini bundle on Amazon, it shipped with this:

It is indeed CH340G (Written on chip)

replaced it with the pl2303 and everything is fine :slight_smile:

Thank you for this. Will order one :slight_smile:

Sadly, I’m also new to this, so I’m not comfortable commenting on your problem. You can try to contact/message @stich86. He’s been very helpful to me in the past. Also, try to follow the steps found here: [BPI-R3 Mini] Boot from NAND fails - #48 by stich86 first.

I would like this firmware OpenWrt Firmware Selector

Yes, I was able to use this firmware with the help of @stich86

Just a side note:

I always prefer a FT232(RL), but this is I also use it for rockchip devices. The FT232 can be set exactly to 1500000 baud, which you need for rockchip. The PL2303 will choose something near it, but not exactly 1500000. It also works great on the BPI-R3(mini)

1 Like

Hi,

I have the same problem and i know nothing about that kind of stuff. I don’t know how to use mtk_uartboot or TFTP. Can you please help ?

Here is a step by step guide

And a bit below is a howto install openwrt

I get this.

you have to run this from (linux) client, not inside uboot…you have uboot running, but without usb support is tricky…afair stock uboot does also not support network…aren’t you able to boot linux from this uboot?

maybe you can list mmc partitions? but if you have an openwrt there you have no boot-partition like on debian to load kernel from in an easy way.

Here i try on Windows CMD

You must not open putty on same com port…it blocks the serial port like minicom in linux…only 1 application can access the serial device. And when the app is running it waits for device to start…then it sends the 2 files and closes…then you can start your putty on same com-port and you should be in uboot with usb support

I have not tried on windows yet.

I try on Linux and I got this.

Yes it waits for the device…now you have to power on the board and should see additional output

I got an error.

the app says the payload is not found…i see you started the application with full path (so not changing the current work dir)…where have you the files? ideally they should be in same dir as the mtk_uartboot binary, then change to this dir and then run with ./mtk_uartboot

It work.

Now I have to install Openwrt on Nand first and then on Emmc ?

Commit in openwrt says emmc first,then nand