Adding OpenWrt support for Cudy AC1200 MT7628 MT7613

Hi guys,

we just got a bootlog of the M1200 Cudy-Model which is sold as AC1200 mesh. So I guess it would be nice to get OpenWRT running on this device.

[05010C07][05010C0A]

DDR Calibration DQS reg = 00008988



U-Boot 1.1.3 (Mar 14 2022 - 10:05:05)


Board: Ralink APSoC DRAM:  128 MB

mtest end addr: 87f29f88

relocate_code Pointer at: 87f8c000

flash manufacture id: 20, device id 40 18

find flash: xm25qh128c

*** Warning - bad CRC, using default environment


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

Ralink UBoot Version: 5.0.0.0

-------------------------------------------- 

ASIC 7628_MP (Port5<->None)

DRAM component: 1024 Mbits DDR, width 16

DRAM bus: 16 bit

Total memory: 128 MBytes

Flash component: SPI Flash

Build Date:Mar 14 2022  Time:10:05:05

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

   

3: System Boot system code via Flash.

## Booting image at bc050000 ...

   Image Name:   R22

   Image Type:   MIPS Linux Kernel Image (lzma compressed)

   Data Size:    2461467 Bytes =  2.3 MB

   Load Address: 80000000

   Entry Point:  80000000

   Verifying Checksum ... OK

   Uncompressing Kernel Image ... OK

No initrd

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

## Giving linux memsize in MB, 128


Starting kernel ...


