Xiaomi 4a R4ACV2 new version / bricked

Hi everyone
first a thanks to everyone who has participated in getting the 4a's (gig and 100) to work. They are great value and it is a joy to use safe/open software on them. I got about 10 of either working, it's great

In my latest order of 4a, there were some V2 of the 100m international version.
In fact i did not see that in time, the thing just bricked, but i saw it registers as MiWiFi-R4ACv2 on the dhcp. I checked onother V2, and uname does include the V2 version string.
After the brick i checked others and they register as MiWiFi-R4AC and also have that same string in uname -a

So i am wondering

  • did anyone else come across the V2 version and if so is there build
  • how can i get more information now that i have brick ( i am trying the debricking tomorrow)
  • if i do manage to debrick, how can i find pertinent info in the cmdline

I am not a hardware person, but happy to crack the thing open and take pictures. Or run commands on another hacked V2 device. I've seen talk of sku, but am not sure where to find that. But i can run commands on the device and post them.

Thanks for any help,
Torsten

That's probably where you should start. Take pictures in a bright environment, like e.g. outdoors, but try to avoid lens glare and e.g. the sun shining from any of the metal parts, and if you have trouble keeping the camera steady, use e.g. a cardboard box or something to support your hands so as to avoid blurry pictures. Try to cover every single portion of the PCB and take multiple pictures of slightly different angles if needed.

Thanks @WereCatf , i can do that, but it is a VERY similar. I mean it says 4a on the box n'all. Anything in specific you would be looking for?

But i can get in with the Invasion script, and since the "original" firmware is a cut OpenWrt, i can find out things in there. Like now i got the mtd

root@XiaoQiang:~# cat /proc/mtd
dev: size erasesize name
mtd0: 01000000 00010000 "ALL"
mtd1: 00020000 00010000 "Bootloader"
mtd2: 00010000 00010000 "NULL"
mtd3: 00010000 00010000 "Factory"
mtd4: 00010000 00010000 "crash"
mtd5: 00010000 00010000 "cfg_bak"
mtd6: 00100000 00010000 "overlay"
mtd7: 00c60000 00010000 "OS1"
mtd8: 00b00000 00010000 "rootfs"
mtd9: 00230000 00010000 "disk"
mtd10: 00010000 00010000 "Config"

