[BPI-R3] Boot from eMMC with WAN connected to other OpenWRT initiates TFTP Boot

Hi,

I might be totally wrong on this but when I boot from eMMC (jumpers set to low-high-low-high) and have WAN connected to another OpenWRT Router, the BPI-R3 boots into TFTP mode. I haven’t read anyhting about TSTP taking precedence but booting from SD I didn’t see that happening.

My mistake, false-positive due missing / not found docs or a bug?

BusyBox v1.36.0 (2023-02-28 09:05:19 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r22171-fdd1af9a44
 -----------------------------------------------------
=== 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.
--------------------------------------------------
root@OpenWrt:/# reboot
root@OpenWrt:/# [  103.826747] device lan1 left promiscuous mode
[  103.831265] br-lan: port 1(lan1) entered disabled state
[  103.901037] device lan2 left promiscuous mode
[  103.905476] br-lan: port 2(lan2) entered disabled state
[  104.000678] device lan3 left promiscuous mode
[  104.005101] br-lan: port 3(lan3) entered disabled state
[  104.070512] device lan4 left promiscuous mode
[  104.074950] br-lan: port 4(lan4) entered disabled state
[  104.150331] device sfp2 left promiscuous mode
[  104.154759] br-lan: port 5(sfp2) entered disabled state
[  104.412810] br-wan: port 2(wan) entered disabled state
[  104.419011] device eth1 left promiscuous mode
[  104.423415] br-wan: port 1(eth1) entered disabled state
[  104.499445] device wan left promiscuous mode
[  104.503836] br-wan: port 2(wan) entered disabled state
[  104.609145] mt7530 mdio-bus:1f wan: Link is Down
[  104.615422] mtk_soc_eth 15100000.ethernet eth0: Link is Down
[  108.468866] reboot: Restarting system

F0: 102B 0000
FA: 1040 0000
FA: 1040 0000 [0200]
F9: 103F 0000
F3: 1001 0000 [0200]
F3: 1001 0000
F6: 300C 0028
F5: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 2400 0041 [0000]
G0: 1190 0000
EC: 0000 0000 [3000]
T0: 0000 01C4 [010F]
Jump to BL

NOTICE:  BL2: v2.7(release):OpenWrt v2022-08-31-75393484-1 (mt7986-sdmmc-ddr4)
NOTICE:  BL2: Built : 09:05:19, Feb 28 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:  BL2: Booting BL31
NOTICE:  BL31: v2.7(release):OpenWrt v2022-08-31-75393484-1 (mt7986-sdmmc-ddr4)
NOTICE:  BL31: Built : 09:05:19, Feb 28 2023


U-Boot 2023.01-OpenWrt-r22171-fdd1af9a44 (Feb 28 2023 - 09:05:19 +0000)

CPU:   MediaTek MT7986
Model: BananaPi BPi-R3
DRAM:  2 GiB
Core:  53 devices, 25 uclasses, devicetree: embed
SF: Detected w25q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
MMC:   mmc@11230000: 0
Loading Environment from MMC... unable to read ssr
 ** fs_devread read error - block
*** Error - No Valid Environment Area found
*** Warning - bad env area, using default environment

In:    serial@11002000
Out:   serial@11002000
Err:   serial@11002000
reset button found
Loading Environment from MMC... *** Error - No Valid Environment Area found
*** Warning - bad env area, using default environment

Net:   
Warning: ethernet@15100000 (eth0) using random MAC address - ee:e5:55:f2:d3:02
eth0: ethernet@15100000
No EFI system partition
Saving Environment to MMC... Writing to redundant MMC(0)... failed
Failed (1)
Saving Environment to MMC... Writing to redundant MMC(0)... failed
Failed (1)
off


        ( ( ( OpenWrt ) ) )  [SD card]       U-Boot 2023.01-OpenWrt-r22171-fdd1af9a44 (Feb 28 2023 - 09:05:19 +0000)

      1. Run default boot command.
      2. Boot system via TFTP.
      3. Boot production system from SD card.
      4. Boot recovery system from SD card.
      5. Load production system via TFTP then write to SD card.
      6. Load recovery system via TFTP then write to SD card.
      7. Install bootloader, recovery and production to NOR.
      8. Install bootloader, recovery and production to NAND.
      9. Reboot.
      a. Reset all settings to factory defaults.
      0. U-Boot console

  Press UP/DOWN to move, ENTER to select, ESC/CTRL+C to quit

spi-nand: spi_nand spi_nand@1: unknown raw ID bfacf320
No NAND MTD device found
SF: Detected w25q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
spi-nand: spi_nand spi_nand@1: unknown raw ID bfacf3f0
No NAND MTD device found
SF: Detected w25q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
spi-nand: spi_nand spi_nand@1: unknown raw ID bfacd840
No NAND MTD device found
SF: Detected w25q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
spi-nand: spi_nand spi_nand@1: unknown raw ID bfacf5c0
No NAND MTD device found
SF: Detected w25q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
Using ethernet@15100000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename 'openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb'.
Load address: 0x46000000
Loading: *
ARP Retry count exceeded; starting again
Wrong Image Format for bootm command
ERROR: can't get kernel image!
spi-nand: spi_nand spi_nand@1: unknown raw ID bfacf640
No NAND MTD device found
SF: Detected w25q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
Using ethernet@15100000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename 'openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb'.
Load address: 0x46000000
Loading: *
ARP Retry count exceeded; starting again
Wrong Image Format for bootm command
ERROR: can't get kernel image!
spi-nand: spi_nand spi_nand@1: unknown raw ID bfacf640
No NAND MTD device found
SF: Detected w25q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
Using ethernet@15100000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename 'openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb'.
Load address: 0x46000000
Loading: *
ARP Retry count exceeded; starting again
Wrong Image Format for bootm command
ERROR: can't get kernel image!
spi-nand: spi_nand spi_nand@1: unknown raw ID bfacf640
No NAND MTD device found
SF: Detected w25q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
Using ethernet@15100000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename 'openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb'.
Load address: 0x46000000
Loading: *
ARP Retry count exceeded; starting again
Wrong Image Format for bootm command
ERROR: can't get kernel image!
spi-nand: spi_nand spi_nand@1: unknown raw ID bfacf690
No NAND MTD device found
SF: Detected w25q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
Using ethernet@15100000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename 'openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb'.
Load address: 0x46000000
Loading: *
ARP Retry count exceeded; starting again
Wrong Image Format for bootm command
ERROR: can't get kernel image!
spi-nand: spi_nand spi_nand@1: unknown raw ID bfacf6b0
No NAND MTD device found
SF: Detected w25q256 with page size 256 Bytes, erase size 64 KiB, total 32 MiB
Using ethernet@15100000 device
TFTP from server 192.168.1.254; our IP address is 192.168.1.1
Filename 'openwrt-mediatek-filogic-bananapi_bpi-r3-initramfs-recovery.itb'.
Load address: 0x46000000
Loading: *

Best Mike

We had similar with v1.0 where reset bug was not yet fixed. There are some v1.1 too where it has not be fixed (have not tried mine yet but reported as fixed).

Problem is that signal from resetbutton is pulled down to gnd when nvme is in m 2 slot.

Openwrt was looking on this button and if “pressed” it was entering recovery mode which tries tftp first.

A while openwrt was using wps button instead,i do not know current state. But maybe this is reverted and you have an older v1.1 with this hw bug

Can you retry without anything in m 2 slot if you have equipped it recently?

Thank god I am not stupid … I have my WD Black still sitting idle waiting to get plugged in. But first, I desperately need to figure out how to expand the overlay partition on the SD card first. Something I unexpectedly struggle at lot with.

Another really wired boot behavior. I had all jumpers down, booted form NOR, checked a few things after burning NOR from the SD card, switched jumpers to 1-1-0-1 and thereafter to 1-1-1-1 but on both occasions the boot menu indicated I was still booting from NOR.

    ( ( ( OpenWrt ) ) )  [SPI-NOR]       U-Boot 2023.01-OpenWrt-r22171-fdd1af9a44 (Feb 28 2023 - 09:05:19 +0000)

Only after booting form NAND, which still runs BanaPi’s OpenWRT 21.02, adjusting jumpers and power cycling, the header got updated indicating I was booting form SD card.