[    0.000000] Linux version 4.4.140 (jenkins@cudy_release) (gcc version 5.4.0 (LEDE GCC 5.4.0 1.6.3) ) #0 Mon Mar 14 02:02:23 2022
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7628AN ver:1 eco:2
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[    0.000000] MIPS: machine is R22
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    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] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=0001c820
[    0.000000] Readback ErrCtl register=0001c820
[    0.000000] Memory: 122544K/131072K available (4970K kernel code, 730K rwdata, 1228K rodata, 168K init, 202K bss, 8528K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:256
[    0.000000] intc: using register map from devicetree
[    0.000000] CPU Clock: 580MHz
[    0.000000] clocksource_probe: no matching clocksources found
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000010] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007524] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.070039] pid_max: default: 32768 minimum: 301
[    0.074618] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080952] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.093543] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.103046] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.109089] pinctrl core: initialized pinctrl subsystem
[    0.114845] NET: Registered protocol family 16
[    0.223811] mt7620-pci 10140000.pcie: Port 0 N_FTS = 1b105000
[    0.379085] PCI host bridge /pcie@10140000 ranges:
[    0.383663]  MEM 0x0000000020000000..0x000000002fffffff
[    0.388685]   IO 0x0000000010160000..0x000000001016ffff
[    0.405758] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.411232] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.416730] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.422796] PCI host bridge to bus 0000:00
[    0.426745] pci_bus 0000:00: root bus resource [mem 0x20000000-0x2fffffff]
[    0.433327] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    0.439049] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    0.445592] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.453716] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.462111] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    0.468485] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    0.475164] pci 0000:00:00.0: BAR 9: assigned [mem 0x20000000-0x201fffff pref]
[    0.482142] pci 0000:00:00.0: BAR 1: assigned [mem 0x20200000-0x2020ffff]
[    0.488697] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit pref]
[    0.496188] pci 0000:01:00.0: BAR 2: assigned [mem 0x20100000-0x20103fff 64bit pref]
[    0.503654] pci 0000:01:00.0: BAR 4: assigned [mem 0x20104000-0x20104fff 64bit pref]
[    0.511134] pci 0000:00:00.0: PCI bridge to [bus 01]
[    0.515904] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff pref]
[    0.522894] pci 0000:00:00.0: card - bus=0x0, slot = 0x0 irq=0
[    0.528505] pci 0000:01:00.0: card - bus=0x1, slot = 0x0 irq=4
[    0.535109] clocksource: Switched to clocksource MIPS
[    0.541288] NET: Registered protocol family 2
[    0.546489] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.553180] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.559365] TCP: Hash tables configured (established 1024 bind 1024)
[    0.565555] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.571152] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.577491] NET: Registered protocol family 1
[    0.586977] Crashlog allocated RAM at address 0x3f00000
[    0.608245] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.613830] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.626077] io scheduler noop registered
[    0.629813] io scheduler deadline registered (default)
[    0.635701] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.642978] console [ttyS0] disabled
[    0.646463] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[    0.655174] console [ttyS0] enabled
[    0.655174] console [ttyS0] enabled
[    0.662176] bootconsole [early0] disabled
[    0.662176] bootconsole [early0] disabled
[    0.671703] spi-mt7621 10000b00.spi: sys_freq: 193333333
[    0.680763] m25p80 spi32766.0: using chunked io (size=32)
[    0.686325] m25p80 spi32766.0: XM25QH128C (16384 Kbytes)
[    0.691789] 7 ofpart partitions found on MTD device spi32766.0
[    0.697720] Creating 7 MTD partitions on "spi32766.0":
[    0.702933] 0x000000000000-0x000000030000 : "u-boot"
[    0.709666] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.716846] 0x000000040000-0x000000050000 : "factory"
[    0.723677] 0x000000fd0000-0x000000fe0000 : "debug"
[    0.730434] 0x000000fe0000-0x000000ff0000 : "backup"
[    0.737304] 0x000000ff0000-0x000001000000 : "bdinfo"
[    0.744013] 0x000000050000-0x000000fd0000 : "firmware"
[    0.800587] 2 uimage-fw partitions found on MTD device firmware
[    0.806632] 0x000000050000-0x0000002a8f5b : "kernel"
[    0.813173] 0x0000002a8f5b-0x000000fd0000 : "rootfs"
[    0.819985] mtd: device 8 (rootfs) set to be root filesystem
[    0.825892] 1 squashfs-split partitions found on MTD device rootfs
[    0.832170] 0x0000009d0000-0x000000fd0000 : "rootfs_data"
[    0.849067] rt3050-esw 10110000.esw: link changed 0x00
[    0.856651] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    0.865300] MT7663E module init
[    0.912227] MT7613 AP Driver version-6.0.4.0
[    0.924194] mt7663e nlwifi attach
[    0.928919] mt7621_wdt 10000120.watchdog: Initialized
[    0.935561] NET: Registered protocol family 10
[    0.943396] NET: Registered protocol family 17
[    0.948071] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    0.960939] Bridge firewalling registered
[    0.965011] 8021q: 802.1Q VLAN Support v1.8
[    0.978866] VFS: Mounted root (squashfs filesystem) readonly on device 31:8.
[    0.986999] Freeing unused kernel memory: 168K
[    2.717720] init: Console is alive
[    2.721384] init: - watchdog -
[    4.597142] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.698827] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.716690] init: - preinit -
[    5.274373] random: procd: uninitialized urandom read (4 bytes read, 8 bits of entropy available)
[    5.312730] boot from spi
[    5.331328] mount_root: loading kmods from internal overlay
[    5.372097] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[    5.383916] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[    7.985153] jffs2: notice: (321) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    8.001437] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[    8.023738] block: extroot: not configured
[    8.229313] jffs2: notice: (318) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[   10.267335] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[   10.285382] block: extroot: not configured
[   10.290707] mount_root: switching to jffs2 overlay
[   10.309045] urandom-seed: Seeding with /etc/urandom.seed
[   11.799179] procd: - early -
[   11.802205] procd: - watchdog -
[   12.431949] procd: - watchdog -
[   12.435524] procd: - ubus -
[   12.662397] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   12.746290] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   12.755945] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   12.765212] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   12.777953] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   12.787202] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   12.796826] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   12.806220] random: ubusd: uninitialized urandom read (4 bytes read, 20 bits of entropy available)
[   12.815787] procd: - init -
[   13.291253] kmodloader: loading kernel modules from /etc/modules.d/*
[   13.340425] zram: Added device: zram0
[   13.360912] Initializing XFRM netlink socket
[   13.372981] NET: Registered protocol family 15
[   13.385077] tun: Universal TUN/TAP device driver, 1.6
[   13.390285] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[   13.449071] l2tp_core: L2TP core driver, V2.0
[   13.455599] l2tp_netlink: L2TP netlink interface
[   13.476550] gre: GRE over IPv4 demultiplexor driver
[   13.484143] ip_gre: GRE over IPv4 tunneling driver
[   13.507506] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   13.560481] Netfilter messages via NETLINK v0.30.
[   13.578374] ip_set: protocol 6
[   13.676232] QCA Hy-Fi multicast installation successfully
[   13.725977] u32 classifier
[   13.728732]     input device check on
[   13.732439]     Actions configured
[   13.767628] Mirror/redirect action on
[   13.788630] nf_conntrack version 0.5.0 (1917 buckets, 7668 max)
[   14.559329] MT7628 module init
[   14.577864] MT7628 AP Driver version-4.1.0.0
[   15.440581] mt7628_set_ed_cca: TURN OFF EDCCA  mac 0x10618 = 0xd7083f0f, EDCCA_Status=0
[   15.448784] mt7628 nlwifi attach
[   15.482555] ip_tables: (C) 2000-2006 Netfilter Core Team
[   15.547703] ctnetlink v0.93: registering with nfnetlink.
[   15.566482] nf_conntrack_rtsp v0.7 loading
[   15.641034] nf_nat_rtsp v0.7 loading
[   15.677671] wireguard: WireGuard 1.0.20210219 loaded. See www.wireguard.com for information.
[   15.686316] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   15.768343] xt_time: kernel timezone is -0000
[   15.799628] PPP generic driver version 2.4.2
[   15.806659] PPP MPPE Compression module registered
[   15.813667] NET: Registered protocol family 24
[   15.820301] PPTP driver version 0.8.5
[   15.830251] l2tp_ppp: PPPoL2TP kernel driver, V2.0
[   15.839718] kmodloader: done loading kernel modules from /etc/modules.d/*
[   23.060840] random: jshn: uninitialized urandom read (4 bytes read, 56 bits of entropy available)
[   23.145897] HcGetEdca(): wdev=0, hobj is not ready!
[   24.544662] zram0: detected capacity change from 0 to 61865984
[   24.565376] Adding 60412k swap on /dev/zram0.  Priority:-1 extents:1 across:60412k SS
[   28.073957] rt3050-esw 10110000.esw: link changed 0x00
[   31.231847] device eth0.1 entered promiscuous mode
[   31.236888] device eth0 entered promiscuous mode
[   31.270437] br-lan: port 1(eth0.1) entered forwarding state
[   31.276242] br-lan: port 1(eth0.1) entered forwarding state
[   32.982569] device ra0 entered promiscuous mode
[   32.987334] br-lan: port 2(ra0) entered forwarding state
[   32.992747] br-lan: port 2(ra0) entered forwarding state
[   33.069558] wan-detect: macaddr f4:a4:54:81:cd:65, proto dhcp
[   33.299131] br-lan: port 1(eth0.1) entered forwarding state
[   34.985219] br-lan: port 2(ra0) entered forwarding state
[   35.447800] device ra2 entered promiscuous mode
[   35.452490] br-lan: port 3(ra2) entered forwarding state
[   35.457977] br-lan: port 3(ra2) entered forwarding state
[   35.649888] set_thermal_protection_criteria_proc: high_en=1, high_thd = 123, low_en = 1, low_thd = 108
[   35.958123] RTMPSetPhyMode(): channel out of range, use first ch=36
[   36.211623] [RcGetHdevByPhyMode]-- channel 0 fix for rdev fetching
[   36.435899] EventThermalProtect: HLType = 1, CurrentTemp = 52
[   36.441746] Switch TX to 2 stram
[   37.405262] ====================================================================
[   37.412787] Channel  36 : Busy Time =     32, Skip Channel = FALSE, BwCap = TRUE
[   37.420305] Channel  40 : Busy Time =     52, Skip Channel = FALSE, BwCap = TRUE
[   37.427807] Channel  44 : Busy Time =    524, Skip Channel = FALSE, BwCap = TRUE
[   37.435311] Channel  48 : Busy Time =     68, Skip Channel = FALSE, BwCap = TRUE
[   37.442803] ====================================================================
[   37.450318] Rule 3 Channel Busy time value : Select Primary Channel 36
[   37.456948] Rule 3 Channel Busy time value : Min Channel Busy = 524
[   37.463301] Rule 3 Channel Busy time value : BW = 80
[   37.468347] ApAutoChannelAtBootUp : Auto channel selection: Selected channel = 36, IsAband = 1
[   37.478161] br-lan: port 3(ra2) entered forwarding state
[   39.519512] device rai0 entered promiscuous mode
[   39.524291] br-lan: port 4(rai0) entered forwarding state
[   39.529867] br-lan: port 4(rai0) entered forwarding state
[   41.525322] br-lan: port 4(rai0) entered forwarding state
[   41.836834] device rai2 entered promiscuous mode
[   41.841615] br-lan: port 5(rai2) entered forwarding state
[   41.847207] br-lan: port 5(rai2) entered forwarding state
[   42.040747] set_thermal_protection_admin_ctrl_duty_proc: ucBand:0, u4Lv0Duty:100, u4Lv1Duty:60, u4Lv2Duty:30, u4Lv3Duty:15
[   42.096925] set_thermal_protection_criteria_proc: fgHighEn: 1, fgLowEn: 1, fgRFOffEn: 0, cHighTempTh: 122, cLowTempTh: 112, cRFOffTh: 125
[   42.109529] set_thermal_protection_criteria_proc: u4RechkTimer: 10, ucType: Duty Cycle
[   42.117815] MtCmdThermalProtect: ucBand:0, HighEn:1, HighTempTh:122, LowEn:1, LowTempTh:112, RechkTimer:10
[   42.127657] MtCmdThermalProtect: RFOffEn: 0, RFOffTh: 125, ucType: 1
[   43.845182] br-lan: port 5(rai2) entered forwarding state
[   51.302856] S95done (2435): drop_caches: 3
[   53.025163] random: nonblocking pool is initialized

As far as I see the specs are:

MT7628 running on 580 MHz, 16 MB Flash and 128 MB RAM.

The serial console is disconnected and you need to contact trough a bridge-port beside the serial-connector.

Sadly 16meg flash is a dead end, you could create your own image but challenging to get it accepted.

16 MiB is still officially supported and is the minimum recommended, still. Plenty of 8 MiB flash devices still get official builds as well, FWIW. It doesn't allow for much headroom in the future, but it shouldn't be an issue for porting OpenWrt.

3 Likes

My mistake! Thanks for the correction

1 Like