Which is clearly different from the 4a version 1 (i'm just going to call it that, since now we have v2)
I will set up my compile environment, if you know how these changes relate to the menu?

I'll add the /proc/cpuinfo , but that is as much as i have read up on. Don't know how to find the wlan soc info i've read about.

root@XiaoQiang:~# cat /proc/cpuinfo
system type : MT7628
machine : Unknown
processor : 0
cpu model : MIPS 24KEc V5.5
BogoMIPS : 380.92
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa : mips1 mips2 mips32r1 mips32r2
ASEs implemented : mips16 dsp
shadow register sets : 1
kscratch registers : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available

Ok, pictures as good as my fairphone lets me (not super, but i can always take more if i would know what i am looking for)




First MediaTek is a bit small for the camera, says MT7613BEN 2246...
Second Mediatek chip was hidden under the metal shielding, says MT7628DAN 2252...

I don't doubt that it is very similar. The whole point is whether it is identical or not. If I had to guess, there's probably no meaningful difference on the PCB other than perhaps the SPI flash being used, but still, I'd want to know.

I can take a look at the partition layout later, but I am just going to bed. I also don't have either the v1 or v2 myself, so I can't try anything myself -- I do accept donations, though, since we're talking about very cheap hardware.

Looking at the big picture you took, there's the 8-pin SPI flash in the top-right corner next to the unpopulated 4-pin header. Try to get a picture of that as well. Can't see the markings on it in the big picture.

Please, also post full output of dmesg.

With that, it should be easy enough to squeeze out a firmware image for this new version.

Ok, that is too small for camera, having difficulty with a magnifying glass. Best i see is
Gigadevice 25Q128ESIG C012605 PH2216

I found the add new device page and was going to run al those commands and post the result.
Also got the compilation set up, so a .config file would do me? Though i didn't see anything in the options about boot layout (which i have yet to understand), so maybe a diff?

No, the device requires setting up a proper ramips target with custom DTS to get the partition layout correct. That's why I asked for the dmesg - output. I have already everything else set up, just need to know the physical layout.

Ok, got the dmsg.

root@XiaoQiang:~# dmesg
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.10.14 (jenkins@52a62045742f) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 MiWiFi-R4ACv2-3.0.129 Wed Sep 14 13:29:54 UTC 2022
[    0.000000]
[    0.000000]  The CPU feqenuce set to 575 MHz
[    0.000000]
[    0.000000]  MIPS CPU sleep mode enabled.
[    0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[    0.000000] Software DMA cache coherency
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x03ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x03ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 803e3d90, node_mem_map 81000000
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] Primary instruction cache 64kB, 4-way, VIPT, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS1,115200n8 uart_en=0 factory_mode=0 mem=64m root=/dev/mtdblock8
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00060e0d
[    0.000000] Readback ErrCtl register=00060e0d
[    0.000000] allocated 131072 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] Memory: 60416k/65536k available (3241k kernel code, 5120k reserved, 744k data, 236k init, 0k highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:128
[    0.000000] console [ttyS1] enabled
[    0.120000] Calibrating delay loop... 380.92 BogoMIPS (lpj=1904640)
[    0.180000] pid_max: default: 32768 minimum: 301
[    0.180000] Mount-cache hash table entries: 512
[    0.190000] Initializing cgroup subsys memory
[    0.190000] Initializing cgroup subsys net_cls
[    0.200000] NET: Registered protocol family 16
[    0.200000] RALINK_GPIOMODE = 54054404
[    0.210000] RALINK_GPIOMODE = 54044404
[    0.310000] ***** Xtal 25MHz *****
[    0.310000] start PCIe register access
[    0.810000] RALINK_RSTCTRL = 2400000
[    0.820000] RALINK_CLKCFG1 = fdbfffc0
[    0.820000]
[    0.820000] *************** MT7628 PCIe RC mode *************
[    1.320000] PCIE0 enabled
[    1.320000] Port 0 N_FTS = 1b105000
[    1.330000] init_rt2880pci done
[    1.350000] bio: create slab <bio-0> at 0
[    1.360000] PCI host bridge to bus 0000:00
[    1.360000] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    1.370000] pci_bus 0000:00: root bus resource [io  0x10160000-0x1016ffff]
[    1.370000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    1.380000] pci 0000:00:00.0: [14c3:0801] type 01 class 0x060400
[    1.380000] pci 0000:00:00.0: reg 10: [mem 0x00000000-0x7fffffff]
[    1.380000] pci 0000:00:00.0: reg 14: [mem 0x00000000-0x0000ffff]
[    1.380000] pci 0000:00:00.0: supports D1
[    1.380000] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    1.380000] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.380000] pci 0000:01:00.0: [14c3:7663] type 00 class 0x000280
[    1.380000] pci 0000:01:00.0: reg 10: [mem 0x00000000-0x000fffff 64bit pref]
[    1.380000] pci 0000:01:00.0: reg 18: [mem 0x00000000-0x00003fff 64bit pref]
[    1.380000] pci 0000:01:00.0: reg 20: [mem 0x00000000-0x00000fff 64bit pref]
[    1.380000] pci 0000:01:00.0: supports D1 D2
[    1.380000] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.380000] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.380000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 01
[    1.380000] pci 0000:00:00.0: BAR 0: can't assign mem (size 0x80000000)
[    1.390000] pci 0000:00:00.0: BAR 9: assigned [mem 0x20000000-0x201fffff pref]
[    1.390000] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    1.400000] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit pref]
[    1.400000] pci 0000:01:00.0: BAR 2: assigned [mem 0x20100000-0x20103fff 64bit pref]
[    1.410000] pci 0000:01:00.0: BAR 4: assigned [mem 0x20104000-0x20104fff 64bit pref]
[    1.410000] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.420000] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff pref]
[    1.420000] BAR0 at slot 0 = 0
[    1.430000] bus=0x0, slot = 0x0
[    1.430000] res[0]->start = 0
[    1.430000] res[0]->end = 0
[    1.430000] res[1]->start = 20200000
[    1.440000] res[1]->end = 2020ffff
[    1.440000] res[2]->start = 0
[    1.440000] res[2]->end = 0
[    1.440000] res[3]->start = 0
[    1.450000] res[3]->end = 0
[    1.450000] res[4]->start = 0
[    1.450000] res[4]->end = 0
[    1.450000] res[5]->start = 0
[    1.460000] res[5]->end = 0
[    1.460000] bus=0x1, slot = 0x0
[    1.460000] res[0]->start = 20000000
[    1.460000] res[0]->end = 200fffff
[    1.470000] res[1]->start = 0
[    1.470000] res[1]->end = 0
[    1.470000] res[2]->start = 20100000
[    1.470000] res[2]->end = 20103fff
[    1.480000] res[3]->start = 0
[    1.480000] res[3]->end = 0
[    1.480000] res[4]->start = 20104000
[    1.480000] res[4]->end = 20104fff
[    1.490000] res[5]->start = 0
[    1.490000] res[5]->end = 0
[    1.490000] cfg80211: Calling CRDA to update world regulatory domain
[    1.500000] Switching to clocksource Ralink Systick timer
[    1.500000] NET: Registered protocol family 2
[    1.510000] TCP established hash table entries: 512 (order: 0, 4096 bytes)
[    1.510000] TCP bind hash table entries: 512 (order: -1, 2048 bytes)
[    1.520000] TCP: Hash tables configured (established 512 bind 512)
[    1.520000] TCP: reno registered
[    1.530000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.530000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.540000] NET: Registered protocol family 1
[    1.560000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    1.560000] jffs2: version 2.2. (ZLIB) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    1.570000] msgmni has been set to 118
[    1.580000] io scheduler noop registered
[    1.580000] io scheduler deadline registered (default)
[    1.590000] MIWIFI panic notifier registered
[    1.590000] pcieport 0000:00:00.0: device [14c3:0801] has invalid IRQ; check vendor BIOS
[    1.610000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    1.610000] serial8250: ttyS0 at MMIO 0x10000d00 (irq = 21) is a 16550A
[    1.620000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    1.630000] led=44, on=4000, off=1, blinks,=1, reset=1, time=4000
[    1.630000] Ralink gpio driver initialized
[    1.640000] flash manufacture id: c8, device id 40 18
[    1.640000] GD25Q128C(c8 40180000) (16384 Kbytes)
[    1.650000] mtd .name = raspi, .size = 0x01000000 (16M) .erasesize = 0x00010000 (64K) .numeraseregions = 0
[    1.660000] Creating 10 MTD partitions on "raspi":
[    1.660000] 0x000000000000-0x000001000000 : "ALL"
[    1.670000] 0x000000000000-0x000000020000 : "Bootloader"
[    1.680000] 0x000000020000-0x000000030000 : "NULL"
[    1.680000] 0x000000030000-0x000000040000 : "Factory"
[    1.690000] 0x000000040000-0x000000050000 : "crash"
[    1.700000] 0x000000050000-0x000000060000 : "cfg_bak"
[    1.700000] 0x000000060000-0x000000160000 : "overlay"
[    1.710000] 0x000000160000-0x000000dc0000 : "OS1"
[    1.720000] mtd: try split OS1 partition
[    1.720000] mtd: split_firmware
[    1.720000] mtd: firmware_partition->size   0xc60000
[    1.730000] mtd: firmware_partition->offset 0x160000
[    1.730000] mtd: uimage_len 1436254
[    1.740000] mtd: uimage_len 1441792
[    1.740000] mtd: rootfs_partition->size   0xb00000
[    1.750000] mtd: rootfs_partition->offset 0x2c0000
[    1.750000] mtd: partition "rootfs" created automatically, ofs=2C0000, len=B00000
[    1.760000] 0x0000002c0000-0x000000dc0000 : "rootfs"
[    1.770000] 0x000000dc0000-0x000000ff0000 : "disk"
[    1.770000] 0x000000ff0000-0x000001000000 : "Config"
[    1.780000] PPP generic driver version 2.4.2
[    1.780000] PPP MPPE Compression module registered
[    1.790000] NET: Registered protocol family 24
[    1.790000] PPTP driver version 0.8.5
[    1.800000] GMAC1_MAC_ADRH -- : 0x000044df
[    1.800000] GMAC1_MAC_ADRL -- : 0x65659994
[    1.810000] Ralink APSoC Ethernet Driver Initilization. v3.1  256 rx/tx descriptors allocated, mtu = 1500!
[    1.820000] GMAC1_MAC_ADRH -- : 0x000044df
[    1.820000] GMAC1_MAC_ADRL -- : 0x65659994
[    1.820000] PROC INIT OK!
[    1.830000] Ralink APSoC Hardware Watchdog Timer
[    1.830000] u32 classifier
[    1.840000] Netfilter messages via NETLINK v0.30.
[    1.840000] nfnl_acct: registering with nfnetlink.
[    1.840000] nf_conntrack version 0.5.0 (944 buckets, 3776 max)
[    1.850000] ipip: IPv4 over IPv4 tunneling driver
[    1.860000] gre: GRE over IPv4 demultiplexor driver
[    1.860000] ip_gre: GRE over IPv4 tunneling driver
[    1.870000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    1.880000] Type=Restricted Cone
[    1.880000] TCP: cubic registered
[    1.880000] NET: Registered protocol family 10
[    1.890000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    1.900000] NET: Registered protocol family 17
[    1.900000] l2tp_core: L2TP core driver, V2.0
[    1.910000] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[    1.910000] l2tp_netlink: L2TP netlink interface
[    1.920000] 8021q: 802.1Q VLAN Support v1.8
[    1.940000] VFS: Mounted root (squashfs filesystem) readonly on device 31:8.
[    1.950000] Freeing unused kernel memory: 236K (803e5000 - 80420000)
[    3.750000] Raeth v3.1 (Tasklet,SkbRecycle)
[    3.750000]
[    3.750000] phy_tx_ring = 0x03f9f000, tx_ring = 0xa3f9f000
[    3.760000]
[    3.760000] phy_rx_ring0 = 0x03fb0000, rx_ring0 = 0xa3fb0000
[    3.780000] config 7628 esw as WLLLL
[    3.860000] GMAC1_MAC_ADRH -- : 0x000044df
[    3.860000] GMAC1_MAC_ADRL -- : 0x65659994
[    3.870000]  Link Status Changed: Port 6 linked Up.
[    5.340000] ra2880stop()...Done
[    5.340000] Free TX/RX Ring Memory!
[    5.710000] MIWIFI crash syslog initialize skiped! Code=1
[    7.460000] xt_time: kernel timezone is +0800
[    7.500000] ip_set: protocol 6
[    7.540000] ipaccount: ifname [lo] event[5]
[    7.550000] ipaccount: ifname [eth0] event[5]
[    7.550000] ipaccount: ifname [tunl0] event[5]
[    7.560000] ipaccount: ifname [gre0] event[5]
[    7.560000] ipaccount: ifname [gretap0] event[5]
[    8.710000]
[    8.710000]
[    8.710000] === pAd = c0596000, size = 1763448 ===
[    8.710000]
[    8.720000] <-- RTMPAllocTxRxRingMemory, Status=0, ErrorValue=0x
[    8.730000] <-- RTMPAllocAdapterBlock, Status=0
[    8.730000] RtmpChipOpsHook(492): Not support for HIF_MT yet!
[    8.740000] mt7628_init()-->
[    8.740000] mt7628_init(FW(8a00), HW(8a01), CHIPID(7628))
[    8.750000] e2.bin mt7628_init(1120)::(2), pChipCap->fw_len(63984)
[    8.750000] mt_bcn_buf_init(218): Not support for HIF_MT yet!
[    8.760000] <--mt7628_init()
[    8.760000] ipaccount: ifname [wl1] event[16]
[    8.770000] ipaccount: ifname [wl1] event[5]
[   11.960000]
[   11.960000]
[   11.960000] === pAd = c1301000, size = 3540000 ===
[   11.960000]
[   11.970000] <-- RTMPAllocAdapterBlock, Status=0
[   11.970000] RTMPInitPCIeDevice():device_id=0x7663
[   11.980000] mt_pci_chip_cfg(): HWVer=0x8a10, FWVer=0x8a01, pAd->ChipID=0x7663
[   11.990000] mt7663_init()-->
[   11.990000] <--mt7663_init()
[   11.990000] <-- RTMPAllocTxRxRingMemory, Status=0
[   12.000000] ipaccount: ifname [wl0] event[16]
[   12.000000] ipaccount: ifname [wl0] event[5]
[   17.780000] ipaccount: ifname [br-lan] event[16]
[   17.780000] ipaccount: ifname [br-lan] event[5]
[   17.790000] ipaccount: ifname [eth0] event[13]
[   17.790000] Raeth v3.1 (Tasklet,SkbRecycle)
[   17.800000]
[   17.800000] phy_tx_ring = 0x03f6f000, tx_ring = 0xa3f6f000
[   17.810000]
[   17.810000] phy_rx_ring0 = 0x029de000, rx_ring0 = 0xa29de000
[   17.830000] config 7628 esw as WLLLL
[   17.900000] GMAC1_MAC_ADRH -- : 0x000044df
[   17.910000] GMAC1_MAC_ADRL -- : 0x65659994
[   17.910000] ipaccount: ifname [eth0] event[1]
[   17.940000] ipaccount: ifname [eth0.1] event[16]
[   17.940000] ipaccount: ifname [eth0.1] event[5]
[   17.950000] ipaccount: ifname [eth0.1] event[13]
[   17.950000] ipaccount: ifname [eth0.1] event[1]
[   17.970000] ipaccount: ifname [eth0.1] event[20]
[   17.970000] device eth0.1 entered promiscuous mode
[   17.980000] device eth0 entered promiscuous mode
[   17.980000] ipaccount: ifname [br-lan] event[11]
[   17.990000] ipaccount: ifname [br-lan] event[8]
[   18.000000] ipaccount: ifname [br-lan] event[8]
[   18.000000] ipaccount: ifname [br-lan] event[13]
[   18.010000] br-lan: port 1(eth0.1) entered forwarding state
[   18.010000] br-lan: port 1(eth0.1) entered forwarding state
[   18.020000] ipaccount: ifname [br-lan] event[1]
[   18.030000] ipaccount: ifname [lo] event[13]
[   18.040000] ipaccount: ifname [lo] event[1]
[   18.060000] ipaccount: ifname [eth0.2] event[16]
[   18.070000] ipaccount: ifname [eth0.2] event[5]
[   18.070000] ipaccount: ifname [eth0.2] event[13]
[   18.080000] ipaccount: ifname [eth0.2] event[1]
[   18.790000] ipaccount: ifname [eth0.1] event[4]
[   18.790000] ipaccount: ifname [br-lan] event[4]
[   18.790000] ipaccount: ifname [eth0.2] event[4]
[   20.010000] br-lan: port 1(eth0.1) entered forwarding state
[   20.910000] ipaccount: ifname [wl0] event[13]
[   20.910000] wl0: ===> main_virtual_if_open
[   23.920000] APWdsInitialize():WdsEntry[0]
[   23.920000] APWdsInitialize():WdsEntry[1]
[   23.930000] APWdsInitialize():WdsEntry[2]
[   23.930000] APWdsInitialize():WdsEntry[3]
[   23.960000] E2pAccessMode=2
[   23.960000] SSID[0]=Xiaomi_9994_5G, EdcaIdx=0
[   23.970000] cfg_mode=14
[   23.970000] cfg_mode=14
[   23.970000] cfg_mode=14
[   23.970000] wmode_band_equal(): Band Equal!
[   23.980000] [TxPower] BAND0: 100
[   23.980000] [SKUenable] BAND0: 1
[   23.990000] [PERCENTAGEenable] BAND0: 1
[   23.990000] profile: FragThreshold[0]=2346
[   24.000000] APEdca0
[   24.000000] APEdca1
[   24.000000] APEdca2
[   24.010000] APEdca3
[   24.020000] [RTMPSetProfileParameters]Disable DFS/Zero wait=0/0
[   24.050000] rtmp_read_wds_from_file(): WDS Profile
[   24.060000] APWdsInitialize():WdsEntry[0]
[   24.060000] APWdsInitialize():WdsEntry[1]
[   24.070000] APWdsInitialize():WdsEntry[2]
[   24.070000] APWdsInitialize():WdsEntry[3]
[   24.080000] WDS-Enable mode=0
[   24.080000] HT: WDEV[0] Ext Channel = ABOVE
[   24.090000] HT: greenap_cap = 0
[   24.140000] WtcSetMaxStaNum: MaxStaNum:103, BssidNum:1, WdsNum:4, ApcliNum:1, MaxNumChipRept:24, MinMcastWcid:133
[   24.150000] Top Init Done!
[   24.150000] Use dev_alloc_skb
[   24.160000] RX[0] DESC a297b000 size = 2048
[   24.160000] RX[1] DESC a2994000 size = 2048
[   24.170000] cut_through_init(): ct sw token number = 2047
[   24.170000] cut_through_token_list_init(): TokenList inited done!id_head/tail=0/2048
[   24.180000] cut_through_token_list_init(): 81baca08,81baca08
[   24.190000] cut_through_token_list_init(): TokenList inited done!id_head/tail=0/2048
[   24.200000] cut_through_token_list_init(): 81baca10,81baca10
[   24.200000] Hif Init Done!
[   24.200000] ctl->txq = c165b8cc
[   24.210000] ctl->rxq = c165b8d4
[   24.210000] ctl->ackq = c165b8dc
[   24.210000] ctl->kickq = c165b8e4
[   24.220000] ctl->tx_doneq = c165b8ec
[   24.220000] ctl->rx_doneq = c165b8f4
[   24.220000] Parsing patch header
[   24.230000]  Built date: 19050210037058b
[   24.230000]
[   24.230000]  Platform: 7663
[   24.240000]  HW/SW version: 0x6d702d31
[   24.240000]  Patch version: 0x3830328a
[   24.240000]  Target address: 0xdc000, length: 204032
[   24.260000] patch is not ready && get semaphore success
[   24.270000] Start address = 0xdc000, DL length = 204032, Data mode = 0x80000000
[   24.270000] EventGenericEventHandler: CMD Success
[   24.280000] MtCmdAddressLenReq:(ret = 0)
[   24.290000] MtCmdPatchFinishReq
[   24.290000] EventGenericEventHandler: CMD Success
[   24.300000] release patch semaphore
[   24.300000] Parsing CPU 0 fw tailer
[   24.300000]  Chip ID: 0x08
[   24.310000]  Eco version: 0x01
[   24.310000]  Region number: 0x03
[   24.310000]  Format version: 0x02
[   24.310000]  Format flag: 0x01
[   24.320000]  Ram version: 7663mp1827
[   24.320000]  Built date: 20190502100431
[   24.330000]  Common crc: 0x803140b2
[   24.330000] Parsing tailer region 0
[   24.330000]  Decomp crc: 0x0
[   24.340000]  Decomp size: 0x0
[   24.340000]  Decomp block size: 0x0
[   24.340000]  Target address: 0x112c00
[   24.350000]  Download size: 276368
[   24.350000]  Feature set: 0x27
[   24.350000] Parsing tailer region 1
[   24.360000]  Decomp crc: 0x0
[   24.360000]  Decomp size: 0x0
[   24.360000]  Decomp block size: 0x0
[   24.370000]  Target address: 0x2018400
[   24.370000]  Download size: 70656
[   24.370000]  Feature set: 0x07
[   24.380000] Parsing tailer region 2
[   24.380000]  Decomp crc: 0x0
[   24.380000]  Decomp size: 0x0
[   24.390000]  Decomp block size: 0x0
[   24.390000]  Target address: 0x40100000
[   24.390000]  Download size: 14720
[   24.400000]  Feature set: 0x07
[   24.400000]  Release info: header tag = 0, total length = 72
[   24.400000]  tag 1, padding length = 2, tag length = 66
[   24.410000]  payload: t-neptune-main-mt7663-mt7626-1828-JEDI_7621_7613_AP-20190502100224
[   24.420000] Start address = 0x112c00, DL length = 276368, Data mode = 0x8000000f
[   24.430000] EventGenericEventHandler: CMD Success
[   24.450000] MtCmdAddressLenReq:(ret = 0)
[   24.450000] Start address = 0x2018400, DL length = 70656, Data mode = 0x8000000f
[   24.460000] EventGenericEventHandler: CMD Success
[   24.460000] MtCmdAddressLenReq:(ret = 0)
[   24.470000] Start address = 0x40100000, DL length = 14720, Data mode = 0x8000000f
[   24.480000] EventGenericEventHandler: CMD Success
[   24.480000] MtCmdAddressLenReq:(ret = 0)
[   24.490000] MtCmdFwStartReq: override = 0x1, address = 0x112c00
[   24.530000] EventGenericEventHandler: CMD Success
[   24.540000] MCU Init Done!
[   24.540000] efuse_probe: efuse = 511161
[   24.550000] RtmpChipOpsEepromHook::e2p_type=2, inf_Type=5
[   24.550000] RtmpEepromGetDefault::e2p_dafault=1
[   24.560000] RtmpChipOpsEepromHook: E2P type(2), E2pAccessMode = 2, E2P default = 1
[   24.560000] NVM is FLASH mode. dev_idx [1] FLASH OFFSET [0x8000]
[   26.170000] Country Region from e2p = 0
[   26.170000] RTMPReadTxPwrPerRate(444): Don't Support this now!
[   26.180000] AntCfgInit(2941): Not support for HIF_MT yet!
[   26.180000] MtReadPwrLimitTable: RF_LOCKDOWN Feature OFF !!!
[   26.190000] MtReadPwrLimitTable: RF_LOCKDOWN Feature OFF !!!
[   26.200000] --> Error opening file </etc/Wireless/mt7613/Backoff_default.dat>
[   26.200000] EEPROM Init Done!
[   26.210000] mt_mac_init()-->
[   26.210000] mt_mac_pse_init(2970): Don't Support this now!
[   26.210000] mt7663_init_mac_cr()-->
[   26.220000] mt7663_init_mac_cr(): TMAC_TRCR0=0x82783c92
[   26.220000] MtAsicSetMacMaxLen(1073): Not support for HIF_MT yet!
[   26.230000] <--mt_mac_init()
[   26.240000] MAC Init Done!
[   26.250000] MT7663BBPInit():BBP Initialization.....
[   26.250000]  Band 0: valid=1, isDBDC=0, Band=2, CBW=1, CentCh/PrimCh=1/1, prim_ch_idx=0, txStream=2
[   26.260000]  Band 1: valid=0, isDBDC=0, Band=0, CBW=0, CentCh/PrimCh=0/0, prim_ch_idx=0, txStream=0
[   26.270000] PHY Init Done!
[   26.280000] E2pAccessMode=2
[   26.280000] SSID[0]=Xiaomi_9994_5G, EdcaIdx=0
[   26.280000] cfg_mode=14
[   26.290000] cfg_mode=14
[   26.290000] cfg_mode=14
[   26.290000] wmode_band_equal(): Band Equal!
[   26.300000] [TxPower] BAND0: 100
[   26.300000] [SKUenable] BAND0: 1
[   26.310000] [PERCENTAGEenable] BAND0: 1
[   26.310000] profile: FragThreshold[0]=2346
[   26.320000] APEdca0
[   26.320000] APEdca1
[   26.320000] APEdca2
[   26.320000] APEdca3
[   26.330000] [RTMPSetProfileParameters]Disable DFS/Zero wait=0/0
[   26.370000] rtmp_read_wds_from_file(): WDS Profile
[   26.380000] APWdsInitialize():WdsEntry[0]
[   26.380000] APWdsInitialize():WdsEntry[1]
[   26.390000] APWdsInitialize():WdsEntry[2]
[   26.390000] APWdsInitialize():WdsEntry[3]
[   26.390000] WDS-Enable mode=0
[   26.400000] HT: WDEV[0] Ext Channel = ABOVE
[   26.410000] HT: greenap_cap = 0
[   26.460000] tx_pwr_comp_init():NotSupportYet!
[   26.480000] MtCmdSetMacTxRx:(ret = 0)
[   26.480000] asic_bss_beacon_init(): NotSupportedFunc for this arch(HIF_MT)!
[   26.490000] MtAsicSetChBusyStat(646): Not support for HIF_MT yet!
[   26.490000] AsicDisableSync(): NotSupportedFunc for this arch(HIF_MT)!
[   26.500000] MtAsicSetRalinkBurstMode(2219): Not support for HIF_MT yet!
[   26.510000] MtAsicSetPiggyBack(590): Not support for HIF_MT yet!
[   26.510000] WifiFwdSet::disabled=0
[   26.520000] AsicSetPreTbtt(): NotSupportedFunc for this arch(HIF_MT)!
[   26.520000] Main bssid = 00:00:00:00:00:00
[   26.530000] AsicSetRxFilter(): NotSupportedFunc for this arch(HIF_MT)!
[   26.540000] MtCmdSetMacTxRx:(ret = 0)
[   26.540000] AsicSetRxFilter(): NotSupportedFunc for this arch(HIF_MT)!
[   26.550000] MtCmdSetMacTxRx:(ret = 0)
[   26.560000] INIT REDUCE TCP ACK, wl0
[   26.560000] <==== mt_wifi_init, Status=0
[   26.560000] TxBfModuleEnCtrl:It's not DBDC mode
[   26.570000] MtCmdEDCCACtrl: BandIdx: 0, EDCCACtrl: 1
[   26.570000] MSTA_Init (1) ---> ApCli
[   26.580000] Register MSTA IF (apclii0) , pAd->MSTANum = 1
[   26.580000] Caller: SetCommonHT+0xdc/0x160 [mt7613]
[   26.590000]
[   26.590000] phy_mode=49, ch=0, wdev_type=2
[   26.590000] ht_cap: ht_cap->HtCapInfo,
[   26.600000] ldpc=1,ch_width=1,gf=0,sgi20=1,sgi40=1,tx_stbc=1,rx_stbc=1,amsdu_size=0
[   26.610000] ht_cap: ht_cap->HtCapParm,
[   26.610000] mdpu_density=0, ampdu_factor=3
[   26.610000] ipaccount: ifname [apclii0] event[16]
[   26.620000] ipaccount: ifname [apclii0] event[5]
[   26.620000] WDS_Init():
[   26.630000] The new WDS interface MAC = 00:00:00:00:00:00
[   26.630000]   MacTabMatchWCID = 0
[   26.640000] Caller: SetCommonHT+0xdc/0x160 [mt7613]
[   26.640000]
[   26.640000] phy_mode=49, ch=0, wdev_type=8
[   26.650000] ht_cap: ht_cap->HtCapInfo,
[   26.650000] ldpc=1,ch_width=1,gf=0,sgi20=1,sgi40=1,tx_stbc=1,rx_stbc=1,amsdu_size=0
[   26.660000] ht_cap: ht_cap->HtCapParm,
[   26.660000] mdpu_density=0, ampdu_factor=3
[   26.670000] ipaccount: ifname [wdsi0] event[16]
[   26.670000] ipaccount: ifname [wdsi0] event[5]
[   26.680000] The new WDS interface MAC = 00:00:00:00:00:00
[   26.680000]   MacTabMatchWCID = 0
[   26.690000] Caller: SetCommonHT+0xdc/0x160 [mt7613]
[   26.690000]
[   26.690000] phy_mode=49, ch=0, wdev_type=8
[   26.700000] ht_cap: ht_cap->HtCapInfo,
[   26.700000] ldpc=1,ch_width=1,gf=0,sgi20=1,sgi40=1,tx_stbc=1,rx_stbc=1,amsdu_size=0
[   26.710000] ht_cap: ht_cap->HtCapParm,
[   26.710000] mdpu_density=0, ampdu_factor=3
[   26.720000] ipaccount: ifname [wdsi1] event[16]
[   26.720000] ipaccount: ifname [wdsi1] event[5]
[   26.730000] The new WDS interface MAC = 00:00:00:00:00:00
[   26.730000]   MacTabMatchWCID = 0
[   26.740000] Caller: SetCommonHT+0xdc/0x160 [mt7613]
[   26.740000]
[   26.740000] phy_mode=49, ch=0, wdev_type=8
[   26.750000] ht_cap: ht_cap->HtCapInfo,
[   26.750000] ldpc=1,ch_width=1,gf=0,sgi20=1,sgi40=1,tx_stbc=1,rx_stbc=1,amsdu_size=0
[   26.760000] ht_cap: ht_cap->HtCapParm,
[   26.760000] mdpu_density=0, ampdu_factor=3
[   26.770000] ipaccount: ifname [wdsi2] event[16]
[   26.770000] ipaccount: ifname [wdsi2] event[5]
[   26.780000] The new WDS interface MAC = 00:00:00:00:00:00
[   26.780000]   MacTabMatchWCID = 0
[   26.780000] Caller: SetCommonHT+0xdc/0x160 [mt7613]
[   26.790000]
[   26.790000] phy_mode=49, ch=0, wdev_type=8
[   26.800000] ht_cap: ht_cap->HtCapInfo,
[   26.800000] ldpc=1,ch_width=1,gf=0,sgi20=1,sgi40=1,tx_stbc=1,rx_stbc=1,amsdu_size=0
[   26.810000] ht_cap: ht_cap->HtCapParm,
[   26.810000] mdpu_density=0, ampdu_factor=3
[   26.820000] ipaccount: ifname [wdsi3] event[16]
[   26.820000] ipaccount: ifname [wdsi3] event[5]
[   26.830000] Total allocated 4 WDS interfaces!
[   26.830000] WtcSetMaxStaNum: MaxStaNum:103, BssidNum:1, WdsNum:4, ApcliNum:1, MaxNumChipRept:24, MinMcastWcid:133
[   27.870000] RTMP_COM_IoctlHandle -> CMD_RTPRIV_IOCTL_VIRTUAL_INF_UP
[   27.880000] wifi_sys_open(), wdev idx = 0
[   27.880000] wdev_attr_update(): wdevId0 = 44:df:65:65:99:96
[   27.890000] [RcGetHdevByPhyMode]-- channel 0 fix for rdev fetching
[   27.900000] [BuildChannelList] BandIdx = 0, PhyMode = 49, ChListNum = 4:
[   27.900000]  [RadarStateCheck] RD_NORMAL_MODE
[   27.910000] Caller: wlan_operate_init+0xf4/0x180 [mt7613]
[   27.920000]
[   27.920000] phy_mode=49, ch=0, wdev_type=1
[   27.920000] ht_cap: ht_cap->HtCapInfo,
[   27.920000] ldpc=1,ch_width=1,gf=0,sgi20=1,sgi40=1,tx_stbc=1,rx_stbc=1,amsdu_size=0
[   27.930000] ht_cap: ht_cap->HtCapParm,
[   27.940000] mdpu_density=5, ampdu_factor=3
[   27.950000] AP inf up for ra_0(func_idx) OmacIdx=0
[   27.950000] AsicRadioOnOffCtrl(): DbdcIdx=0 RadioOn
[   27.960000] ApAutoChannelAtBootUp----------------->
[   27.970000] ApAutoChannelAtBootUp: AutoChannelBootup[0] = 1
[   27.970000] AsicSetRxFilter(): NotSupportedFunc for this arch(HIF_MT)!
[   27.980000] MtCmdSetMacTxRx:(ret = 0)
[   27.980000] [AutoChSelBuildChannelListFor5G] ChListNum5G = 4
[   27.990000] AsicSwitchChannel(): 5G Channel:36, then must be Channel_Band:1 !!
[   28.230000] AsicSwitchChannel(): 5G Channel:40, then must be Channel_Band:1 !!
[   28.470000] AsicSwitchChannel(): 5G Channel:44, then must be Channel_Band:1 !!
[   28.710000] AsicSwitchChannel(): 5G Channel:48, then must be Channel_Band:1 !!
[   28.950000]  ch40 bssid=3c:cd:57:73:02:65
[   28.950000]  ch40 bssid=64:64:4a:3c:f7:03
[   28.950000]  ch44 bssid=64:64:4a:db:c4:44
[   28.960000]  ch44 bssid=64:64:4a:db:cb:fc
[   28.960000]  ch44 bssid=3c:cd:57:72:fc:dd
[   28.970000]  ch44 bssid=64:64:4a:db:e4:80
[   28.970000] =====================================================
[   28.980000] Channel 36 : Dirty = 64, False CCA = 0, Busy Time = 331, Skip Channel = FALSE
[   28.980000] Channel 40 : Dirty = 268, False CCA = 0, Busy Time = 370, Skip Channel = FALSE
[   28.990000] Channel 44 : Dirty = 344, False CCA = 0, Busy Time = 657, Skip Channel = FALSE
[   29.000000] Channel 48 : Dirty = 128, False CCA = 0, Busy Time = 3, Skip Channel = FALSE
[   29.010000] =====================================================
[   29.020000] Rule 1 CCA value : Min Dirtiness (Include extension channel) ==> Select Channel 36
[   29.020000] Min Dirty = 332
[   29.030000] ExChannel = 0 , 0
[   29.030000] BW        = 40
[   29.030000] ApAutoChannelAtBootUp : Auto channel selection: Selected channel = 36, IsAband = 1
[   29.040000]  AutoChSelUpdateChannel(): Update channel for wdev for this band PhyMode = 49, Channel = 36
[   29.050000]  [RadarStateCheck] RD_NORMAL_MODE
[   29.060000] AsicSwitchChannel(): 5G Channel:42, then must be Channel_Band:1 !!
[   29.100000] ApAutoChannelAtBootUp<-----------------
[   29.110000] Caller: SetCommonHT+0xdc/0x160 [mt7613]
[   29.110000]
[   29.110000] phy_mode=49, ch=36, wdev_type=1
[   29.120000] ht_cap: ht_cap->HtCapInfo,
[   29.120000] ldpc=1,ch_width=1,gf=0,sgi20=1,sgi40=1,tx_stbc=1,rx_stbc=1,amsdu_size=0
[   29.130000] ht_cap: ht_cap->HtCapParm,
[   29.140000] mdpu_density=5, ampdu_factor=3
[   29.140000] wifi_sys_linkup(), wdev idx = 0
[   29.360000] bssUpdateBmcMngRate (BSS_INFO_BROADCAST_INFO), CmdBssInfoBmcRate.u2BcTransmit= 8192, CmdBssInfoBmcRate.u2McTransmit = 8196
[   29.380000] UpdateBeaconHandler, BCN_UPDATE_INIT, OmacIdx = 0
[   29.380000] MtCmdTxPowerSKUCtrl: fgTxPowerSKUEn: 1, BandIdx: 0
[   29.390000] MtCmdTxBfBackoffCtrl: fgTxBFBackoffEn: 0, BandIdx: 0
[   29.400000] MtCmdTxPowerPercentCtrl: fgTxPowerPercentEn: 1, BandIdx: 0
[   29.400000] AsicSetTxStream(): NotSupportedFunc for this arch(HIF_MT)!
[   29.410000] AsicSetRxStream(): NotSupportedFunc for this arch(HIF_MT)!
[   29.430000] apidx 0 for WscUUIDInit
[   29.430000] Generate UUID for apidx(0)
[   29.430000] ipaccount: ifname [wl0] event[1]
[   29.600000] wifi_sys_linkdown(), wdev idx = 0
[   29.610000] ExtEventBeaconLostHandler::FW LOG, Beacon lost (44:df:65:65:99:96), Reason 0x10
[   29.610000]   Beacon lost - AP disabled!!!
[   29.620000] bssUpdateBmcMngRate (BSS_INFO_BROADCAST_INFO), CmdBssInfoBmcRate.u2BcTransmit= 0, CmdBssInfoBmcRate.u2McTransmit = 0
[   29.640000] wifi_sys_close(), wdev idx = 0
[   29.650000] wifi_sys_open(), wdev idx = 0
[   29.650000] wdev_attr_update(): wdevId0 = 44:df:65:65:99:96
[   29.660000] Caller: wlan_operate_init+0xf4/0x180 [mt7613]
[   29.670000]
[   29.670000] phy_mode=49, ch=36, wdev_type=1
[   29.670000] ht_cap: ht_cap->HtCapInfo,
[   29.680000] ldpc=1,ch_width=1,gf=0,sgi20=1,sgi40=1,tx_stbc=1,rx_stbc=1,amsdu_size=0
[   29.690000] ht_cap: ht_cap->HtCapParm,
[   29.690000] mdpu_density=5, ampdu_factor=3
[   29.700000] wifi_sys_linkup(), wdev idx = 0
[   29.910000] bssUpdateBmcMngRate (BSS_INFO_BROADCAST_INFO), CmdBssInfoBmcRate.u2BcTransmit= 8192, CmdBssInfoBmcRate.u2McTransmit = 8196
[   29.930000] UpdateBeaconHandler, BCN_UPDATE_INIT, OmacIdx = 0
[   32.220000] ipaccount: ifname [wl0] event[20]
[   32.230000] device wl0 entered promiscuous mode
[   32.230000] br-lan: port 2(wl0) entered forwarding state
[   32.240000] br-lan: port 2(wl0) entered forwarding state
[   34.240000] br-lan: port 2(wl0) entered forwarding state
[   34.320000] ipaccount: ifname [wl1] event[13]
[   34.330000] TX_BCN DESC a3522000 size = 320
[   34.330000] RX[0] DESC a3524000 size = 2048
[   34.340000] RX[1] DESC a3525000 size = 1024
[   34.350000] E2pAccessMode=2
[   34.350000] cfg_mode=9
[   34.360000] cfg_mode=9
[   34.360000] wmode_band_equal(): Band Equal!
[   34.650000] load fw image from fw_header_image
[   34.650000] AndesMTLoadFwMethod1(2181)::pChipCap->fw_len(63984)
[   34.660000] CmdAddressLenReq:(ret = 0)

