TP-Link Archer C20W v5 with firmware update blocked

Hey all!
Please help me with the following problem: Some time ago we purchased 9 TP-Link Archer C20< W > v5 routers and, as discussed here (Porting Firmware to TP-Link Archer C20 v5 - #61 by jtommasi72), we installed the OpenWrt firmware for TP-Link Archer C20 V4 on these devices. Everything worked perfectly on all routers, however, when trying to update the OpenWrt version, we noticed that 2 of these routers simply do not accept firmware upgrades and this goes for both OpenWrt and TP-Link firmware. Another detail is that they also do not accept reset to the factory default, although configuration changes work normally. In short, it is like these devices was stuck in read only mode for resets and upgrades.
We tried the updates by the following methods:

  • WEB;
  • CLI – with commands
sysupgrade -v -n -F /tmp/tp_recovery.bin
mtd -r write /tmp/firmware_image.bin firmware
  • TFTP
  • Serial/TFTP – with command:
    tftp 0x80060000 tp_recovery.bin; erase tplink 0x20000 0x7a0000; cp.b 0x80080000 0x20000 0x7a0000

Below are some of the logs of the attempted procedures...

Serial log on normal boot.

[05040B0E][05040B0F][89890000][23233636][00232335]

DU Setting Cal Done



U-Boot 1.1.3 (Sep  8 2020 - 11:43:06)


Board: Ralink APSoC DRAM:  64 MB

relocate_code Pointer at: 83fb8000

gpiomode1 55054404.

gpiomode2 05540554.

gpiomode2 05550555.

flash manufacture id: ef, device id 40 17

find flash: W25Q64BV

============================================ 

Ralink UBoot Version: 5.0.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:Sep  8 2020  Time:11:43:06

============================================ 

icache: sets:512, ways:4, linesz:32 ,total:65536

dcache: sets:256, ways:4, linesz:32 ,total:32768 


 ##### The CPU freq = 580 MHZ #### 

 estimate memory size =64 Mbytes

RESET MT7628 PHY!!!!!!

continue to starting system.

 0 

disable switch phyport...

   

3: System Boot system code via Flash.(0xbc020000)

do_bootm:argc=2, addr=0xbc020000

## Booting image at bc020000 ...

   Uncompressing Kernel Image ... OK

No initrd

## Transferring control to Linux (at address 80000000) ...

## Giving linux memsize in MB, 64


Starting kernel ...


[    0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 Sun Oct 24 09:01:35 2021
[    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 TP-Link Archer C20 v4
[    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=0007e006
[    0.000000] Readback ErrCtl register=0007e006
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 57444K/65536K available (5088K kernel code, 204K rwdata, 636K rodata, 1228K init, 205K bss, 8092K 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] random: get_random_bytes called from 0x805cda28 with crng_init=0
[    0.000000] CPU Clock: 580MHz
[    0.000000] timer_probe: no matching timers found
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000009] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007570] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[    0.045454] pid_max: default: 32768 minimum: 301
[    0.050093] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.057113] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.070499] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.079926] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.086572] pinctrl core: initialized pinctrl subsystem
[    0.094546] NET: Registered protocol family 16
[    0.203375] mt7620-pci 10140000.pcie: Port 0 N_FTS = 1b105000
[    0.358475] PCI host bridge /pcie@10140000 ranges:
[    0.363052]  MEM 0x0000000020000000..0x000000002fffffff
[    0.368082]   IO 0x0000000010160000..0x000000001016ffff
[    0.395476] PCI host bridge to bus 0000:00
[    0.399457] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.406056] pci_bus 0000:00: root bus resource [io  0x10160000-0x1016ffff]
[    0.412680] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.419229] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.426927] pci 0000:00:00.0: [14c3:0801] type 01 class 0x060400
[    0.432712] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.438732] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    0.444852] pci 0000:00:00.0: supports D1
[    0.448657] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.455806] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.463722] pci 0000:01:00.0: [14c3:7650] type 00 class 0x028000
[    0.469545] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.475689] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.481802] pci 0000:01:00.1: [14c3:8650] type 00 class 0x0d1100
[    0.487620] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.493756] pci 0000:01:00.1: supports D1
[    0.497561] pci 0000:01:00.1: PME# supported from D0 D1 D3hot D3cold
[    0.505278] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.511650] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.518037] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.524387] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.531107] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    0.537659] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.544220] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[    0.550768] pci 0000:01:00.1: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    0.557318] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.562105] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    0.568773] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.583011] clocksource: Switched to clocksource MIPS
[    0.588998] thermal_sys: Registered thermal governor 'step_wise'
[    0.589417] NET: Registered protocol family 2
[    0.599549] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.607425] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.615534] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.622904] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.629699] TCP: Hash tables configured (established 1024 bind 1024)
[    0.635982] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.642310] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.649349] NET: Registered protocol family 1
[    0.653623] PCI: CLS 0 bytes, default 32
[    0.662367] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.676726] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.682361] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.707926] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.718351] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.724060] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.729694] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.735392] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.744318] printk: console [ttyS0] disabled
[    0.748515] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[    0.757240] printk: console [ttyS0] enabled
[    0.757240] printk: console [ttyS0] enabled
[    0.765652] printk: bootconsole [early0] disabled
[    0.765652] printk: bootconsole [early0] disabled
[    0.776533] spi-mt7621 10000b00.spi: sys_freq: 193333333
[    0.800704] spi-nor spi0.0: s25fl064k (8192 Kbytes)
[    0.805738] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.812189] Creating 4 MTD partitions on "spi0.0":
[    0.817063] 0x000000000000-0x000000020000 : "boot"
[    0.823136] 0x000000020000-0x0000007c0000 : "firmware"
[    0.832019] 2 tplink-fw partitions found on MTD device firmware
[    0.838096] Creating 2 MTD partitions on "firmware":
[    0.843154] 0x000000000000-0x0000001e821a : "kernel"
[    0.849313] 0x0000001e821c-0x0000007a0000 : "rootfs"
[    0.855512] mtd: device 3 (rootfs) set to be root filesystem
[    0.863492] 1 squashfs-split partitions found on MTD device rootfs
[    0.869858] 0x0000004e0000-0x0000007a0000 : "rootfs_data"
[    0.876433] 0x0000007c0000-0x0000007d0000 : "config"
[    0.882657] 0x0000007d0000-0x000000800000 : "factory"
[    0.889647] libphy: Fixed MDIO Bus: probed
[    0.907138] rt3050-esw 10110000.esw: link changed 0x00
[    0.914363] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    0.924849] NET: Registered protocol family 10
[    0.934028] Segment Routing with IPv6
[    0.937966] NET: Registered protocol family 17
[    0.942573] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.955727] 8021q: 802.1Q VLAN Support v1.8
[    0.971457] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    0.985556] Freeing unused kernel memory: 1228K
[    0.990179] This architecture does not have kernel memory protection.
[    0.996713] Run /sbin/init as init process
[    1.207015] random: fast init done
[    1.845878] init: Console is alive
[    1.849764] init: - watchdog -
[    2.630873] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.788732] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.806662] init: - preinit -
[    4.531379] random: jshn: uninitialized urandom read (4 bytes read)
[    4.623593] random: jshn: uninitialized urandom read (4 bytes read)
[    4.851269] random: jshn: uninitialized urandom read (4 bytes read)
[    5.432413] rt3050-esw 10110000.esw: link changed 0x00
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug[    5.623350] urandom_read: 2 callbacks suppressed
 level
