In the next few days I will be waiting for a uart (based on FT232RL) to extract the debaglogs. I’ll be back with the result.
If you want official OpenWRT and another OS (including OpenWRT flavors) on R3 mini, OpenWRT should be installed on NAND and the other on eMMC. Current (snapshot) OpenWRT if installed on eMMC it will alter the NAND.
➜ mtk_uartboot-v0.1.1-aarch64-apple-darwin sudo ./mtk_uartboot -s /dev/tty.usbserial-110 --aarch64 --payload bpi-r3mini_ram_bl2.bin --fip bpi-r3mini_ram_fip.bin
Password:
mtk_uartboot - 0.1.1
Using serial port: /dev/tty.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: [a0000000] Watchdog timeout
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
NOTICE: WDT: [a0000000] Watchdog timeout How to solve ?
Which bl2/fip do you use? It looks like you use not a ram-prepared bl2 for mtk_uartboot - edit: seems you use my files so it should work…sorry scrolled out the command
@ggg70 where do you have this information? Can you point to code where emmc openwrt changes nand?
The problem appears if you do sysupgrade from OpenWRT when it is on eMMC. I don’t know where is the problem exactly, I suppose it is in some upgrade script, Daniel confirmed here: https://forum.openwrt.org/t/openwrt-support-for-banana-pi-bpi-r3-mini/175011/9 that the working variant is to have OpenWRT on NAND and other OS on eMMC.
As I promised, here is the boot log on the NAND memory partition. Now I continue to study the forum to find a solution.
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 was able to boot into u-boot. Run this command:
.\mtk_uartboot.exe -s COM3 --aarch64 --payload .\bpi-r3mini_ram_bl2.bin --fip .\bpi-r3mini_ram_fip.bin
Use Mobaxter/putty for connection via uart-usb (COM-3)
BPI-R3M> help
Now I encountered such a problem when executing the command
usb start
BPI-R3M> usb start
starting USB...
Bus xhci@11200000: xhci-mtk xhci@11200000: hcd: 0x0000000011200000, ippc: 0x0000000011203e00
xhci-mtk xhci@11200000: ports disabled mask: u3p-0x0, u2p-0x0
xhci-mtk xhci@11200000: u2p:2, u3p:1
Register 300010f NbrPorts 3
Starting the controller
USB XHCI 1.10
scanning bus xhci@11200000 for devices... usb_new_device: Cannot read configuration, skipping device 058f:6387
1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
I’m using USB-2.0/16Gb/FAT32
P.S.
THE PROBLEM WAS IN THE USB drive. (CHANGE USB Flash)
Here is a scheme with instructions that clearly shows the process of installing OpenWTR from eMMC and NAND.
Links:
Thank you all so much for taking the time to help me figure this out.
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 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.
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.