Also the info according to https://openwrt.org/docs/guide-developer/adding_new_device (below)

>cat /proc/cmdline
console=ttyS1,115200n8 uart_en=0 factory_mode=0 mem=64m root=/dev/mtdblock8

>cat /proc/meminfo
MemTotal:          60652 kB
MemFree:           15172 kB
Buffers:            3308 kB
Cached:             9896 kB
...

>cat /proc/devices
Character devices:
  1 mem
  2 pty
  3 ttyp
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
 10 misc
 90 mtd
108 ppp
128 ptm
136 pts
251 nvram
252 gpio
254 sfe_ipv4

Block devices:
259 blkext
 31 mtdblock

> ls /sys/devices/platform
alarmtimer    regulatory.0  serial8250    uevent

>ifconfig -a
apcli0    Link encap:Ethernet  HWaddr 46:DF:65:05:99:95
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

apcli1    Link encap:Ethernet  HWaddr 46:DF:65:05:99:96
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

apclii0   Link encap:Ethernet  HWaddr 42:CF:65:65:99:96
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

br-lan    Link encap:Ethernet  HWaddr 44:DF:65:65:99:94
          inet addr:192.168.31.1  Bcast:192.168.31.255  Mask:255.255.255.0
          inet6 addr: fe80::46df:65ff:fe65:9994/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6373 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8296 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3269218 (3.1 MiB)  TX bytes:2557948 (2.4 MiB)

