I used the OpenWRTInvasion method to flash openwrt Snapshot, then upgraded to this: https://downloads.openwrt.org/releases/22.03.2/targets/ramips/mt76x8/xiaomi_mi-router-4a-100m-intl-squashfs-sysupgrade.bin
which bricked the router.
I tried the TFTP method, the hoddysguides method nothing worked, so I decided to go for uart.
Here is what I'm getting when I boot:
U-Boot 1.1.3 (Nov 24 2021 - 02:49:49)
Board: Ralink APSoC DRAM: 64 MB
Power on memory test. Memory size= 64 MB...OK!
relocate_code Pointer at: 83fb0000
RT2880_RSTSTAT_REG 0xc0030204
******************************
Software System Reset Occurred
******************************
flash manufacture id: 1c, device id 71 18
find flash: EN25QX128A
env is right!
============================================
Ralink UBoot Version: 4.3.0.0
--------------------------------------------
ASIC 7628_MP (Port5<->None)
DRAM component: 512 Mbits DDR, width 16
DRAM bus: 16 bit
Total memory: 64 MBytes
Flash component: SPI Flash
Date:Nov 24 2021 Time:02:49:49
============================================
icache: sets:512, ways:4, linesz:32 ,total:65536
dcache: sets:256, ways:4, linesz:32 ,total:32768
##### The CPU freq = 575 MHZ ####
estimate memory size =64 Mbytes
RESET MT7628 PHY!!!!!!
Please choose the operation:
1: Load system code to SDRAM via TFTP.
2: Load system code then write to Flash via TFTP.
3: Boot system code via Flash (default).
4: Entr boot command line interface.
9: Load Boot Loader code then write to Flash via TFTP.
n3: System Boot system code via Flash.
Booting System 1
## Booting image at bc260000 ...
Image Name: MIPS OpenWrt Linux-5.10.146
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2196224 Bytes = 2.1 MB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
commandline uart_en=0 factory_mode=0 mem=64m root=/dev/mtdblock8
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 64
Starting kernel ...
[ 0.000000] Linux version 5.10.146 (builder@buildhost) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r19803-9a599fee93) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 Fri Oct 14 22:44:41 2022
[ 0.000000] Board has DDR2
[ 0.000000] Analog PMU set to hw control
[ 0.000000] Digital PMU set to hw control
[ 0.000000] SoC Type: MediaTek MT7628AN ver:1 eco:2
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[ 0.000000] MIPS: machine is Xiaomi Mi Router 4A (100M International Edition)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 16240
[ 0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[ 0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes, linear)
[ 0.000000] Writing ErrCtl register=00000000
[ 0.000000] Readback ErrCtl register=00000000
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 56416K/65536K available (5669K kernel code, 616K rwdata, 692K rodata, 1204K init, 209K bss, 9120K reserved, 0K cma-reserved)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] NR_IRQS: 256
[ 0.000000] intc: using register map from devicetree
[ 0.000000] CPU Clock: 575MHz
[ 0.000000] timer_probe: no matching timers found
[ 0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6647862422 ns
[ 0.000010] sched_clock: 32 bits at 287MHz, resolution 3ns, wraps every 7469508094ns
[ 0.007647] Calibrating delay loop... 380.92 BogoMIPS (lpj=1904640)
[ 0.073534] pid_max: default: 32768 minimum: 301
[ 0.078171] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.085191] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.095088] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[ 0.106413] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.115933] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[ 0.122575] pinctrl core: initialized pinctrl subsystem
[ 0.132695] NET: Registered protocol family 16
[ 0.137850] thermal_sys: Registered thermal governor 'step_wise'
[ 0.247668] mt7620-pci 10140000.pcie: Port 0 N_FTS = 1b105000
[ 0.408124] PCI host bridge /pcie@10140000 ranges:
[ 0.412703] MEM 0x0000000020000000..0x000000002fffffff
[ 0.417735] IO 0x0000000010160000..0x000000001016ffff
[ 0.472503] PCI host bridge to bus 0000:00
[ 0.476425] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[ 0.483151] pci_bus 0000:00: root bus resource [io 0x10160000-0x1016ffff]
[ 0.489733] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[ 0.496293] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[ 0.503984] pci 0000:00:00.0: [14c3:0801] type 01 class 0x060400
[ 0.509747] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[ 0.515775] pci 0000:00:00.0: reg 0x14: [mem 0x20200000-0x2020ffff]
[ 0.521899] pci 0000:00:00.0: supports D1
[ 0.525704] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 0.533136] pci 0000:01:00.0: [14c3:7662] type 00 class 0x028000
[ 0.538921] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[ 0.545518] pci 0000:01:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[ 0.552033] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[ 0.559449] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 0.565793] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[ 0.572247] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[ 0.578575] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[ 0.585310] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x200fffff]
[ 0.591850] pci 0000:00:00.0: BAR 9: assigned [mem 0x20100000-0x201fffff pref]
[ 0.598829] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[ 0.605382] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit]
[ 0.612454] pci 0000:01:00.0: BAR 6: assigned [mem 0x20100000-0x2010ffff pref]
[ 0.619399] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 0.624198] pci 0000:00:00.0: bridge window [mem 0x20000000-0x200fffff]
[ 0.630740] pci 0000:00:00.0: bridge window [mem 0x20100000-0x201fffff pref]
[ 0.644970] clocksource: Switched to clocksource MIPS
[ 0.651250] NET: Registered protocol family 2
[ 0.655772] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.663643] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[ 0.671833] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.679216] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.686004] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.692290] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.698622] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[ 0.705667] NET: Registered protocol family 1
[ 0.709895] PCI: CLS 0 bytes, default 32
[ 0.721363] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[ 0.732905] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.738566] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.750249] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[ 0.759958] mt7621_gpio 10000600.gpio: registering 32 gpios
[ 0.765684] mt7621_gpio 10000600.gpio: registering 32 gpios
[ 0.771238] mt7621_gpio 10000600.gpio: registering 32 gpios
[ 0.776974] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[ 0.785922] printk: console [ttyS0] disabled
[ 0.790091] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[ 0.798873] printk: console [ttyS0] enabled
[ 0.798873] printk: console [ttyS0] enabled
[ 0.807273] printk: bootconsole [early0] disabled
[ 0.807273] printk: bootconsole [early0] disabled
[ 0.818264] spi-mt7621 10000b00.spi: sys_freq: 191666666
[ 0.842738] spi-nor spi0.0: unrecognized JEDEC id bytes: 1c 71 18 1c 71 18
[ 0.849847] spi-nor: probe of spi0.0 failed with error -2
[ 0.903547] rt3050-esw 10110000.esw: mediatek esw at 0xb0110000, irq 25 initialized
[ 0.911486] mtk_soc_eth 10100000.ethernet: generated random MAC address 16:a6:bc:f2:90:c4
[ 0.920530] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[ 0.930726] NET: Registered protocol family 10
[ 0.940692] Segment Routing with IPv6
[ 0.944564] NET: Registered protocol family 17
[ 0.949255] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[ 0.962430] 8021q: 802.1Q VLAN Support v1.8
[ 0.969140] /dev/root: Can't open blockdev
[ 0.973319] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[ 0.980972] Please append a correct "root=" boot option; here are the available partitions:
[ 0.989475] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 0.997858] Rebooting in 1 seconds..
[04010D09][04010C0F][88890000][24254849][00242548]
DU Setting Cal Done
if I press reset button before I boot with combination TinyPXE I get the following:
DHCPHandler: got packet: (src=67, dst=68, len=308) state: 3
Filtering pkt = 0
DHCPHandler: got DHCP packet: (src=67, dst=68, len=308) state: 3
DHCP: state=SELECTING bp_file: "test.bin"
TRANSITIONING TO REQUESTING STATE
*** Unhandled DHCP Option in OFFER/ACK: 13
*** Unhandled DHCP Option in OFFER/ACK: 28
*** Unhandled DHCP Option in OFFER/ACK: 66
*** Unhandled DHCP Option in OFFER/ACK: 175
Bootfile: test.bin
DhcpSendRequestPkt: Sending DHCPREQUEST
Transmitting DHCPREQUEST packet: len = 343
DHCPHandler: got packet: (src=67, dst=68, len=308) state: 4
Filtering pkt = 0
DHCPHandler: got DHCP packet: (src=67, dst=68, len=308) state: 4
DHCP State: REQUESTING
*** Unhandled DHCP Option in OFFER/ACK: 13
*** Unhandled DHCP Option in OFFER/ACK: 28
*** Unhandled DHCP Option in OFFER/ACK: 66
*** Unhandled DHCP Option in OFFER/ACK: 175
Bootfile: test.bin
DHCP client bound to address 192.168.31.113
TFTP from server 192.168.31.111; our IP address is 192.168.31.113
Filename 'test.bin'.
TIMEOUT_COUNT=10,Load address: 0x80100000
Loading: Got ARP REPLY, set server/gtwy eth addr (d0:17:c2:95:03:33)
Got it
T Got ARP REQUEST, return our IP
T T T T T T T T T T T T
Retry count exceeded; starting again
BOOTP broadcast 1
DHCPHandler: got packet: (src=61454, dst=1900, len=175) state: 3
Filtering pkt = -1
DHCPHandler: got packet: (src=61467, dst=1900, len=170) state: 3
Filtering pkt = -1
DHCPHandler: got packet: (src=61454, dst=1900, len=175) state: 3
Filtering pkt = -1
DHCPHandler: got packet: (src=61467, dst=1900, len=170) state: 3
Filtering pkt = -1
BOOTP broadcast 2
DHCPHandler: got packet: (src=61454, dst=1900, len=175) state: 3
Filtering pkt = -1
DHCPHandler: got packet: (src=61467, dst=1900, len=170) state: 3
Filtering pkt = -1
DHCPHandler: got packet: (src=61454, dst=1900, len=175) state: 3
Filtering pkt = -1
DHCPHandler: got packet: (src=61467, dst=1900, len=170) state: 3
Filtering pkt = -1
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
and it keeps looping back without grabbing the test.bin
(i.e. the firmware)