[    5.623359] random: procd: uninitialized urandom read (4 bytes read)
[    8.937023] rt3050-esw 10110000.esw: link changed 0x02
[   10.447427] jffs2: notice: (456) jffs2_build_xattr_subsystem: complete building xattr subsystem, 2766 of xdatum (8 unchecked, 2758 orphan) and 2767 of xref (2758 dead, 0 orphan) found.
[   10.466287] mount_root: switching to jffs2 overlay
[   10.600730] overlayfs: upper fs does not support tmpfile.
[   10.614062] urandom-seed: Seeding with /etc/urandom.seed
[   10.761824] procd: - early -
[   10.765064] procd: - watchdog -
[   11.365554] procd: - watchdog -
[   11.370645] procd: - ubus -
[   11.455193] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.463729] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.470858] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.479927] procd: - init -
Please press Enter to activate this console.
[   12.359918] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.507863] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[   12.515628] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[   12.635974] mt76_wmac 10300000.wmac: ASIC revision: 76280001
[   12.818847] urngd: v1.0.2 started.
[   13.009852] random: crng init done
[   13.013347] random: 1 urandom warning(s) missed due to ratelimiting
[   13.681207] mt76_wmac 10300000.wmac: Firmware Version: 20151201
[   13.687300] mt76_wmac 10300000.wmac: Build Time: 20151201183641
[   13.727028] mt76_wmac 10300000.wmac: firmware init done
[   13.982953] mt76x0e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[   13.989568] mt76x0e 0000:01:00.0: ASIC revision: 76100002
[   14.271637] mt76x0e 0000:01:00.0: Firmware Version: 0.1.00
[   14.508049] mt76x0e 0000:01:00.0: EEPROM ver:02 fae:00
[   14.539284] kmodloader: done loading kernel modules from /etc/modules.d/*
[   20.820429] rt3050-esw 10110000.esw: link changed 0x00
[   24.321966] rt3050-esw 10110000.esw: link changed 0x02
[   27.720348] br-lan: port 1(eth0.33) entered blocking state
[   27.726016] br-lan: port 1(eth0.33) entered disabled state
[   27.731974] device eth0.33 entered promiscuous mode
[   27.736980] device eth0 entered promiscuous mode
[   27.765300] br-lan: port 1(eth0.33) entered blocking state
[   27.770949] br-lan: port 1(eth0.33) entered forwarding state
[   27.881697] br-vlan51: port 1(eth0.51) entered blocking state
[   27.887633] br-vlan51: port 1(eth0.51) entered disabled state
[   27.893851] device eth0.51 entered promiscuous mode
[   28.005468] br-vlan51: port 1(eth0.51) entered blocking state
[   28.011376] br-vlan51: port 1(eth0.51) entered forwarding state
[   28.094097] br-vlan52: port 1(eth0.52) entered blocking state
[   28.100032] br-vlan52: port 1(eth0.52) entered disabled state
[   28.122707] device eth0.52 entered promiscuous mode
[   28.159251] br-vlan52: port 1(eth0.52) entered blocking state
[   28.165127] br-vlan52: port 1(eth0.52) entered forwarding state
[   28.273949] br-vlan53: port 1(eth0.53) entered blocking state
[   28.279886] br-vlan53: port 1(eth0.53) entered disabled state
[   28.314775] device eth0.53 entered promiscuous mode
[   28.333334] br-vlan53: port 1(eth0.53) entered blocking state
[   28.339250] br-vlan53: port 1(eth0.53) entered forwarding state
[   28.410011] br-vlan54: port 1(eth0.54) entered blocking state
[   28.415946] br-vlan54: port 1(eth0.54) entered disabled state
[   28.422184] device eth0.54 entered promiscuous mode
[   28.469040] br-vlan54: port 1(eth0.54) entered blocking state
[   28.474951] br-vlan54: port 1(eth0.54) entered forwarding state
[   28.541654] br-vlan55: port 1(eth0.55) entered blocking state
[   28.547590] br-vlan55: port 1(eth0.55) entered disabled state
[   28.553826] device eth0.55 entered promiscuous mode
[   28.600379] br-vlan55: port 1(eth0.55) entered blocking state
[   28.606288] br-vlan55: port 1(eth0.55) entered forwarding state
[   28.719543] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   32.081833] br-vlan51: port 2(wlan0) entered blocking state
[   32.087598] br-vlan51: port 2(wlan0) entered disabled state
[   32.093648] device wlan0 entered promiscuous mode
[   33.386509] br-vlan51: port 3(wlan1) entered blocking state
[   33.392255] br-vlan51: port 3(wlan1) entered disabled state
[   33.398336] device wlan1 entered promiscuous mode
[   39.746850] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   39.753581] br-vlan51: port 2(wlan0) entered blocking state
[   39.759293] br-vlan51: port 2(wlan0) entered forwarding state
[   39.773581] br-vlan52: port 2(wlan0-1) entered blocking state
[   39.779505] br-vlan52: port 2(wlan0-1) entered disabled state
[   39.785762] device wlan0-1 entered promiscuous mode
[   39.796869] br-vlan52: port 2(wlan0-1) entered blocking state
[   39.802781] br-vlan52: port 2(wlan0-1) entered forwarding state
[   39.833388] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready
[   39.858911] br-vlan53: port 2(wlan0-2) entered blocking state
[   39.864831] br-vlan53: port 2(wlan0-2) entered disabled state
[   39.871238] device wlan0-2 entered promiscuous mode
[   39.879148] br-vlan53: port 2(wlan0-2) entered blocking state
[   39.885025] br-vlan53: port 2(wlan0-2) entered forwarding state
[   39.937821] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-2: link becomes ready
[   39.959615] br-vlan55: port 2(wlan0-3) entered blocking state
[   39.965524] br-vlan55: port 2(wlan0-3) entered disabled state
[   39.971755] device wlan0-3 entered promiscuous mode
[   40.007832] br-vlan55: port 2(wlan0-3) entered blocking state
[   40.013731] br-vlan55: port 2(wlan0-3) entered forwarding state
[   40.038522] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-3: link becomes ready
[   50.236014] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[   50.242755] br-vlan51: port 3(wlan1) entered blocking state
[   50.248467] br-vlan51: port 3(wlan1) entered forwarding state
[   50.265112] br-vlan52: port 3(wlan1-1) entered blocking state
[   50.271059] br-vlan52: port 3(wlan1-1) entered disabled state
[   50.277310] device wlan1-1 entered promiscuous mode
[   50.284929] br-vlan52: port 3(wlan1-1) entered blocking state
[   50.290860] br-vlan52: port 3(wlan1-1) entered forwarding state
[   50.321535] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-1: link becomes ready
[   50.346815] br-vlan53: port 3(wlan1-2) entered blocking state
[   50.352737] br-vlan53: port 3(wlan1-2) entered disabled state
[   50.359179] device wlan1-2 entered promiscuous mode
[   50.409804] br-vlan53: port 3(wlan1-2) entered blocking state
[   50.415715] br-vlan53: port 3(wlan1-2) entered forwarding state
[   50.445694] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-2: link becomes ready
[   50.469437] br-vlan55: port 3(wlan1-3) entered blocking state
[   50.475383] br-vlan55: port 3(wlan1-3) entered disabled state
[   50.481632] device wlan1-3 entered promiscuous mode
[   50.488940] br-vlan55: port 3(wlan1-3) entered blocking state
[   50.494869] br-vlan55: port 3(wlan1-3) entered forwarding state
[   50.520181] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-3: link becomes ready

Sysupgrade with OpenWrt
Firmware used: openwrt-22.03.2-ramips-mt76x8-tplink_archer-c20-v4-squashfs-sysupgrade.bin
Serial Log

root@URT-AP-PVEND:/# Watchdog handover: fd=3
- watchdog -
killall: telnetd: no process killed
Tue Dec 13 11:09:24 -03 2022 upgrade: Sending TERM to remaining processes ... netifd uhttpd ntpd ubusd urngdsh: S: out of range
sh: S: out of range
 logd rpcd hostapd[ 4978.172851] br-vlan55: port 2(wlan0-3) entered disabled state
 wpa_supplicant
[ 4978.188962] device wlan0-3 left promiscuous mode
[ 4978.193714] br-vlan55: port 2(wlan0-3) entered disabled state
[ 4978.207361] br-vlan53: port 2(wlan0-2) entered disabled state
[ 4978.214358] device wlan0-2 left promiscuous mode
[ 4978.219131] br-vlan53: port 2(wlan0-2) entered disabled state
[ 4978.246834] br-vlan52: port 2(wlan0-1) entered disabled state
[ 4978.253927] device wlan0-1 left promiscuous mode
[ 4978.258698] br-vlan52: port 2(wlan0-1) entered disabled state
[ 4978.269258] device wlan0 left promiscuous mode
[ 4978.274002] br-vlan51: port 2(wlan0) entered disabled state
[ 4978.292640] br-vlan55: port 3(wlan1-3) entered disabled state
[ 4978.299362] device wlan1-3 left promiscuous mode
[ 4978.304243] br-vlan55: port 3(wlan1-3) entered disabled state
[ 4978.319755] br-vlan53: port 3(wlan1-2) entered disabled state
[ 4978.326529] device wlan1-2 left promiscuous mode
[ 4978.331303] br-vlan53: port 3(wlan1-2) entered disabled state
[ 4978.359364] br-vlan52: port 3(wlan1-1) entered disabled state
[ 4978.366409] device wlan1-1 left promiscuous mode
[ 4978.371181] br-vlan52: port 3(wlan1-1) entered disabled state
[ 4978.381341] device wlan1 left promiscuous mode
[ 4978.386047] br-vlan51: port 3(wlan1) entered disabled state
Tue Dec 13 11:09:27 -03 2022 upgrade: Sending KILL to remaining processes ...sh: S: out of range
sh: S: out of range

[ 4982.305499] sh (2448): drop_caches: 3
Tue Dec 13 11:09:28 -03 2022 upgrade: Switching to ramdisk...
Tue Dec 13 14:09:31 UTC 2022 upgrade: Performing system upgrade...
[ 4985.378075] sh (2448): drop_caches: 3
Unlocking firmware ...

Writing from <stdin> to firmware ...  [ ][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w][e][w]    
Tue Dec 13 14:09:38 UTC 2022 upgrade: Upgrade completed
Tue Dec 13 14:09:39 UTC 2022 upgrade: Rebooting system...
umount: can't unmount /dev: Resource busy
umount: can't unmount /tmp: Resource [ 4992.875318] reboot: Restarting system
busy



[05040B0D][05040B0E][89880000][24233635][00242335]

DU Setting Cal Done



U-Boot 1.1.3 (Sep  8 2020 - 11:43:06)


Board: Ralink APSoC DRAM:  64 MB

relocate_code Pointer at: 83fb8000

******************************

Software System Reset Occurred

******************************

gpiomode1 55054404.

gpiomode2 05540554.

gpiomode2 05550555.

flash manufacture id: ef, device id 40 17

find flash: W25Q64BV

============================================ 

Ralink UBoot Version: 5.0.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:Sep  8 2020  Time:11:43:06

============================================ 

icache: sets:512, ways:4, linesz:32 ,total:65536

dcache: sets:256, ways:4, linesz:32 ,total:32768 


 ##### The CPU freq = 580 MHZ #### 

 estimate memory size =64 Mbytes

RESET MT7628 PHY!!!!!!

continue to starting system.

 0 

disable switch phyport...

   

3: System Boot system code via Flash.(0xbc020000)

do_bootm:argc=2, addr=0xbc020000

## Booting image at bc020000 ...

   Uncompressing Kernel Image ... OK

No initrd

## Transferring control to Linux (at address 80000000) ...

## Giving linux memsize in MB, 64


Starting kernel ...


[    0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 Sun Oct 24 09:01:35 2021
[    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 TP-Link Archer C20 v4
[    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=00062360
[    0.000000] Readback ErrCtl register=00062360
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 57444K/65536K available (5088K kernel code, 204K rwdata, 636K rodata, 1228K init, 205K bss, 8092K 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] random: get_random_bytes called from 0x805cda28 with crng_init=0
[    0.000000] CPU Clock: 580MHz
[    0.000000] timer_probe: no matching timers found
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000009] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007571] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[    0.045455] pid_max: default: 32768 minimum: 301
[    0.050093] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.057114] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.070500] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.079927] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.086573] pinctrl core: initialized pinctrl subsystem
[    0.094547] NET: Registered protocol family 16
[    0.203379] mt7620-pci 10140000.pcie: Port 0 N_FTS = 1b105000
[    0.358480] PCI host bridge /pcie@10140000 ranges:
[    0.363056]  MEM 0x0000000020000000..0x000000002fffffff
[    0.368086]   IO 0x0000000010160000..0x000000001016ffff
[    0.395480] PCI host bridge to bus 0000:00
[    0.399460] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.406060] pci_bus 0000:00: root bus resource [io  0x10160000-0x1016ffff]
[    0.412683] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.419232] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.426931] pci 0000:00:00.0: [14c3:0801] type 01 class 0x060400
[    0.432716] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.438736] pci 0000:00:00.0: reg 0x14: [mem 0x20200000-0x2020ffff]
[    0.444852] pci 0000:00:00.0: supports D1
[    0.448657] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.455982] pci 0000:01:00.0: [14c3:7650] type 00 class 0x028000
[    0.461818] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.467963] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.474075] pci 0000:01:00.1: [14c3:8650] type 00 class 0x0d1100
[    0.479892] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.486029] pci 0000:01:00.1: supports D1
[    0.489833] pci 0000:01:00.1: PME# supported from D0 D1 D3hot D3cold
[    0.497550] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.503922] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.510308] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.516659] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.523379] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    0.529931] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.536492] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[    0.543040] pci 0000:01:00.1: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    0.549590] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.554377] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    0.561044] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.575285] clocksource: Switched to clocksource MIPS
[    0.581271] thermal_sys: Registered thermal governor 'step_wise'
[    0.581690] NET: Registered protocol family 2
[    0.591823] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.599699] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.607808] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.615177] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.621974] TCP: Hash tables configured (established 1024 bind 1024)
[    0.628254] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.634584] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.641622] NET: Registered protocol family 1
[    0.645897] PCI: CLS 0 bytes, default 32
[    0.654641] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.668999] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.674635] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.700204] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.710633] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.716339] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.721972] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.727671] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.736596] printk: console [ttyS0] disabled
[    0.740793] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[    0.749517] printk: console [ttyS0] enabled
[    0.749517] printk: console [ttyS0] enabled
[    0.757927] printk: bootconsole [early0] disabled
[    0.757927] printk: bootconsole [early0] disabled
[    0.768807] spi-mt7621 10000b00.spi: sys_freq: 193333333
[    0.793051] spi-nor spi0.0: s25fl064k (8192 Kbytes)
[    0.798084] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.804535] Creating 4 MTD partitions on "spi0.0":
[    0.809408] 0x000000000000-0x000000020000 : "boot"
[    0.815484] 0x000000020000-0x0000007c0000 : "firmware"
[    0.824365] 2 tplink-fw partitions found on MTD device firmware
[    0.830443] Creating 2 MTD partitions on "firmware":
[    0.835500] 0x000000000000-0x0000001e821a : "kernel"
[    0.841659] 0x0000001e821c-0x0000007a0000 : "rootfs"
[    0.847848] mtd: device 3 (rootfs) set to be root filesystem
[    0.855838] 1 squashfs-split partitions found on MTD device rootfs
[    0.862204] 0x0000004e0000-0x0000007a0000 : "rootfs_data"
[    0.868780] 0x0000007c0000-0x0000007d0000 : "config"
[    0.875001] 0x0000007d0000-0x000000800000 : "factory"
[    0.881991] libphy: Fixed MDIO Bus: probed
[    0.899519] rt3050-esw 10110000.esw: link changed 0x00
[    0.906740] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    0.917211] NET: Registered protocol family 10
[    0.926367] Segment Routing with IPv6
[    0.930303] NET: Registered protocol family 17
[    0.934911] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.948066] 8021q: 802.1Q VLAN Support v1.8
[    0.963817] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    0.977922] Freeing unused kernel memory: 1228K
[    0.982545] This architecture does not have kernel memory protection.
[    0.989078] Run /sbin/init as init process
[    1.203283] random: fast init done
[    1.837515] init: Console is alive
[    1.841393] init: - watchdog -
[    2.622421] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.780139] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.798071] init: - preinit -
[    4.521649] random: jshn: uninitialized urandom read (4 bytes read)
[    4.613741] random: jshn: uninitialized urandom read (4 bytes read)
[    4.841217] random: jshn: uninitialized urandom read (4 bytes read)
[    5.422388] rt3050-esw 10110000.esw: link changed 0x00
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    5.614587] urandom_read: 2 callbacks suppressed
[    5.614596] random: procd: uninitialized urandom read (4 bytes read)
[    8.877634] rt3050-esw 10110000.esw: link changed 0x02
[    9.222581] rt3050-esw 10110000.esw: link changed 0x03
[   10.435115] jffs2: notice: (456) jffs2_build_xattr_subsystem: complete building xattr subsystem, 2766 of xdatum (8 unchecked, 2758 orphan) and 2767 of xref (2758 dead, 0 orphan) found.
[   10.453921] mount_root: switching to jffs2 overlay
[   10.589944] overlayfs: upper fs does not support tmpfile.
[   10.602664] urandom-seed: Seeding with /etc/urandom.seed
[   10.750915] procd: - early -
[   10.754062] procd: - watchdog -
[   11.353758] procd: - watchdog -
[   11.358849] procd: - ubus -
[   11.443393] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.451918] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.459066] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.468205] procd: - init -
Please press Enter to activate this console.
[   12.348199] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.496123] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[   12.503888] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[   12.624191] mt76_wmac 10300000.wmac: ASIC revision: 76280001
[   12.802765] urngd: v1.0.2 started.
[   13.007374] random: crng init done
[   13.010830] random: 1 urandom warning(s) missed due to ratelimiting
[   13.661487] mt76_wmac 10300000.wmac: Firmware Version: 20151201
[   13.667582] mt76_wmac 10300000.wmac: Build Time: 20151201183641
[   13.707302] mt76_wmac 10300000.wmac: firmware init done
[   13.963557] mt76x0e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[   13.970129] mt76x0e 0000:01:00.0: ASIC revision: 76100002
[   14.247954] mt76x0e 0000:01:00.0: Firmware Version: 0.1.00
[   14.484325] mt76x0e 0000:01:00.0: EEPROM ver:02 fae:00
[   14.515559] kmodloader: done loading kernel modules from /etc/modules.d/*
[   20.797989] rt3050-esw 10110000.esw: link changed 0x00
[   24.414233] rt3050-esw 10110000.esw: link changed 0x02
[   24.594072] rt3050-esw 10110000.esw: link changed 0x03
[   27.692747] br-lan: port 1(eth0.33) entered blocking state
[   27.698417] br-lan: port 1(eth0.33) entered disabled state
[   27.704379] device eth0.33 entered promiscuous mode
[   27.709383] device eth0 entered promiscuous mode
[   27.737643] br-lan: port 1(eth0.33) entered blocking state
[   27.743300] br-lan: port 1(eth0.33) entered forwarding state
[   27.861377] br-vlan51: port 1(eth0.51) entered blocking state
[   27.867317] br-vlan51: port 1(eth0.51) entered disabled state
[   27.873537] device eth0.51 entered promiscuous mode
[   27.991547] br-vlan51: port 1(eth0.51) entered blocking state
[   27.997431] br-vlan51: port 1(eth0.51) entered forwarding state
[   28.066436] br-vlan52: port 1(eth0.52) entered blocking state
[   28.072371] br-vlan52: port 1(eth0.52) entered disabled state
[   28.103493] device eth0.52 entered promiscuous mode
[   28.135501] br-vlan52: port 1(eth0.52) entered blocking state
[   28.141374] br-vlan52: port 1(eth0.52) entered forwarding state
[   28.246537] br-vlan53: port 1(eth0.53) entered blocking state
[   28.252473] br-vlan53: port 1(eth0.53) entered disabled state
[   28.283409] device eth0.53 entered promiscuous mode
[   28.304948] br-vlan53: port 1(eth0.53) entered blocking state
[   28.310857] br-vlan53: port 1(eth0.53) entered forwarding state
[   28.382667] br-vlan54: port 1(eth0.54) entered blocking state
[   28.388605] br-vlan54: port 1(eth0.54) entered disabled state
[   28.394835] device eth0.54 entered promiscuous mode
[   28.441591] br-vlan54: port 1(eth0.54) entered blocking state
[   28.447507] br-vlan54: port 1(eth0.54) entered forwarding state
[   28.517731] br-vlan55: port 1(eth0.55) entered blocking state
[   28.523669] br-vlan55: port 1(eth0.55) entered disabled state
[   28.529910] device eth0.55 entered promiscuous mode
[   28.577976] br-vlan55: port 1(eth0.55) entered blocking state
[   28.583893] br-vlan55: port 1(eth0.55) entered forwarding state
[   28.683795] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   32.068940] br-vlan51: port 2(wlan0) entered blocking state
[   32.074678] br-vlan51: port 2(wlan0) entered disabled state
[   32.080732] device wlan0 entered promiscuous mode
[   33.366525] br-vlan51: port 3(wlan1) entered blocking state
[   33.372309] br-vlan51: port 3(wlan1) entered disabled state
[   33.378374] device wlan1 entered promiscuous mode
[   39.745117] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   39.751849] br-vlan51: port 2(wlan0) entered blocking state
[   39.757561] br-vlan51: port 2(wlan0) entered forwarding state
[   39.774331] br-vlan52: port 2(wlan0-1) entered blocking state
[   39.780250] br-vlan52: port 2(wlan0-1) entered disabled state
[   39.786488] device wlan0-1 entered promiscuous mode
[   39.793501] br-vlan52: port 2(wlan0-1) entered blocking state
[   39.799431] br-vlan52: port 2(wlan0-1) entered forwarding state
[   39.828877] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready
[   39.854975] br-vlan53: port 2(wlan0-2) entered blocking state
[   39.860906] br-vlan53: port 2(wlan0-2) entered disabled state
[   39.867251] device wlan0-2 entered promiscuous mode
[   39.920302] br-vlan53: port 2(wlan0-2) entered blocking state
[   39.926235] br-vlan53: port 2(wlan0-2) entered forwarding state
[   39.953216] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-2: link becomes ready
[   39.974840] br-vlan55: port 2(wlan0-3) entered blocking state
[   39.980757] br-vlan55: port 2(wlan0-3) entered disabled state
[   39.986991] device wlan0-3 entered promiscuous mode
[   39.996922] br-vlan55: port 2(wlan0-3) entered blocking state
[   40.002840] br-vlan55: port 2(wlan0-3) entered forwarding state
[   40.037333] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-3: link becomes ready
[   50.236396] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[   50.243257] br-vlan51: port 3(wlan1) entered blocking state
[   50.248997] br-vlan51: port 3(wlan1) entered forwarding state
[   50.266347] br-vlan52: port 3(wlan1-1) entered blocking state
[   50.272291] br-vlan52: port 3(wlan1-1) entered disabled state
[   50.278527] device wlan1-1 entered promiscuous mode
[   50.306880] br-vlan52: port 3(wlan1-1) entered blocking state
[   50.312791] br-vlan52: port 3(wlan1-1) entered forwarding state
[   50.350187] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-1: link becomes ready
[   50.377486] br-vlan53: port 3(wlan1-2) entered blocking state
[   50.383407] br-vlan53: port 3(wlan1-2) entered disabled state
[   50.389661] device wlan1-2 entered promiscuous mode
[   50.400683] br-vlan53: port 3(wlan1-2) entered blocking state
[   50.406594] br-vlan53: port 3(wlan1-2) entered forwarding state
[   50.444146] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-2: link becomes ready
[   50.466480] br-vlan55: port 3(wlan1-3) entered blocking state
[   50.472427] br-vlan55: port 3(wlan1-3) entered disabled state
[   50.478688] device wlan1-3 entered promiscuous mode
[   50.486106] br-vlan55: port 3(wlan1-3) entered blocking state
[   50.492029] br-vlan55: port 3(wlan1-3) entered forwarding state
[   50.524287] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-3: link becomes ready

TFTP Upgrade with OpenWrt
Firmware used: openwrt-22.03.2-ramips-mt76x8-tplink_archer-c20-v4-squashfs-tftp-recovery.bin
Serial Log

[05040B0E][05040B0E][89890000][23233636][00232335]

DU Setting Cal Done



U-Boot 1.1.3 (Sep  8 2020 - 11:43:06)


Board: Ralink APSoC DRAM:  64 MB

relocate_code Pointer at: 83fb8000

gpiomode1 55054404.

gpiomode2 05540554.

gpiomode2 05550555.

flash manufacture id: ef, device id 40 17

find flash: W25Q64BV

============================================ 

Ralink UBoot Version: 5.0.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:Sep  8 2020  Time:11:43:06

============================================ 

icache: sets:512, ways:4, linesz:32 ,total:65536

dcache: sets:256, ways:4, linesz:32 ,total:32768 


 ##### The CPU freq = 580 MHZ #### 

 estimate memory size =64 Mbytes

RESET MT7628 PHY!!!!!!..................................................

starting recovery...

Read MAC Address from Flash



 NetTxPacket = 0x83FE7700 


 KSEG1ADDR(NetTxPacket) = 0xA3FE7700 


 NetLoop,call eth_halt ! 


 NetLoop,call eth_init ! 

Trying Eth0 (10/100-M)


 Waitting for RX_DMA_BUSY status Start... done



 ETH_STATE_ACTIVE!! 

TFTP from server 192.168.0.66; our IP address is 192.168.0.2

Filename 'tp_recovery.bin'.


 TIMEOUT_COUNT=10,Load address: 0x80060000

Loading: *Got ARP REPLY, set server/gtwy eth addr (00:e0:4c:68:14:65)

Got it

######checksum bad

checksum bad

####checksum bad

#############################checksum bad

##########################

	 #################################################################

	 #################################################################

	 #########checksum bad

checksum bad

checksum bad

checksum bad

###########################checksum bad

#############################

	 #################################################################

	 #################################################################

	 #################################################################

	 ########################Got ARP REQUEST, return our IP

#########################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 ############################

done

Bytes transferred = 8126464 (7c0000 hex)

LoadAddr=80060000 NetBootFileXferSize= 007c0000


 Erase flash !!

From 0x20000 length 0x7A0000

..........................................................................................................................


 Copy 0x80080000 to 0x00020000, count 0x7A0000.... 

..........................................................................................................................



[05040B0E][05040B0E][89890000][23233636][00232335]

DU Setting Cal Done



U-Boot 1.1.3 (Sep  8 2020 - 11:43:06)


Board: Ralink APSoC DRAM:  64 MB

relocate_code Pointer at: 83fb8000

******************************

Software System Reset Occurred

******************************

gpiomode1 55054404.

gpiomode2 05540554.

gpiomode2 05550555.

flash manufacture id: ef, device id 40 17

find flash: W25Q64BV

============================================ 

Ralink UBoot Version: 5.0.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:Sep  8 2020  Time:11:43:06

============================================ 

icache: sets:512, ways:4, linesz:32 ,total:65536

dcache: sets:256, ways:4, linesz:32 ,total:32768 


 ##### The CPU freq = 580 MHZ #### 

 estimate memory size =64 Mbytes

RESET MT7628 PHY!!!!!!

continue to starting system.

 0 

disable switch phyport...

   

3: System Boot system code via Flash.(0xbc020000)

do_bootm:argc=2, addr=0xbc020000

## Booting image at bc020000 ...

   Uncompressing Kernel Image ... OK

No initrd

## Transferring control to Linux (at address 80000000) ...

## Giving linux memsize in MB, 64


Starting kernel ...


[    0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 Sun Oct 24 09:01:35 2021
[    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 TP-Link Archer C20 v4
[    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=0007e000
[    0.000000] Readback ErrCtl register=0007e000
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 57444K/65536K available (5088K kernel code, 204K rwdata, 636K rodata, 1228K init, 205K bss, 8092K 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] random: get_random_bytes called from 0x805cda28 with crng_init=0
[    0.000000] CPU Clock: 580MHz
[    0.000000] timer_probe: no matching timers found
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000009] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007571] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[    0.045455] pid_max: default: 32768 minimum: 301
[    0.050093] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.057114] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.070500] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.079927] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.086573] pinctrl core: initialized pinctrl subsystem
[    0.094547] NET: Registered protocol family 16
[    0.203379] mt7620-pci 10140000.pcie: Port 0 N_FTS = 1b105000
[    0.358479] PCI host bridge /pcie@10140000 ranges:
[    0.363056]  MEM 0x0000000020000000..0x000000002fffffff
[    0.368086]   IO 0x0000000010160000..0x000000001016ffff
[    0.395480] PCI host bridge to bus 0000:00
[    0.399461] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.406060] pci_bus 0000:00: root bus resource [io  0x10160000-0x1016ffff]
[    0.412684] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.419233] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.426932] pci 0000:00:00.0: [14c3:0801] type 01 class 0x060400
[    0.432716] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.438736] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    0.444856] pci 0000:00:00.0: supports D1
[    0.448661] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.455810] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.463726] pci 0000:01:00.0: [14c3:7650] type 00 class 0x028000
[    0.469549] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.475693] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.481807] pci 0000:01:00.1: [14c3:8650] type 00 class 0x0d1100
[    0.487624] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.493761] pci 0000:01:00.1: supports D1
[    0.497565] pci 0000:01:00.1: PME# supported from D0 D1 D3hot D3cold
[    0.505282] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.511655] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.518042] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.524392] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.531112] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    0.537663] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.544225] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[    0.550773] pci 0000:01:00.1: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    0.557323] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.562110] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    0.568777] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.583015] clocksource: Switched to clocksource MIPS
[    0.589002] thermal_sys: Registered thermal governor 'step_wise'
[    0.589421] NET: Registered protocol family 2
[    0.599555] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.607431] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.615540] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.622909] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.629705] TCP: Hash tables configured (established 1024 bind 1024)
[    0.635987] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.642316] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.649353] NET: Registered protocol family 1
[    0.653628] PCI: CLS 0 bytes, default 32
[    0.662372] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.676730] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.682366] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.707930] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.718359] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.724068] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.729702] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.735401] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.744326] printk: console [ttyS0] disabled
[    0.748524] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[    0.757248] printk: console [ttyS0] enabled
[    0.757248] printk: console [ttyS0] enabled
[    0.765659] printk: bootconsole [early0] disabled
[    0.765659] printk: bootconsole [early0] disabled
[    0.776538] spi-mt7621 10000b00.spi: sys_freq: 193333333
[    0.800746] spi-nor spi0.0: s25fl064k (8192 Kbytes)
[    0.805781] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.812232] Creating 4 MTD partitions on "spi0.0":
[    0.817106] 0x000000000000-0x000000020000 : "boot"
[    0.823179] 0x000000020000-0x0000007c0000 : "firmware"
[    0.832064] 2 tplink-fw partitions found on MTD device firmware
[    0.838142] Creating 2 MTD partitions on "firmware":
[    0.843199] 0x000000000000-0x0000001e821a : "kernel"
[    0.849360] 0x0000001e821c-0x0000007a0000 : "rootfs"
[    0.855553] mtd: device 3 (rootfs) set to be root filesystem
[    0.863538] 1 squashfs-split partitions found on MTD device rootfs
[    0.869904] 0x0000004e0000-0x0000007a0000 : "rootfs_data"
[    0.876483] 0x0000007c0000-0x0000007d0000 : "config"
[    0.882704] 0x0000007d0000-0x000000800000 : "factory"
[    0.889698] libphy: Fixed MDIO Bus: probed
[    0.907353] rt3050-esw 10110000.esw: link changed 0x00
[    0.914574] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    0.925034] NET: Registered protocol family 10
[    0.934189] Segment Routing with IPv6
[    0.938125] NET: Registered protocol family 17
[    0.942733] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.955888] 8021q: 802.1Q VLAN Support v1.8
[    0.971636] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    0.985741] Freeing unused kernel memory: 1228K
[    0.990364] This architecture does not have kernel memory protection.
[    0.996897] Run /sbin/init as init process
[    1.211014] random: fast init done
[    1.845513] init: Console is alive
[    1.849398] init: - watchdog -
[    2.630474] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.788141] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.806064] init: - preinit -
[    4.530051] random: jshn: uninitialized urandom read (4 bytes read)
[    4.622287] random: jshn: uninitialized urandom read (4 bytes read)
[    4.851604] random: jshn: uninitialized urandom read (4 bytes read)
[    5.432275] rt3050-esw 10110000.esw: link changed 0x00
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug[    5.623479] urandom_read: 2 callbacks suppressed
 level
[    5.623488] random: procd: uninitialized urandom read (4 bytes read)
[    9.067478] rt3050-esw 10110000.esw: link changed 0x02
[   10.445937] jffs2: notice: (456) jffs2_build_xattr_subsystem: complete building xattr subsystem, 2766 of xdatum (8 unchecked, 2758 orphan) and 2767 of xref (2758 dead, 0 orphan) found.
[   10.464791] mount_root: switching to jffs2 overlay
[   10.599091] overlayfs: upper fs does not support tmpfile.
[   10.612585] urandom-seed: Seeding with /etc/urandom.seed
[   10.760682] procd: - early -
[   10.764302] procd: - watchdog -
[   11.362825] procd: - watchdog -
[   11.367960] procd: - ubus -
[   11.452385] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.460881] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.468041] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.477211] procd: - init -
Please press Enter to activate this console.
[   12.355260] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.499863] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[   12.507627] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[   12.627922] mt76_wmac 10300000.wmac: ASIC revision: 76280001
[   12.821704] urngd: v1.0.2 started.
[   13.025028] random: crng init done
[   13.028525] random: 1 urandom warning(s) missed due to ratelimiting
[   13.665234] mt76_wmac 10300000.wmac: Firmware Version: 20151201
[   13.671326] mt76_wmac 10300000.wmac: Build Time: 20151201183641
[   13.711033] mt76_wmac 10300000.wmac: firmware init done
[   13.966973] mt76x0e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[   13.973589] mt76x0e 0000:01:00.0: ASIC revision: 76100002
[   14.255656] mt76x0e 0000:01:00.0: Firmware Version: 0.1.00
[   14.492054] mt76x0e 0000:01:00.0: EEPROM ver:02 fae:00
[   14.523276] kmodloader: done loading kernel modules from /etc/modules.d/*
[   20.845804] rt3050-esw 10110000.esw: link changed 0x00
[   24.347103] rt3050-esw 10110000.esw: link changed 0x02
[   27.736140] br-lan: port 1(eth0.33) entered blocking state
[   27.741809] br-lan: port 1(eth0.33) entered disabled state
[   27.747764] device eth0.33 entered promiscuous mode
[   27.752771] device eth0 entered promiscuous mode
[   27.780925] br-lan: port 1(eth0.33) entered blocking state
[   27.786573] br-lan: port 1(eth0.33) entered forwarding state
[   27.897658] br-vlan51: port 1(eth0.51) entered blocking state
[   27.903596] br-vlan51: port 1(eth0.51) entered disabled state
[   27.909818] device eth0.51 entered promiscuous mode
[   28.027229] br-vlan51: port 1(eth0.51) entered blocking state
[   28.033103] br-vlan51: port 1(eth0.51) entered forwarding state
[   28.106104] br-vlan52: port 1(eth0.52) entered blocking state
[   28.112040] br-vlan52: port 1(eth0.52) entered disabled state
[   28.135141] device eth0.52 entered promiscuous mode
[   28.167282] br-vlan52: port 1(eth0.52) entered blocking state
[   28.173166] br-vlan52: port 1(eth0.52) entered forwarding state
[   28.278222] br-vlan53: port 1(eth0.53) entered blocking state
[   28.284160] br-vlan53: port 1(eth0.53) entered disabled state
[   28.306654] device eth0.53 entered promiscuous mode
[   28.332109] br-vlan53: port 1(eth0.53) entered blocking state
[   28.338022] br-vlan53: port 1(eth0.53) entered forwarding state
[   28.417198] br-vlan54: port 1(eth0.54) entered blocking state
[   28.423136] br-vlan54: port 1(eth0.54) entered disabled state
[   28.429368] device eth0.54 entered promiscuous mode
[   28.476754] br-vlan54: port 1(eth0.54) entered blocking state
[   28.482666] br-vlan54: port 1(eth0.54) entered forwarding state
[   28.549732] br-vlan55: port 1(eth0.55) entered blocking state
[   28.555669] br-vlan55: port 1(eth0.55) entered disabled state
[   28.561908] device eth0.55 entered promiscuous mode
[   28.604357] br-vlan55: port 1(eth0.55) entered blocking state
[   28.610267] br-vlan55: port 1(eth0.55) entered forwarding state
[   28.719634] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   32.088167] br-vlan51: port 2(wlan0) entered blocking state
[   32.093908] br-vlan51: port 2(wlan0) entered disabled state
[   32.099980] device wlan0 entered promiscuous mode
[   33.381684] br-vlan51: port 3(wlan1) entered blocking state
[   33.387429] br-vlan51: port 3(wlan1) entered disabled state
[   33.393505] device wlan1 entered promiscuous mode
[   39.775155] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   39.781858] br-vlan51: port 2(wlan0) entered blocking state
[   39.787573] br-vlan51: port 2(wlan0) entered forwarding state
[   39.804513] br-vlan52: port 2(wlan0-1) entered blocking state
[   39.810450] br-vlan52: port 2(wlan0-1) entered disabled state
[   39.816688] device wlan0-1 entered promiscuous mode
[   39.827735] br-vlan52: port 2(wlan0-1) entered blocking state
[   39.833642] br-vlan52: port 2(wlan0-1) entered forwarding state
[   39.860599] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready
[   39.885896] br-vlan53: port 2(wlan0-2) entered blocking state
[   39.891814] br-vlan53: port 2(wlan0-2) entered disabled state
[   39.898046] device wlan0-2 entered promiscuous mode
[   39.905333] br-vlan53: port 2(wlan0-2) entered blocking state
[   39.911274] br-vlan53: port 2(wlan0-2) entered forwarding state
[   39.962290] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-2: link becomes ready
[   39.985604] br-vlan55: port 2(wlan0-3) entered blocking state
[   39.991539] br-vlan55: port 2(wlan0-3) entered disabled state
[   39.997896] device wlan0-3 entered promiscuous mode
[   40.035467] br-vlan55: port 2(wlan0-3) entered blocking state
[   40.041361] br-vlan55: port 2(wlan0-3) entered forwarding state
[   40.080920] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-3: link becomes ready
[   50.232078] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[   50.238835] br-vlan51: port 3(wlan1) entered blocking state
[   50.244548] br-vlan51: port 3(wlan1) entered forwarding state
[   50.258938] br-vlan52: port 3(wlan1-1) entered blocking state
[   50.264861] br-vlan52: port 3(wlan1-1) entered disabled state
[   50.271166] device wlan1-1 entered promiscuous mode
[   50.284904] br-vlan52: port 3(wlan1-1) entered blocking state
[   50.290815] br-vlan52: port 3(wlan1-1) entered forwarding state
[   50.316412] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-1: link becomes ready
[   50.340089] br-vlan53: port 3(wlan1-2) entered blocking state
[   50.346006] br-vlan53: port 3(wlan1-2) entered disabled state
[   50.352512] device wlan1-2 entered promiscuous mode
[   50.403477] br-vlan53: port 3(wlan1-2) entered blocking state
[   50.409374] br-vlan53: port 3(wlan1-2) entered forwarding state
[   50.434785] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-2: link becomes ready
[   50.454881] br-vlan55: port 3(wlan1-3) entered blocking state
[   50.460824] br-vlan55: port 3(wlan1-3) entered disabled state
[   50.467119] device wlan1-3 entered promiscuous mode
[   50.479759] br-vlan55: port 3(wlan1-3) entered blocking state
[   50.485684] br-vlan55: port 3(wlan1-3) entered forwarding state
[   50.517434] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-3: link becomes ready

TFTP Upgrade with TP-Link c20 v4 firmware
Firmware used: Archer C20(EU)_V4_181213
Serial Log

[05040B0E][05040B0F][89890000][23233535][00232334]

DU Setting Cal Done



U-Boot 1.1.3 (Sep  8 2020 - 11:43:06)


Board: Ralink APSoC DRAM:  64 MB

relocate_code Pointer at: 83fb8000

gpiomode1 55054404.

gpiomode2 05540554.

gpiomode2 05550555.

flash manufacture id: ef, device id 40 17

find flash: W25Q64BV

============================================ 

Ralink UBoot Version: 5.0.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:Sep  8 2020  Time:11:43:06

============================================ 

icache: sets:512, ways:4, linesz:32 ,total:65536

dcache: sets:256, ways:4, linesz:32 ,total:32768 


 ##### The CPU freq = 580 MHZ #### 

 estimate memory size =64 Mbytes

RESET MT7628 PHY!!!!!!..................................................

starting recovery...

Read MAC Address from Flash



 NetTxPacket = 0x83FE7700 


 KSEG1ADDR(NetTxPacket) = 0xA3FE7700 


 NetLoop,call eth_halt ! 


 NetLoop,call eth_init ! 

Trying Eth0 (10/100-M)


 Waitting for RX_DMA_BUSY status Start... done



 ETH_STATE_ACTIVE!! 

TFTP from server 192.168.0.66; our IP address is 192.168.0.2

Filename 'tp_recovery.bin'.


 TIMEOUT_COUNT=10,Load address: 0x80060000

Loading: *checksum bad

checksum bad

Got ARP REPLY, set server/gtwy eth addr (00:e0:4c:68:14:65)

Got it

checksum bad

#################################################################

	 ###########################checksum bad

checksum bad

checksum bad

checksum bad

####checksum bad

checksum bad

####################checksum bad

checksum bad

##############

	 #############################checksum bad

checksum bad

##########################checksum bad

##########

	 #################################################################

	 ###############################################################Got ARP REQUEST, return our IP

##

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 ############################

done

Bytes transferred = 8126976 (7c0200 hex)

LoadAddr=80060000 NetBootFileXferSize= 007c0200


 Erase flash !!

From 0x20000 length 0x7A0000

..........................................................................................................................


 Copy 0x80080000 to 0x00020000, count 0x7A0000.... 

..........................................................................................................................



[05040B0D][05040B0E][89880000][23223534][00232234]

DU Setting Cal Done



U-Boot 1.1.3 (Sep  8 2020 - 11:43:06)


Board: Ralink APSoC DRAM:  64 MB

relocate_code Pointer at: 83fb8000

******************************

Software System Reset Occurred

******************************

gpiomode1 55054404.

gpiomode2 05540554.

gpiomode2 05550555.

flash manufacture id: ef, device id 40 17

find flash: W25Q64BV

============================================ 

Ralink UBoot Version: 5.0.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:Sep  8 2020  Time:11:43:06

============================================ 

icache: sets:512, ways:4, linesz:32 ,total:65536

dcache: sets:256, ways:4, linesz:32 ,total:32768 


 ##### The CPU freq = 580 MHZ #### 

 estimate memory size =64 Mbytes

RESET MT7628 PHY!!!!!!

continue to starting system.

 0 

disable switch phyport...

   

3: System Boot system code via Flash.(0xbc020000)

do_bootm:argc=2, addr=0xbc020000

## Booting image at bc020000 ...

   Uncompressing Kernel Image ... OK

No initrd

## Transferring control to Linux (at address 80000000) ...

## Giving linux memsize in MB, 64


Starting kernel ...


[    0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 Sun Oct 24 09:01:35 2021
[    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 TP-Link Archer C20 v4
[    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=00042360
[    0.000000] Readback ErrCtl register=00042360
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 57444K/65536K available (5088K kernel code, 204K rwdata, 636K rodata, 1228K init, 205K bss, 8092K 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] random: get_random_bytes called from 0x805cda28 with crng_init=0
[    0.000000] CPU Clock: 580MHz
[    0.000000] timer_probe: no matching timers found
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000009] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007571] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[    0.045455] pid_max: default: 32768 minimum: 301
[    0.050093] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.057114] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.070500] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.079927] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.086573] pinctrl core: initialized pinctrl subsystem
[    0.094547] NET: Registered protocol family 16
[    0.203376] mt7620-pci 10140000.pcie: Port 0 N_FTS = 1b105000
[    0.358475] PCI host bridge /pcie@10140000 ranges:
[    0.363052]  MEM 0x0000000020000000..0x000000002fffffff
[    0.368082]   IO 0x0000000010160000..0x000000001016ffff
[    0.395476] PCI host bridge to bus 0000:00
[    0.399457] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.406056] pci_bus 0000:00: root bus resource [io  0x10160000-0x1016ffff]
[    0.412680] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.419229] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.426928] pci 0000:00:00.0: [14c3:0801] type 01 class 0x060400
[    0.432712] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.438732] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    0.444853] pci 0000:00:00.0: supports D1
[    0.448658] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.455807] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.463722] pci 0000:01:00.0: [14c3:7650] type 00 class 0x028000
[    0.469545] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.475689] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.481803] pci 0000:01:00.1: [14c3:8650] type 00 class 0x0d1100
[    0.487621] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.493757] pci 0000:01:00.1: supports D1
[    0.497562] pci 0000:01:00.1: PME# supported from D0 D1 D3hot D3cold
[    0.505279] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.511651] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.518038] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.524388] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.531108] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    0.537660] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.544221] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[    0.550769] pci 0000:01:00.1: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    0.557319] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.562106] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    0.568773] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.583011] clocksource: Switched to clocksource MIPS
[    0.588998] thermal_sys: Registered thermal governor 'step_wise'
[    0.589417] NET: Registered protocol family 2
[    0.599552] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.607428] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.615537] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.622906] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.629702] TCP: Hash tables configured (established 1024 bind 1024)
[    0.635985] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.642314] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.649352] NET: Registered protocol family 1
[    0.653627] PCI: CLS 0 bytes, default 32
[    0.662374] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.676734] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.682370] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.707939] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.718367] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.724076] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.729710] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.735408] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.744330] printk: console [ttyS0] disabled
[    0.748528] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[    0.757252] printk: console [ttyS0] enabled
[    0.757252] printk: console [ttyS0] enabled
[    0.765663] printk: bootconsole [early0] disabled
[    0.765663] printk: bootconsole [early0] disabled
[    0.776545] spi-mt7621 10000b00.spi: sys_freq: 193333333
[    0.800766] spi-nor spi0.0: s25fl064k (8192 Kbytes)
[    0.805801] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.812252] Creating 4 MTD partitions on "spi0.0":
[    0.817125] 0x000000000000-0x000000020000 : "boot"
[    0.823203] 0x000000020000-0x0000007c0000 : "firmware"
[    0.832081] 2 tplink-fw partitions found on MTD device firmware
[    0.838158] Creating 2 MTD partitions on "firmware":
[    0.843215] 0x000000000000-0x0000001e821a : "kernel"
[    0.849375] 0x0000001e821c-0x0000007a0000 : "rootfs"
[    0.855566] mtd: device 3 (rootfs) set to be root filesystem
[    0.863550] 1 squashfs-split partitions found on MTD device rootfs
[    0.869917] 0x0000004e0000-0x0000007a0000 : "rootfs_data"
[    0.876492] 0x0000007c0000-0x0000007d0000 : "config"
[    0.882715] 0x0000007d0000-0x000000800000 : "factory"
[    0.889705] libphy: Fixed MDIO Bus: probed
[    0.907353] rt3050-esw 10110000.esw: link changed 0x00
[    0.914582] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    0.925041] NET: Registered protocol family 10
[    0.934197] Segment Routing with IPv6
[    0.938135] NET: Registered protocol family 17
[    0.942743] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.955900] 8021q: 802.1Q VLAN Support v1.8
[    0.971632] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    0.985729] Freeing unused kernel memory: 1228K
[    0.990352] This architecture does not have kernel memory protection.
[    0.996885] Run /sbin/init as init process
[    1.211010] random: fast init done
[    1.845689] init: Console is alive
[    1.849577] init: - watchdog -
[    2.630570] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.788316] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.806242] init: - preinit -
[    4.530028] random: jshn: uninitialized urandom read (4 bytes read)
[    4.622316] random: jshn: uninitialized urandom read (4 bytes read)
[    4.850546] random: jshn: uninitialized urandom read (4 bytes read)
[    5.431099] rt3050-esw 10110000.esw: link changed 0x00
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    5.623371] urandom_read: 2 callbacks suppressed
[    5.623380] random: procd: uninitialized urandom read (4 bytes read)
[    8.919314] rt3050-esw 10110000.esw: link changed 0x02
[   10.442294] jffs2: notice: (456) jffs2_build_xattr_subsystem: complete building xattr subsystem, 2766 of xdatum (8 unchecked, 2758 orphan) and 2767 of xref (2758 dead, 0 orphan) found.
[   10.461273] mount_root: switching to jffs2 overlay
[   10.596304] overlayfs: upper fs does not support tmpfile.
[   10.609557] urandom-seed: Seeding with /etc/urandom.seed
[   10.757616] procd: - early -
[   10.761274] procd: - watchdog -
[   11.361811] procd: - watchdog -
[   11.366883] procd: - ubus -
[   11.451458] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.460066] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.467286] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.476458] procd: - init -
Please press Enter to activate this console.
[   12.351853] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.495855] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[   12.503620] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[   12.622304] mt76_wmac 10300000.wmac: ASIC revision: 76280001
[   12.803450] urngd: v1.0.2 started.
[   13.000636] random: crng init done
[   13.004133] random: 1 urandom warning(s) missed due to ratelimiting
[   13.661253] mt76_wmac 10300000.wmac: Firmware Version: 20151201
[   13.667347] mt76_wmac 10300000.wmac: Build Time: 20151201183641
[   13.707030] mt76_wmac 10300000.wmac: firmware init done
[   13.962997] mt76x0e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[   13.969620] mt76x0e 0000:01:00.0: ASIC revision: 76100002
[   14.251697] mt76x0e 0000:01:00.0: Firmware Version: 0.1.00
[   14.488053] mt76x0e 0000:01:00.0: EEPROM ver:02 fae:00
[   14.517046] kmodloader: done loading kernel modules from /etc/modules.d/*
[   20.810076] rt3050-esw 10110000.esw: link changed 0x00
[   24.294995] rt3050-esw 10110000.esw: link changed 0x02
[   27.692327] br-lan: port 1(eth0.33) entered blocking state
[   27.697997] br-lan: port 1(eth0.33) entered disabled state
[   27.703951] device eth0.33 entered promiscuous mode
[   27.708958] device eth0 entered promiscuous mode
[   27.740152] br-lan: port 1(eth0.33) entered blocking state
[   27.745797] br-lan: port 1(eth0.33) entered forwarding state
[   27.857509] br-vlan51: port 1(eth0.51) entered blocking state
[   27.863447] br-vlan51: port 1(eth0.51) entered disabled state
[   27.869664] device eth0.51 entered promiscuous mode
[   27.979265] br-vlan51: port 1(eth0.51) entered blocking state
[   27.985144] br-vlan51: port 1(eth0.51) entered forwarding state
[   28.066044] br-vlan52: port 1(eth0.52) entered blocking state
[   28.071980] br-vlan52: port 1(eth0.52) entered disabled state
[   28.095168] device eth0.52 entered promiscuous mode
[   28.135228] br-vlan52: port 1(eth0.52) entered blocking state
[   28.141122] br-vlan52: port 1(eth0.52) entered forwarding state
[   28.245863] br-vlan53: port 1(eth0.53) entered blocking state
[   28.251800] br-vlan53: port 1(eth0.53) entered disabled state
[   28.279136] device eth0.53 entered promiscuous mode
[   28.301427] br-vlan53: port 1(eth0.53) entered blocking state
[   28.307344] br-vlan53: port 1(eth0.53) entered forwarding state
[   28.380515] br-vlan54: port 1(eth0.54) entered blocking state
[   28.386433] br-vlan54: port 1(eth0.54) entered disabled state
[   28.392664] device eth0.54 entered promiscuous mode
[   28.437551] br-vlan54: port 1(eth0.54) entered blocking state
[   28.443468] br-vlan54: port 1(eth0.54) entered forwarding state
[   28.513864] br-vlan55: port 1(eth0.55) entered blocking state
[   28.519800] br-vlan55: port 1(eth0.55) entered disabled state
[   28.526032] device eth0.55 entered promiscuous mode
[   28.569576] br-vlan55: port 1(eth0.55) entered blocking state
[   28.575493] br-vlan55: port 1(eth0.55) entered forwarding state
[   28.687513] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   32.057431] br-vlan51: port 2(wlan0) entered blocking state
[   32.063197] br-vlan51: port 2(wlan0) entered disabled state
[   32.069245] device wlan0 entered promiscuous mode
[   33.353669] br-vlan51: port 3(wlan1) entered blocking state
[   33.359414] br-vlan51: port 3(wlan1) entered disabled state
[   33.365491] device wlan1 entered promiscuous mode
[   39.745254] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   39.751996] br-vlan51: port 2(wlan0) entered blocking state
[   39.757709] br-vlan51: port 2(wlan0) entered forwarding state
[   39.774235] br-vlan52: port 2(wlan0-1) entered blocking state
[   39.780160] br-vlan52: port 2(wlan0-1) entered disabled state
[   39.786402] device wlan0-1 entered promiscuous mode
[   39.793405] br-vlan52: port 2(wlan0-1) entered blocking state
[   39.799337] br-vlan52: port 2(wlan0-1) entered forwarding state
[   39.830678] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready
[   39.857069] br-vlan53: port 2(wlan0-2) entered blocking state
[   39.862986] br-vlan53: port 2(wlan0-2) entered disabled state
[   39.869386] device wlan0-2 entered promiscuous mode
[   39.918919] br-vlan53: port 2(wlan0-2) entered blocking state
[   39.924851] br-vlan53: port 2(wlan0-2) entered forwarding state
[   39.953249] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-2: link becomes ready
[   39.974229] br-vlan55: port 2(wlan0-3) entered blocking state
[   39.980145] br-vlan55: port 2(wlan0-3) entered disabled state
[   39.986381] device wlan0-3 entered promiscuous mode
[   39.996889] br-vlan55: port 2(wlan0-3) entered blocking state
[   40.002807] br-vlan55: port 2(wlan0-3) entered forwarding state
[   40.037178] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-3: link becomes ready
[   50.196019] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[   50.202761] br-vlan51: port 3(wlan1) entered blocking state
[   50.208473] br-vlan51: port 3(wlan1) entered forwarding state
[   50.222635] br-vlan52: port 3(wlan1-1) entered blocking state
[   50.228566] br-vlan52: port 3(wlan1-1) entered disabled state
[   50.234820] device wlan1-1 entered promiscuous mode
[   50.244422] br-vlan52: port 3(wlan1-1) entered blocking state
[   50.250354] br-vlan52: port 3(wlan1-1) entered forwarding state
[   50.280107] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-1: link becomes ready
[   50.307895] br-vlan53: port 3(wlan1-2) entered blocking state
[   50.313941] br-vlan53: port 3(wlan1-2) entered disabled state
[   50.320236] device wlan1-2 entered promiscuous mode
[   50.367309] br-vlan53: port 3(wlan1-2) entered blocking state
[   50.373201] br-vlan53: port 3(wlan1-2) entered forwarding state
[   50.403853] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-2: link becomes ready
[   50.425765] br-vlan55: port 3(wlan1-3) entered blocking state
[   50.431686] br-vlan55: port 3(wlan1-3) entered disabled state
[   50.437946] device wlan1-3 entered promiscuous mode
[   50.446301] br-vlan55: port 3(wlan1-3) entered blocking state
[   50.452228] br-vlan55: port 3(wlan1-3) entered forwarding state
[   50.482032] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-3: link becomes ready

TFTP Upgrade with stripped TP-Link c20 v4 firmware
Firmware used: Archer C20(EU)_V4_181213
Strip command:
dd if=Archer_C20v4_EU_0.9.1_4.16_up_boot\[181213-rel63587\].bin of=tp_recovery.bin bs=512 skip=1]

Binwalk output:


DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
82000         0x14050         U-Boot version string, "U-Boot 1.1.3 (Dec 13 2018 - 17:31:31)"
131584        0x20200         LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 3642448 bytes
1441792       0x160000        Squashfs filesystem, little endian, version 4.0, compression:xz, size: 5396940 bytes, 683 inodes, blocksize: 131072 bytes, created: 2018-12-13 09:39:48

Serial Log

[05040B0E][05040B0F][89890000][23233636][00232335]

DU Setting Cal Done



U-Boot 1.1.3 (Sep  8 2020 - 11:43:06)


Board: Ralink APSoC DRAM:  64 MB

relocate_code Pointer at: 83fb8000

gpiomode1 55054404.

gpiomode2 05540554.

gpiomode2 05550555.

flash manufacture id: ef, device id 40 17

find flash: W25Q64BV

============================================ 

Ralink UBoot Version: 5.0.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:Sep  8 2020  Time:11:43:06

============================================ 

icache: sets:512, ways:4, linesz:32 ,total:65536

dcache: sets:256, ways:4, linesz:32 ,total:32768 


 ##### The CPU freq = 580 MHZ #### 

 estimate memory size =64 Mbytes

RESET MT7628 PHY!!!!!!..................................................

starting recovery...

Read MAC Address from Flash



 NetTxPacket = 0x83FE7700 


 KSEG1ADDR(NetTxPacket) = 0xA3FE7700 


 NetLoop,call eth_halt ! 


 NetLoop,call eth_init ! 

Trying Eth0 (10/100-M)


 Waitting for RX_DMA_BUSY status Start... done



 ETH_STATE_ACTIVE!! 

TFTP from server 192.168.0.66; our IP address is 192.168.0.2

Filename 'tp_recovery.bin'.


 TIMEOUT_COUNT=10,Load address: 0x80060000

Loading: *checksum bad

checksum bad

checksum bad

Got ARP REPLY, set server/gtwy eth addr (00:e0:4c:68:14:65)

Got it

#################################checksum bad

################################

	 #################################################################

	 #################################################################

	 #################################################################

	 ############################checksum bad

checksum bad

##checksum bad

checksum bad

###################################

	 ###########checksum bad

######################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 ##########################Got ARP REQUEST, return our IP

#######################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 ############################

done

Bytes transferred = 8126464 (7c0000 hex)

LoadAddr=80060000 NetBootFileXferSize= 007c0000


 Erase flash !!

From 0x20000 length 0x7A0000

..........................................................................................................................


 Copy 0x80080000 to 0x00020000, count 0x7A0000.... 

..........................................................................................................................



[05040B0D][05040B0E][89880000][24233635][00242335]

DU Setting Cal Done



U-Boot 1.1.3 (Sep  8 2020 - 11:43:06)


Board: Ralink APSoC DRAM:  64 MB

relocate_code Pointer at: 83fb8000

******************************

Software System Reset Occurred

******************************

gpiomode1 55054404.

gpiomode2 05540554.

gpiomode2 05550555.

flash manufacture id: ef, device id 40 17

find flash: W25Q64BV

============================================ 

Ralink UBoot Version: 5.0.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:Sep  8 2020  Time:11:43:06

============================================ 

icache: sets:512, ways:4, linesz:32 ,total:65536

dcache: sets:256, ways:4, linesz:32 ,total:32768 


 ##### The CPU freq = 580 MHZ #### 

 estimate memory size =64 Mbytes

RESET MT7628 PHY!!!!!!

continue to starting system.

 0 

disable switch phyport...

   

3: System Boot system code via Flash.(0xbc020000)

do_bootm:argc=2, addr=0xbc020000

## Booting image at bc020000 ...

   Uncompressing Kernel Image ... OK

No initrd

## Transferring control to Linux (at address 80000000) ...

## Giving linux memsize in MB, 64


Starting kernel ...


[    0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 Sun Oct 24 09:01:35 2021
[    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 TP-Link Archer C20 v4
[    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=0007e000
[    0.000000] Readback ErrCtl register=0007e000
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 57444K/65536K available (5088K kernel code, 204K rwdata, 636K rodata, 1228K init, 205K bss, 8092K 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] random: get_random_bytes called from 0x805cda28 with crng_init=0
[    0.000000] CPU Clock: 580MHz
[    0.000000] timer_probe: no matching timers found
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000009] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007571] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[    0.045455] pid_max: default: 32768 minimum: 301
[    0.050093] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.057114] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.070500] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.079927] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.086573] pinctrl core: initialized pinctrl subsystem
[    0.094547] NET: Registered protocol family 16
[    0.203376] mt7620-pci 10140000.pcie: Port 0 N_FTS = 1b105000
[    0.358475] PCI host bridge /pcie@10140000 ranges:
[    0.363052]  MEM 0x0000000020000000..0x000000002fffffff
[    0.368082]   IO 0x0000000010160000..0x000000001016ffff
[    0.395476] PCI host bridge to bus 0000:00
[    0.399457] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.406056] pci_bus 0000:00: root bus resource [io  0x10160000-0x1016ffff]
[    0.412680] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.419229] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.426928] pci 0000:00:00.0: [14c3:0801] type 01 class 0x060400
[    0.432712] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.438732] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    0.444853] pci 0000:00:00.0: supports D1
[    0.448658] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.455807] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.463722] pci 0000:01:00.0: [14c3:7650] type 00 class 0x028000
[    0.469546] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.475691] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.481804] pci 0000:01:00.1: [14c3:8650] type 00 class 0x0d1100
[    0.487621] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.493757] pci 0000:01:00.1: supports D1
[    0.497561] pci 0000:01:00.1: PME# supported from D0 D1 D3hot D3cold
[    0.505279] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.511651] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.518037] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.524387] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.531108] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    0.537659] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.544221] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[    0.550769] pci 0000:01:00.1: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    0.557319] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.562105] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    0.568773] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.583012] clocksource: Switched to clocksource MIPS
[    0.588998] thermal_sys: Registered thermal governor 'step_wise'
[    0.589417] NET: Registered protocol family 2
[    0.599551] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.607428] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.615537] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.622906] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.629702] TCP: Hash tables configured (established 1024 bind 1024)
[    0.635985] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.642314] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.649352] NET: Registered protocol family 1
[    0.653627] PCI: CLS 0 bytes, default 32
[    0.662374] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.676734] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.682370] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.707939] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.718367] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.724076] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.729710] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.735408] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.744330] printk: console [ttyS0] disabled
[    0.748528] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[    0.757252] printk: console [ttyS0] enabled
[    0.757252] printk: console [ttyS0] enabled
[    0.765662] printk: bootconsole [early0] disabled
[    0.765662] printk: bootconsole [early0] disabled
[    0.776542] spi-mt7621 10000b00.spi: sys_freq: 193333333
[    0.800759] spi-nor spi0.0: s25fl064k (8192 Kbytes)
[    0.805794] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.812244] Creating 4 MTD partitions on "spi0.0":
[    0.817118] 0x000000000000-0x000000020000 : "boot"
[    0.823192] 0x000000020000-0x0000007c0000 : "firmware"
[    0.832073] 2 tplink-fw partitions found on MTD device firmware
[    0.838150] Creating 2 MTD partitions on "firmware":
[    0.843208] 0x000000000000-0x0000001e821a : "kernel"
[    0.849367] 0x0000001e821c-0x0000007a0000 : "rootfs"
[    0.855558] mtd: device 3 (rootfs) set to be root filesystem
[    0.863541] 1 squashfs-split partitions found on MTD device rootfs
[    0.869908] 0x0000004e0000-0x0000007a0000 : "rootfs_data"
[    0.876484] 0x0000007c0000-0x0000007d0000 : "config"
[    0.882704] 0x0000007d0000-0x000000800000 : "factory"
[    0.889694] libphy: Fixed MDIO Bus: probed
[    0.907355] rt3050-esw 10110000.esw: link changed 0x00
[    0.914582] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    0.925041] NET: Registered protocol family 10
[    0.934197] Segment Routing with IPv6
[    0.938133] NET: Registered protocol family 17
[    0.942741] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.955897] 8021q: 802.1Q VLAN Support v1.8
[    0.971632] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    0.985729] Freeing unused kernel memory: 1228K
[    0.990352] This architecture does not have kernel memory protection.
[    0.996885] Run /sbin/init as init process
[    1.211010] random: fast init done
[    1.845304] init: Console is alive
[    1.849183] init: - watchdog -
[    2.631187] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.788794] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.806723] init: - preinit -
[    4.530943] random: jshn: uninitialized urandom read (4 bytes read)
[    4.623216] random: jshn: uninitialized urandom read (4 bytes read)
[    4.851724] random: jshn: uninitialized urandom read (4 bytes read)
[    5.433460] rt3050-esw 10110000.esw: link changed 0x00
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    5.627522] urandom_read: 2 callbacks suppressed
[    5.627531] random: procd: uninitialized urandom read (4 bytes read)
[    9.036162] rt3050-esw 10110000.esw: link changed 0x02
[   10.445136] jffs2: notice: (456) jffs2_build_xattr_subsystem: complete building xattr subsystem, 2766 of xdatum (8 unchecked, 2758 orphan) and 2767 of xref (2758 dead, 0 orphan) found.
[   10.464024] mount_root: switching to jffs2 overlay
[   10.598170] overlayfs: upper fs does not support tmpfile.
[   10.611523] urandom-seed: Seeding with /etc/urandom.seed
[   10.759974] procd: - early -
[   10.763558] procd: - watchdog -
[   11.362741] procd: - watchdog -
[   11.367884] procd: - ubus -
[   11.452305] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.460792] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.467955] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.477168] procd: - init -
Please press Enter to activate this console.
[   12.361258] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.507857] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[   12.515621] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[   12.634293] mt76_wmac 10300000.wmac: ASIC revision: 76280001
[   12.816769] urngd: v1.0.2 started.
[   13.023205] random: crng init done
[   13.026661] random: 1 urandom warning(s) missed due to ratelimiting
[   13.677261] mt76_wmac 10300000.wmac: Firmware Version: 20151201
[   13.683357] mt76_wmac 10300000.wmac: Build Time: 20151201183641
[   13.723031] mt76_wmac 10300000.wmac: firmware init done
[   13.978943] mt76x0e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[   13.985557] mt76x0e 0000:01:00.0: ASIC revision: 76100002
[   14.267653] mt76x0e 0000:01:00.0: Firmware Version: 0.1.00
[   14.504053] mt76x0e 0000:01:00.0: EEPROM ver:02 fae:00
[   14.533048] kmodloader: done loading kernel modules from /etc/modules.d/*
[   20.841742] rt3050-esw 10110000.esw: link changed 0x00
[   24.457729] rt3050-esw 10110000.esw: link changed 0x02
[   27.720340] br-lan: port 1(eth0.33) entered blocking state
[   27.725996] br-lan: port 1(eth0.33) entered disabled state
[   27.731962] device eth0.33 entered promiscuous mode
[   27.736970] device eth0 entered promiscuous mode
[   27.762356] br-lan: port 1(eth0.33) entered blocking state
[   27.768010] br-lan: port 1(eth0.33) entered forwarding state
[   27.877710] br-vlan51: port 1(eth0.51) entered blocking state
[   27.883649] br-vlan51: port 1(eth0.51) entered disabled state
[   27.889873] device eth0.51 entered promiscuous mode
[   28.003227] br-vlan51: port 1(eth0.51) entered blocking state
[   28.009102] br-vlan51: port 1(eth0.51) entered forwarding state
[   28.090073] br-vlan52: port 1(eth0.52) entered blocking state
[   28.096009] br-vlan52: port 1(eth0.52) entered disabled state
[   28.115142] device eth0.52 entered promiscuous mode
[   28.140360] br-vlan52: port 1(eth0.52) entered blocking state
[   28.146266] br-vlan52: port 1(eth0.52) entered forwarding state
[   28.268780] br-vlan53: port 1(eth0.53) entered blocking state
[   28.274701] br-vlan53: port 1(eth0.53) entered disabled state
[   28.303183] device eth0.53 entered promiscuous mode
[   28.318318] br-vlan53: port 1(eth0.53) entered blocking state
[   28.324237] br-vlan53: port 1(eth0.53) entered forwarding state
[   28.401645] br-vlan54: port 1(eth0.54) entered blocking state
[   28.407582] br-vlan54: port 1(eth0.54) entered disabled state
[   28.413810] device eth0.54 entered promiscuous mode
[   28.451797] br-vlan54: port 1(eth0.54) entered blocking state
[   28.457707] br-vlan54: port 1(eth0.54) entered forwarding state
[   28.533715] br-vlan55: port 1(eth0.55) entered blocking state
[   28.539651] br-vlan55: port 1(eth0.55) entered disabled state
[   28.545886] device eth0.55 entered promiscuous mode
[   28.580907] br-vlan55: port 1(eth0.55) entered blocking state
[   28.586819] br-vlan55: port 1(eth0.55) entered forwarding state
[   28.719645] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   32.106838] br-vlan51: port 2(wlan0) entered blocking state
[   32.112601] br-vlan51: port 2(wlan0) entered disabled state
[   32.118655] device wlan0 entered promiscuous mode
[   33.386916] br-vlan51: port 3(wlan1) entered blocking state
[   33.392659] br-vlan51: port 3(wlan1) entered disabled state
[   33.398732] device wlan1 entered promiscuous mode
[   39.793246] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   39.799975] br-vlan51: port 2(wlan0) entered blocking state
[   39.805691] br-vlan51: port 2(wlan0) entered forwarding state
[   39.822453] br-vlan52: port 2(wlan0-1) entered blocking state
[   39.828381] br-vlan52: port 2(wlan0-1) entered disabled state
[   39.834620] device wlan0-1 entered promiscuous mode
[   39.841627] br-vlan52: port 2(wlan0-1) entered blocking state
[   39.847550] br-vlan52: port 2(wlan0-1) entered forwarding state
[   39.876435] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready
[   39.904640] br-vlan53: port 2(wlan0-2) entered blocking state
[   39.910686] br-vlan53: port 2(wlan0-2) entered disabled state
[   39.917047] device wlan0-2 entered promiscuous mode
[   39.967774] br-vlan53: port 2(wlan0-2) entered blocking state
[   39.973681] br-vlan53: port 2(wlan0-2) entered forwarding state
[   40.004952] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-2: link becomes ready
[   40.027109] br-vlan55: port 2(wlan0-3) entered blocking state
[   40.032960] br-vlan55: port 2(wlan0-3) entered disabled state
[   40.039208] device wlan0-3 entered promiscuous mode
[   40.047843] br-vlan55: port 2(wlan0-3) entered blocking state
[   40.053750] br-vlan55: port 2(wlan0-3) entered forwarding state
[   40.085486] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-3: link becomes ready
[   50.244067] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[   50.250809] br-vlan51: port 3(wlan1) entered blocking state
[   50.256520] br-vlan51: port 3(wlan1) entered forwarding state
[   50.270924] br-vlan52: port 3(wlan1-1) entered blocking state
[   50.276852] br-vlan52: port 3(wlan1-1) entered disabled state
[   50.283162] device wlan1-1 entered promiscuous mode
[   50.296728] br-vlan52: port 3(wlan1-1) entered blocking state
[   50.302638] br-vlan52: port 3(wlan1-1) entered forwarding state
[   50.328550] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-1: link becomes ready
[   50.354225] br-vlan53: port 3(wlan1-2) entered blocking state
[   50.360175] br-vlan53: port 3(wlan1-2) entered disabled state
[   50.366668] device wlan1-2 entered promiscuous mode
[   50.373988] br-vlan53: port 3(wlan1-2) entered blocking state
[   50.379911] br-vlan53: port 3(wlan1-2) entered forwarding state
[   50.429673] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-2: link becomes ready
[   50.453491] br-vlan55: port 3(wlan1-3) entered blocking state
[   50.459436] br-vlan55: port 3(wlan1-3) entered disabled state
[   50.465811] device wlan1-3 entered promiscuous mode
[   50.476719] br-vlan55: port 3(wlan1-3) entered blocking state
[   50.482631] br-vlan55: port 3(wlan1-3) entered forwarding state
[   50.512144] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-3: link becomes ready

Serial/TFTP Upgrade with OpenWrt
Command:
tftp 0x80060000 tp_recovery.bin;erase tplink 0x20000 0x7a0000;cp.b 0x80080000 0x20000 0x7a0000
Firmware used: openwrt-22.03.2-ramips-mt76x8-tplink_archer-c20-v4-squashfs-tftp-recovery.bin
Serial Log


root@URT-AP-PVEND:/# reboot
[05040B0D][05040B0E][89880000][23233635][00232335]

DU Setting Cal Done



U-Boot 1.1.3 (Sep  8 2020 - 11:43:06)


Board: Ralink APSoC DRAM:  64 MB

relocate_code Pointer at: 83fb8000

******************************

Software System Reset Occurred

******************************

gpiomode1 55054404.

gpiomode2 05540554.

gpiomode2 05550555.

flash manufacture id: ef, device id 40 17

find flash: W25Q64BV

============================================ 

Ralink UBoot Version: 5.0.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:Sep  8 2020  Time:11:43:06

============================================ 

icache: sets:512, ways:4, linesz:32 ,total:65536

dcache: sets:256, ways:4, linesz:32 ,total:32768 


 ##### The CPU freq = 580 MHZ #### 

 estimate memory size =64 Mbytes

RESET MT7628 PHY!!!!!! 0 

Read MAC Address from Flash


   

4: System Enter Boot Command Line Interface.


U-Boot 1.1.3 (Sep  8 2020 - 11:43:06)

MT7628 # 4 tftp 0x80060000 tp_recovery.bin;erase tplink 0x20000 0x7a0000;cp.b 0x80080000 0x20000 0x7a0000


 NetTxPacket = 0x83FE7700 


 KSEG1ADDR(NetTxPacket) = 0xA3FE7700 


 NetLoop,call eth_halt ! 


 NetLoop,call eth_init ! 

Trying Eth0 (10/100-M)


 Waitting for RX_DMA_BUSY status Start... done



 ETH_STATE_ACTIVE!! 

TFTP from server 192.168.0.225; our IP address is 192.168.0.2

Filename 'tp_recovery.bin'.


 TIMEOUT_COUNT=10,Load address: 0x80060000

Loading: *checksum bad

checksum bad

checksum bad

checksum bad

checksum bad

checksum bad

checksum bad

checksum bad

checksum bad

checksum bad

checksum bad

checksum bad

checksum bad

checksum bad

Got ARP REPLY, set server/gtwy eth addr (00:e0:4c:68:14:65)

Got it

#################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 ###############Got ARP REQUEST, return our IP

##################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 #################################################################

	 ############################

done

Bytes transferred = 8126464 (7c0000 hex)

LoadAddr=80060000 NetBootFileXferSize= 007c0000


 Erase flash !!

From 0x20000 length 0x7A0000

..........................................................................................................................


 Copy 0x80080000 to 0x00020000, count 0x7A0000.... 

..........................................................................................................................

MT7628 # reset



[05040B0D][05040B0E][89880000][23223534][00232234]

DU Setting Cal Done



U-Boot 1.1.3 (Sep  8 2020 - 11:43:06)


Board: Ralink APSoC DRAM:  64 MB

relocate_code Pointer at: 83fb8000

******************************

Software System Reset Occurred

******************************

gpiomode1 55054404.

gpiomode2 05540554.

gpiomode2 05550555.

flash manufacture id: ef, device id 40 17

find flash: W25Q64BV

============================================ 

Ralink UBoot Version: 5.0.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:Sep  8 2020  Time:11:43:06

============================================ 

icache: sets:512, ways:4, linesz:32 ,total:65536

dcache: sets:256, ways:4, linesz:32 ,total:32768 


 ##### The CPU freq = 580 MHZ #### 

 estimate memory size =64 Mbytes

RESET MT7628 PHY!!!!!!

continue to starting system.

 0 

disable switch phyport...

   

3: System Boot system code via Flash.(0xbc020000)

do_bootm:argc=2, addr=0xbc020000

## Booting image at bc020000 ...

   Uncompressing Kernel Image ... OK

No initrd

## Transferring control to Linux (at address 80000000) ...

## Giving linux memsize in MB, 64


Starting kernel ...


[    0.000000] Linux version 5.4.154 (builder@buildhost) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r16325-88151b8303)) #0 Sun Oct 24 09:01:35 2021
[    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 TP-Link Archer C20 v4
[    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=0007e00f
[    0.000000] Readback ErrCtl register=0007e00f
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 57444K/65536K available (5088K kernel code, 204K rwdata, 636K rodata, 1228K init, 205K bss, 8092K 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] random: get_random_bytes called from 0x805cda28 with crng_init=0
[    0.000000] CPU Clock: 580MHz
[    0.000000] timer_probe: no matching timers found
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000009] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007571] Calibrating delay loop... 385.02 BogoMIPS (lpj=770048)
[    0.045455] pid_max: default: 32768 minimum: 301
[    0.050093] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.057114] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.070500] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.079927] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.086573] pinctrl core: initialized pinctrl subsystem
[    0.094547] NET: Registered protocol family 16
[    0.203376] mt7620-pci 10140000.pcie: Port 0 N_FTS = 1b105000
[    0.358476] PCI host bridge /pcie@10140000 ranges:
[    0.363052]  MEM 0x0000000020000000..0x000000002fffffff
[    0.368082]   IO 0x0000000010160000..0x000000001016ffff
[    0.395476] PCI host bridge to bus 0000:00
[    0.399457] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.406056] pci_bus 0000:00: root bus resource [io  0x10160000-0x1016ffff]
[    0.412680] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.419229] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.426928] pci 0000:00:00.0: [14c3:0801] type 01 class 0x060400
[    0.432712] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    0.438732] pci 0000:00:00.0: reg 0x14: [mem 0x20200000-0x2020ffff]
[    0.444849] pci 0000:00:00.0: supports D1
[    0.448653] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    0.455978] pci 0000:01:00.0: [14c3:7650] type 00 class 0x028000
[    0.461815] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.467959] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    0.474071] pci 0000:01:00.1: [14c3:8650] type 00 class 0x0d1100
[    0.479889] pci 0000:01:00.1: reg 0x10: [mem 0x00000000-0x000fffff]
[    0.486025] pci 0000:01:00.1: supports D1
[    0.489829] pci 0000:01:00.1: PME# supported from D0 D1 D3hot D3cold
[    0.497546] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.503918] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    0.510304] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.516655] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.523375] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    0.529927] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.536487] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff]
[    0.543036] pci 0000:01:00.1: BAR 0: assigned [mem 0x20100000-0x201fffff]
[    0.549586] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.554373] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    0.561040] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
[    0.575281] clocksource: Switched to clocksource MIPS
[    0.581268] thermal_sys: Registered thermal governor 'step_wise'
[    0.581687] NET: Registered protocol family 2
[    0.591820] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.599697] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.607805] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.615175] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.621971] TCP: Hash tables configured (established 1024 bind 1024)
[    0.628251] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.634581] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.641618] NET: Registered protocol family 1
[    0.645893] PCI: CLS 0 bytes, default 32
[    0.654637] workingset: timestamp_bits=14 max_order=14 bucket_order=0
[    0.668996] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.674631] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.700195] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.710625] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.716331] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.721963] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.727664] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.736588] printk: console [ttyS0] disabled
[    0.740785] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[    0.749510] printk: console [ttyS0] enabled
[    0.749510] printk: console [ttyS0] enabled
[    0.757920] printk: bootconsole [early0] disabled
[    0.757920] printk: bootconsole [early0] disabled
[    0.768803] spi-mt7621 10000b00.spi: sys_freq: 193333333
[    0.793023] spi-nor spi0.0: s25fl064k (8192 Kbytes)
[    0.798058] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.804508] Creating 4 MTD partitions on "spi0.0":
[    0.809382] 0x000000000000-0x000000020000 : "boot"
[    0.815458] 0x000000020000-0x0000007c0000 : "firmware"
[    0.824338] 2 tplink-fw partitions found on MTD device firmware
[    0.830416] Creating 2 MTD partitions on "firmware":
[    0.835473] 0x000000000000-0x0000001e821a : "kernel"
[    0.841633] 0x0000001e821c-0x0000007a0000 : "rootfs"
[    0.847824] mtd: device 3 (rootfs) set to be root filesystem
[    0.855811] 1 squashfs-split partitions found on MTD device rootfs
[    0.862178] 0x0000004e0000-0x0000007a0000 : "rootfs_data"
[    0.868756] 0x0000007c0000-0x0000007d0000 : "config"
[    0.874978] 0x0000007d0000-0x000000800000 : "factory"
[    0.881968] libphy: Fixed MDIO Bus: probed
[    0.899535] rt3050-esw 10110000.esw: link changed 0x00
[    0.906759] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    0.917226] NET: Registered protocol family 10
[    0.926382] Segment Routing with IPv6
[    0.930318] NET: Registered protocol family 17
[    0.934927] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.948082] 8021q: 802.1Q VLAN Support v1.8
[    0.963813] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    0.977918] Freeing unused kernel memory: 1228K
[    0.982542] This architecture does not have kernel memory protection.
[    0.989074] Run /sbin/init as init process
[    1.203280] random: fast init done
[    1.837555] init: Console is alive
[    1.841433] init: - watchdog -
[    2.623467] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.781097] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.799031] init: - preinit -
[    4.524438] random: jshn: uninitialized urandom read (4 bytes read)
[    4.616799] random: jshn: uninitialized urandom read (4 bytes read)
[    4.845140] random: jshn: uninitialized urandom read (4 bytes read)
[    5.425498] rt3050-esw 10110000.esw: link changed 0x00
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    5.619777] urandom_read: 2 callbacks suppressed
[    5.619786] random: procd: uninitialized urandom read (4 bytes read)
[    8.913728] rt3050-esw 10110000.esw: link changed 0x02
[   10.437595] jffs2: notice: (456) jffs2_build_xattr_subsystem: complete building xattr subsystem, 2766 of xdatum (8 unchecked, 2758 orphan) and 2767 of xref (2758 dead, 0 orphan) found.
[   10.456475] mount_root: switching to jffs2 overlay
[   10.591494] overlayfs: upper fs does not support tmpfile.
[   10.605037] urandom-seed: Seeding with /etc/urandom.seed
[   10.753091] procd: - early -
[   10.756749] procd: - watchdog -
[   11.355445] procd: - watchdog -
[   11.360550] procd: - ubus -
[   11.444968] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.453434] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.460588] random: ubusd: uninitialized urandom read (4 bytes read)
[   11.469760] procd: - init -
Please press Enter to activate this console.
[   12.348189] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.496126] Loading modules backported from Linux version v5.10.68-0-g4d8524048a35
[   12.503892] Backport generated by backports.git v5.10.68-1-0-ga4f9ba32
[   12.619205] mt76_wmac 10300000.wmac: ASIC revision: 76280001
[   12.808848] urngd: v1.0.2 started.
[   13.012054] random: crng init done
[   13.015546] random: 1 urandom warning(s) missed due to ratelimiting
[   13.661506] mt76_wmac 10300000.wmac: Firmware Version: 20151201
[   13.667599] mt76_wmac 10300000.wmac: Build Time: 20151201183641
[   13.707298] mt76_wmac 10300000.wmac: firmware init done
[   13.965587] mt76x0e 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[   13.972200] mt76x0e 0000:01:00.0: ASIC revision: 76100002
[   14.251941] mt76x0e 0000:01:00.0: Firmware Version: 0.1.00
[   14.488319] mt76x0e 0000:01:00.0: EEPROM ver:02 fae:00
[   14.517314] kmodloader: done loading kernel modules from /etc/modules.d/*
[   20.801537] rt3050-esw 10110000.esw: link changed 0x00
[   24.335593] rt3050-esw 10110000.esw: link changed 0x02
[   27.692776] br-lan: port 1(eth0.33) entered blocking state
[   27.698446] br-lan: port 1(eth0.33) entered disabled state
[   27.704402] device eth0.33 entered promiscuous mode
[   27.709408] device eth0 entered promiscuous mode
[   27.740488] br-lan: port 1(eth0.33) entered blocking state
[   27.746133] br-lan: port 1(eth0.33) entered forwarding state
[   27.862157] br-vlan51: port 1(eth0.51) entered blocking state
[   27.868192] br-vlan51: port 1(eth0.51) entered disabled state
[   27.874434] device eth0.51 entered promiscuous mode
[   27.995549] br-vlan51: port 1(eth0.51) entered blocking state
[   28.001430] br-vlan51: port 1(eth0.51) entered forwarding state
[   28.074032] br-vlan52: port 1(eth0.52) entered blocking state
[   28.079968] br-vlan52: port 1(eth0.52) entered disabled state
[   28.119404] device eth0.52 entered promiscuous mode
[   28.151234] br-vlan52: port 1(eth0.52) entered blocking state
[   28.157145] br-vlan52: port 1(eth0.52) entered forwarding state
[   28.251056] br-vlan53: port 1(eth0.53) entered blocking state
[   28.256995] br-vlan53: port 1(eth0.53) entered disabled state
[   28.297297] device eth0.53 entered promiscuous mode
[   28.310675] br-vlan53: port 1(eth0.53) entered blocking state
[   28.316595] br-vlan53: port 1(eth0.53) entered forwarding state
[   28.388225] br-vlan54: port 1(eth0.54) entered blocking state
[   28.394141] br-vlan54: port 1(eth0.54) entered disabled state
[   28.400375] device eth0.54 entered promiscuous mode
[   28.446084] br-vlan54: port 1(eth0.54) entered blocking state
[   28.452005] br-vlan54: port 1(eth0.54) entered forwarding state
[   28.518016] br-vlan55: port 1(eth0.55) entered blocking state
[   28.523938] br-vlan55: port 1(eth0.55) entered disabled state
[   28.530174] device eth0.55 entered promiscuous mode
[   28.580641] br-vlan55: port 1(eth0.55) entered blocking state
[   28.586552] br-vlan55: port 1(eth0.55) entered forwarding state
[   28.683794] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   32.052461] br-vlan51: port 2(wlan0) entered blocking state
[   32.058200] br-vlan51: port 2(wlan0) entered disabled state
[   32.064252] device wlan0 entered promiscuous mode
[   33.349922] br-vlan51: port 3(wlan1) entered blocking state
[   33.355665] br-vlan51: port 3(wlan1) entered disabled state
[   33.361738] device wlan1 entered promiscuous mode
[   39.720362] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   39.727082] br-vlan51: port 2(wlan0) entered blocking state
[   39.732797] br-vlan51: port 2(wlan0) entered forwarding state
[   39.747234] br-vlan52: port 2(wlan0-1) entered blocking state
[   39.753157] br-vlan52: port 2(wlan0-1) entered disabled state
[   39.759445] device wlan0-1 entered promiscuous mode
[   39.773092] br-vlan52: port 2(wlan0-1) entered blocking state
[   39.779001] br-vlan52: port 2(wlan0-1) entered forwarding state
[   39.804909] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-1: link becomes ready
[   39.831904] br-vlan53: port 2(wlan0-2) entered blocking state
[   39.837813] br-vlan53: port 2(wlan0-2) entered disabled state
[   39.844172] device wlan0-2 entered promiscuous mode
[   39.891758] br-vlan53: port 2(wlan0-2) entered blocking state
[   39.897654] br-vlan53: port 2(wlan0-2) entered forwarding state
[   39.927540] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-2: link becomes ready
[   39.949784] br-vlan55: port 2(wlan0-3) entered blocking state
[   39.955830] br-vlan55: port 2(wlan0-3) entered disabled state
[   39.962110] device wlan0-3 entered promiscuous mode
[   39.971180] br-vlan55: port 2(wlan0-3) entered blocking state
[   39.977093] br-vlan55: port 2(wlan0-3) entered forwarding state
[   40.003618] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0-3: link becomes ready
[   50.196264] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
[   50.203033] br-vlan51: port 3(wlan1) entered blocking state
[   50.208747] br-vlan51: port 3(wlan1) entered forwarding state
[   50.223192] br-vlan52: port 3(wlan1-1) entered blocking state
[   50.229123] br-vlan52: port 3(wlan1-1) entered disabled state
[   50.235405] device wlan1-1 entered promiscuous mode
[   50.244925] br-vlan52: port 3(wlan1-1) entered blocking state
[   50.250857] br-vlan52: port 3(wlan1-1) entered forwarding state
[   50.281484] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-1: link becomes ready
[   50.305188] br-vlan53: port 3(wlan1-2) entered blocking state
[   50.311107] br-vlan53: port 3(wlan1-2) entered disabled state
[   50.317496] device wlan1-2 entered promiscuous mode
[   50.369356] br-vlan53: port 3(wlan1-2) entered blocking state
[   50.375288] br-vlan53: port 3(wlan1-2) entered forwarding state
[   50.405418] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-2: link becomes ready
[   50.426839] br-vlan55: port 3(wlan1-3) entered blocking state
[   50.432760] br-vlan55: port 3(wlan1-3) entered disabled state
[   50.439023] device wlan1-3 entered promiscuous mode
[   50.446227] br-vlan55: port 3(wlan1-3) entered blocking state
[   50.452164] br-vlan55: port 3(wlan1-3) entered forwarding state
[   50.479994] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1-3: link becomes ready

MTD Upgrade with TP-Link c20 v4 firmware
Firmware used: Archer C20(EU)_V4_181213
Console Log

root@URT-AP-PVEND:~# mtd -r write /tmp/Archer_C20v4.bin firmware
Unlocking firmware ...

Writing from /tmp/Archer_C20v4.bin to firmware ...  [e]Failed to erase block