eth0      Link encap:Ethernet  HWaddr 44:DF:65:65:99:94
          inet6 addr: fe80::46df:65ff:fe65:9994/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12073 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12785 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5714872 (5.4 MiB)  TX bytes:3841827 (3.6 MiB)
          Interrupt:3

eth0.1    Link encap:Ethernet  HWaddr 44:DF:65:65:99:94
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6401 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8289 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:3271774 (3.1 MiB)  TX bytes:2556986 (2.4 MiB)

eth0.2    Link encap:Ethernet  HWaddr 44:DF:65:65:99:94
          inet addr:10.40.41.22  Bcast:10.40.255.255  Mask:255.255.0.0
          inet6 addr: fe80::46df:65ff:fe65:9994/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5672 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4490 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2225784 (2.1 MiB)  TX bytes:1177143 (1.1 MiB)

gre0      Link encap:UNSPEC  HWaddr 00-00-00-00-48-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:1476  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

gretap0   Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          BROADCAST MULTICAST  MTU:1476  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1813 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1813 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:385406 (376.3 KiB)  TX bytes:385406 (376.3 KiB)

tunl0     Link encap:UNSPEC  HWaddr 00-00-00-00-48-00-00-00-00-00-00-00-00-00-00-00
          NOARP  MTU:0  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wdsi0     Link encap:Ethernet  HWaddr 44:DF:65:65:99:96
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wdsi1     Link encap:Ethernet  HWaddr 44:DF:65:65:99:96
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wdsi2     Link encap:Ethernet  HWaddr 44:DF:65:65:99:96
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wdsi3     Link encap:Ethernet  HWaddr 44:DF:65:65:99:96
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wl0       Link encap:Ethernet  HWaddr 44:DF:65:65:99:96
          inet6 addr: fe80::46df:65ff:fe65:9996/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:2

wl1       Link encap:Ethernet  HWaddr 44:DF:65:65:99:95
          inet6 addr: fe80::46df:65ff:fe65:9995/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Interrupt:4

wl2       Link encap:Ethernet  HWaddr 46:DF:65:55:99:95
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wl3       Link encap:Ethernet  HWaddr 46:DF:65:65:99:95
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

>ls /sys/class/net
apcli0   apclii0  eth0     eth0.2   gretap0  tunl0    wdsi1    wdsi3    wl1      wl3
apcli1   br-lan   eth0.1   gre0     lo       wdsi0    wdsi2    wl0      wl2

>brctl show
bridge name     bridge id               STP enabled     interfaces
br-lan          7fff.44df65659994       no              eth0.1
                                                        wl0
                                                        wl
>cat /sys/kernel/debug/gpio     # GPIO information
cat: can't open '/sys/kernel/debug/gpio': No such file or directory

I have now compiled a version of OpenWrt for the router that shouldn't brick it, but I do not guarantee that. If you flash it, you do it at your own risk. I hope you have a CH341a or similar lying around, so you can first take a backup of the SPI flash, so you can recover if you do get a brick. If you don't have one, you better buy one first.

https://www.dropbox.com/scl/fi/xvsdz07n694fi5uvdskgj/openwrt-snapshot-r23676-1-57fda4b743-ramips-mt76x8-xiaomi_mi-router-4a-100m-intl-v2.zip?rlkey=1d07x6fz6qguh4wtgccoy40k1&dl=1

I am not going to do a pull-request to upstream until it has been verified that my patch works, so until then, you can use https://github.com/WereCatf/openwrt/tree/r4aintl_v2 if you wish to compile the whole thing yourself.

All right, Kudos. We're off to the races.
It's not a brick, i can get in with luci and ssh, both wifi work and i can get 90Mbps through the ether-net port. If you want to know anything more, let me know.
All in all i'd say we have a winner, good teamwork. I do hope you can get that pushed upstream.
Should i try to change the wiki of the 4a? And how would a new device page come about?

We are a non- profit organisation, so we might have misunderstanding about the meaning of what you called "very cheap hardware". For us that is a great thing. I have to buy 50 devices for our very large house, with virtually no budget. So Xiaomi 4a was perfect, i even love the built in bandwidth control (only 100m port).
I'd be happy to buy you a coffee, or even better offer a stay at our place. We do have resident artists and digital nomads, where i can get you a discount, if you are one of those. https://residency.hubfeenix.fi/ (also www. ). Thank you.

I can handle updating the wiki. I just need to know if there's any good way of externally deducing if one has a V1 or V2, like e.g. do you see any clear difference in the sticker on the bottom? If not, then I suppose the best option is to get a root on the device and compare the partition layout reported by /proc/mtd, since it's different between V1 and V2.

As for my mention of cheap hardware, I didn't mean any negative connotation with it. Just its monetary value, nothing more. But yeah, I was doing 10 different things at the same time and my thoughts were all over the place, so I came out a tad incoherent. Feel free to just ignore that bit.

I did notice some mentions of the 5GHz WiFi possibly being unstable -- V2 uses different chipset than V1 for that -- but there's nothing I can do about that. That's a driver issue and has to be fixed in the driver itself. Just mentioning this in case you experience any issues. If not, all the better!

All good, thanks for the help again.

Nothing from the outside that i can see, compared to the V1.

Since one has to do the OpenWRTInvasion anyway (and get root) the mtd is ok. But maybe the simplest way is uname -a and the V2 will have the string MiWiFi-R4ACv2 in there, while V1 will have MiWiFi-R4AC

Hi there! Thanks for your work! I confirm that this compilation does not brick the divice, which is an achivement for me already (since I have bricked it a couple of times already and had to debrick it with CH341a progammer)!!! However I really need firmware based on v21.02.7 feed. Please advice how should I aproach this task using your patch? and/or your github source?

I appologise in advance for dumb questions, as I am relativery new to OpenWRT. I am trying to learn how firmware builder works based on standard devices so far...

The patch with my changes won't apply cleanly as-is to an older feed as the files the changes would apply to aren't identical. That said, the commit at https://github.com/WereCatf/openwrt/commit/74dea277bbaac1870ee08855130be4b3f8b39fda shows the changes I made -- looking at specific commits on Github lets you view only the changes that were made in that commit, no other cruft --, so you basically have to go and inspect the existing files, look at the changes in the commit and then implement those changes, possibly modifying them a little to match the existing stuff. It shouldn't be particularly difficult, it's not like there are a lot of changes.

I can't hand-hold you through this process, though. I am currently struggling IRL and I just don't have the capacity to take on extra stuff. At least give it a burl yourself. You can always ask, if you stumble across an issue that you just can't figure out yourself (plus you'll learn the most this way, so it's more educational in the long run)

Since I am all for sharing knowledge, feel free to ask questions. I don't promise to get back to you in any timely manner, but I'll try to answer you when I have the time and/or I remember to.

1 Like

Thanks for your work!
Is there a plan to add your patch to main openwrt tree? 4A Gigaibit v2 is already there.