Adding OpenWrt support for DIR-3060 - continued

I installed a USB-UART converter, it is difficult to open the casing of this device.


SUCCES :slight_smile:

 TIMEOUT_COUNT=10,Load address: 0x88000000
Loading: Got ARP REPLY, set server/gtwy eth addr (f4:6d:04:49:b3:21)
Got it
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###################################################
done
Bytes transferred = 6583917 (64766d hex)
LoadAddr=88000000 NetBootFileXferSize= 0064766d
..Erasing NAND Flash...
ranand_erase: start:80000, len:20000
.Writing to NAND Flash...
done
Automatic boot of image at addr 0x88000000 ...
## Booting image at 88000000 ...
   Image Name:   MIPS OpenWrt Linux-5.10.90
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    6583757 Bytes =  6.3 MB
   Load Address: 80001000
   Entry Point:  80001000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80001000) ...
## Giving linux memsize in MB, 256

Starting kernel ...

[    0.000000] Linux version 5.10.90 (lucky@6700K) (mipsel-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r18589-e821849c4f) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Sat Jan 15 22:05:55 2022
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is D-Link DIR-3060 A1
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] VPE topology {2,2} total 4
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] percpu: Embedded 15 pages/cpu s30096 r8192 d23152 u61440
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Writing ErrCtl register=00054320
[    0.000000] Readback ErrCtl register=00054320
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 245460K/262144K available (6664K kernel code, 621K rwdata, 1352K rodata, 4980K init, 235K bss, 16684K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 256
[    0.000000] random: get_random_bytes called from start_kernel+0x3cc/0x5e4 with crng_init=0
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000013] sched_clock: 64 bits at 880MHz, resolution 1ns, wraps every 4398046511103ns
[    0.015859] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.033724] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.106051] pid_max: default: 32768 minimum: 301
[    0.115365] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.129769] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.147759] rcu: Hierarchical SRCU implementation.
[    0.157524] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.173012] smp: Bringing up secondary CPUs ...
[    0.182577] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.182588] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.182599] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.182720] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.242931] Synchronize counters for CPU 1: done.
[    0.304917] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.304927] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.304934] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.304981] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.363880] Synchronize counters for CPU 2: done.
[    0.424072] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.424081] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.424089] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.424141] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.483443] Synchronize counters for CPU 3: done.
[    0.543044] smp: Brought up 1 node, 4 CPUs
[    0.555291] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.574796] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.588612] pinctrl core: initialized pinctrl subsystem
[    0.600742] NET: Registered protocol family 16
[    0.611768] cpuidle: using governor teo
[    0.639882] random: fast init done
[    0.660119] clocksource: Switched to clocksource GIC
[    0.671803] NET: Registered protocol family 2
[    0.680708] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.695828] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.712398] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.727546] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.741723] TCP: Hash tables configured (established 2048 bind 2048)
[    0.754451] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.767334] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.781369] NET: Registered protocol family 1
[    0.789905] PCI: CLS 0 bytes, default 32
[    5.378969] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    5.395715] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    5.407251] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    5.428990] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    5.440371] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    5.451648] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    5.463507] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    5.477571] printk: console [ttyS0] disabled
[    5.486080] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    5.504021] printk: console [ttyS0] enabled
[    5.504021] printk: console [ttyS0] enabled
[    5.520533] printk: bootconsole [early0] disabled
[    5.520533] printk: bootconsole [early0] disabled
[    5.541457] mt7621-nand 1e003000.nand: Using programmed access timing: 31c07388
[    5.556285] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[    5.568944] nand: Winbond W29N01HV
[    5.575721] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    5.590801] mt7621-nand 1e003000.nand: ECC strength adjusted to 4 bits
[    5.603830] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[    5.618386] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[    5.632952] Scanning device for bad blocks
[    6.286261] 9 fixed-partitions partitions found on MTD device mt7621-nand
[    6.299789] Creating 9 MTD partitions on "mt7621-nand":
[    6.310206] 0x000000000000-0x000000080000 : "Bootloader"
[    6.321746] 0x000000080000-0x000000100000 : "config"
[    6.332558] 0x000000100000-0x000000140000 : "factory"
[    6.343593] 0x000000140000-0x000000180000 : "config2"
[    6.354558] 0x000000180000-0x000002980000 : "firmware"
[    6.598096] 0x000002980000-0x000004980000 : "private"
[    6.609208] 0x000004980000-0x000007180000 : "firmware2"
[    6.620705] 0x000007180000-0x000007780000 : "mydlink"
[    6.631721] 0x000007780000-0x000008000000 : "reserved"
[    6.649844] libphy: Fixed MDIO Bus: probed
[    6.691357] libphy: mdio: probed
[    6.698582] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    6.714746] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
[    6.733083] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
[    6.746547] mt7621-pci 1e140000.pcie:   No bus range found for /pcie@1e140000, using [bus 00-ff]
[    6.764151] mt7621-pci 1e140000.pcie:      MEM 0x0060000000..0x006fffffff -> 0x0000000000
[    6.780532] mt7621-pci 1e140000.pcie:       IO 0x001e160000..0x001e16ffff -> 0x0000000000
[    6.797010] mt7621-pci 1e140000.pcie: Parsing DT failed
[    6.809582] NET: Registered protocol family 10
[    6.819831] Segment Routing with IPv6
[    6.827262] NET: Registered protocol family 17
[    6.836529] 8021q: 802.1Q VLAN Support v1.8
[    6.848132] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    6.954758] libphy: dsa slave smi: probed
[    6.963184] mt7530 mdio-bus:1f lan4 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY] (irq=POLL)
[    6.983255] mt7530 mdio-bus:1f lan3 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY] (irq=POLL)
[    7.003336] mt7530 mdio-bus:1f lan2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY] (irq=POLL)
[    7.023382] mt7530 mdio-bus:1f lan1 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY] (irq=POLL)
[    7.043486] mt7530 mdio-bus:1f wan (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY] (irq=POLL)
[    7.064296] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode
[    7.081312] DSA: tree 0 setup
[    7.087586] rt2880-pinmux pinctrl: pcie is already enabled
[    7.098717] mt7621-pci 1e140000.pcie: host bridge /pcie@1e140000 ranges:
[    7.112089] mt7621-pci 1e140000.pcie:   No bus range found for /pcie@1e140000, using [bus 00-ff]
[    7.129616] mt7621-pci 1e140000.pcie:      MEM 0x0060000000..0x006fffffff -> 0x0000000000
[    7.145918] mt7621-pci 1e140000.pcie:       IO 0x001e160000..0x001e16ffff -> 0x0000000000
[    7.162315] mt7621-pci-phy 1e149000.pcie-phy: PHY for 0xbe149000 (dual port = 1)
[    7.177454] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[    7.192508] mt7621-pci 1e140000.pcie: failed to parse bus ranges property: -22
[    7.307155] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
[    7.318272] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[    7.429553] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[    7.443427] mt7621-pci 1e140000.pcie: PCIE0 enabled
[    7.453139] mt7621-pci 1e140000.pcie: PCIE1 enabled
[    7.462860] mt7621-pci 1e140000.pcie: PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    7.481584] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[    7.494268] pci_bus 0000:00: root bus resource [io  0x1e160000-0x1e16ffff]
[    7.507971] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    7.521673] pci_bus 0000:00: root bus resource [bus 00-ff]
[    7.532601] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff] (bus address [0x00000000-0x0fffffff])
[    7.552913] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[    7.564893] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    7.577378] pci 0000:00:00.0: reg 0x14: [mem 0x60200000-0x6020ffff]
[    7.589923] pci 0000:00:00.0: supports D1
[    7.597909] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    7.610226] pci 0000:00:01.0: [0e8d:0801] type 01 class 0x060400
[    7.622222] pci 0000:00:01.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    7.634709] pci 0000:00:01.0: reg 0x14: [mem 0x60210000-0x6021ffff]
[    7.647249] pci 0000:00:01.0: supports D1
[    7.655233] pci 0000:00:01.0: PME# supported from D0 D1 D3hot
[    7.668713] pci 0000:01:00.0: [14c3:7615] type 00 class 0x000280
[    7.680758] pci 0000:01:00.0: reg 0x10: initial BAR value 0x00000000 invalid
[    7.694804] pci 0000:01:00.0: reg 0x10: [mem size 0x00100000 64bit]
[    7.707449] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    7.738856] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    7.749294] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    7.761435] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    7.774960] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    7.788399] pci 0000:02:00.0: [14c3:7615] type 00 class 0x000280
[    7.800425] pci 0000:02:00.0: reg 0x10: initial BAR value 0x00000000 invalid
[    7.814467] pci 0000:02:00.0: reg 0x10: [mem size 0x00100000 64bit]
[    7.827114] pci 0000:02:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:01.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    7.858544] pci 0000:00:01.0: PCI bridge to [bus 02-ff]
[    7.868980] pci 0000:00:01.0:   bridge window [io  0x0000-0x0fff]
[    7.881121] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff]
[    7.894645] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    7.907866] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    7.921043] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    7.934908] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    7.948077] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    7.961947] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    7.975467] pci 0000:00:01.0: BAR 8: assigned [mem 0x60100000-0x601fffff]
[    7.988988] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[    8.002517] pci 0000:00:01.0: BAR 1: assigned [mem 0x60210000-0x6021ffff]
[    8.016039] pci 0000:00:00.0: BAR 7: assigned [io  0x1e160000-0x1e160fff]
[    8.029559] pci 0000:00:01.0: BAR 7: assigned [io  0x1e161000-0x1e161fff]
[    8.043092] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    8.057663] pci 0000:00:00.0: PCI bridge to [bus 01]
[    8.067552] pci 0000:00:00.0:   bridge window [io  0x1e160000-0x1e160fff]
[    8.081074] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    8.094601] pci 0000:02:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit]
[    8.109164] pci 0000:00:01.0: PCI bridge to [bus 02]
[    8.119051] pci 0000:00:01.0:   bridge window [io  0x1e161000-0x1e161fff]
[    8.132573] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff]
[    8.166021] Freeing unused kernel memory: 4980K
[    8.175083] This architecture does not have kernel memory protection.
[    8.187921] Run /init as init process
[    8.195854] mt7530 mdio-bus:1f: Link is Up - 1Gbps/Full - flow control off
[    8.692216] init: Console is alive
[    8.699322] init: - watchdog -
[    8.720535] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    8.744961] usbcore: registered new interface driver usbfs
[    8.756093] usbcore: registered new interface driver hub
[    8.766876] usbcore: registered new device driver usb
[    8.787510] xhci-mtk 1e1c0000.xhci: supply vbus not found, using dummy regulator
[    8.802596] xhci-mtk 1e1c0000.xhci: supply vusb33 not found, using dummy regulator
[    8.817954] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    8.828594] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    8.850265] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000290010
[    8.868538] xhci-mtk 1e1c0000.xhci: irq 20, io mem 0x1e1c0000
[    8.881110] hub 1-0:1.0: USB hub found
[    8.888683] hub 1-0:1.0: 2 ports detected
[    8.897323] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    8.907990] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    8.922933] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0 SuperSpeed
[    8.935783] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    8.952722] hub 2-0:1.0: USB hub found
[    8.960406] hub 2-0:1.0: 1 port detected
[    8.976750] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    9.000539] init: - preinit -
/bin/board_detect: /etc/board.d/01_leds: line 35: syntax error: unexpected ")" (expecting ";;")
[    9.286825] random: jshn: uninitialized urandom read (4 bytes read)
[    9.337675] random: jshn: uninitialized urandom read (4 bytes read)
[    9.373407] random: jshn: uninitialized urandom read (4 bytes read)
[    9.563829] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[    9.580424] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[    9.580534] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode
[    9.610862] 8021q: adding VLAN 0 to HW filter on device lan1
[    9.624783] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
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
[   13.785482] procd: - early -
[   13.791505] procd: - watchdog -
[   14.360331] procd: - watchdog -
[   14.367045] procd: - ubus -
[   14.379637] urandom_read: 5 callbacks suppressed
[   14.379650] random: ubusd: uninitialized urandom read (4 bytes read)
[   14.430864] random: ubusd: uninitialized urandom read (4 bytes read)
[   14.447052] procd: - init -
Please press Enter to activate this console.
[   14.805225] kmodloader: loading kernel modules from /etc/modules.d/*
[   15.021980] Loading modules backported from Linux version v5.15.8-0-g43e577d7a2cb
[   15.025024] urngd: v1.0.2 started.
[   15.036940] Backport generated by backports.git v5.15.8-1-0-g83f664bb
[   15.078056] xt_time: kernel timezone is -0000
[   15.141913] mt7621-pci 1e140000.pcie: bus=1 slot=0 irq=22
[   15.152721] pci 0000:00:00.0: enabling device (0006 -> 0007)
[   15.163997] mt7615e 0000:01:00.0: enabling device (0000 -> 0002)
[   15.199460] mt7621-pci 1e140000.pcie: bus=2 slot=1 irq=23
[   15.210379] pci 0000:00:01.0: enabling device (0006 -> 0007)
[   15.221749] mt7615e 0000:02:00.0: enabling device (0000 -> 0002)
[   15.234133] mt7615e 0000:01:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   15.234133]
[   15.263365] random: crng init done
[   15.270478] mt7615e 0000:02:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   15.270478]
[   15.289933] PPP generic driver version 2.4.2
[   15.294144] mt7615e 0000:01:00.0: N9 Firmware Version: _reserved_, Build Time: 20200814163649
[   15.302193] NET: Registered protocol family 24
[   15.315864] mt7615e 0000:02:00.0: N9 Firmware Version: _reserved_, Build Time: 20200814163649
[   15.349699] mt7615e 0000:02:00.0: CR4 Firmware Version: _reserved_, Build Time: 20190121161307
[   15.355794] kmodloader: done loading kernel modules from /etc/modules.d/*
[   15.367214] mt7615e 0000:01:00.0: CR4 Firmware Version: _reserved_, Build Time: 20190121161307
[   44.436145] mtk_soc_eth 1e100000.ethernet eth0: Link is Down
[   44.457238] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[   44.473269] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   44.476784] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode
[   44.503842] 8021q: adding VLAN 0 to HW filter on device lan1
[   44.517874] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   44.532207] br-lan: port 1(lan1) entered blocking state
[   44.542688] br-lan: port 1(lan1) entered disabled state
[   44.554129] device lan1 entered promiscuous mode
[   44.563452] device eth0 entered promiscuous mode
[   44.600757] mt7530 mdio-bus:1f lan2: configuring for phy/gmii link mode
[   44.614880] 8021q: adding VLAN 0 to HW filter on device lan2
[   44.629759] br-lan: port 2(lan2) entered blocking state
[   44.640654] br-lan: port 2(lan2) entered disabled state
[   44.652039] device lan2 entered promiscuous mode
[   44.674291] mt7530 mdio-bus:1f lan3: configuring for phy/gmii link mode
[   44.688060] 8021q: adding VLAN 0 to HW filter on device lan3
[   44.702681] br-lan: port 3(lan3) entered blocking state
[   44.713193] br-lan: port 3(lan3) entered disabled state
[   44.724835] device lan3 entered promiscuous mode
[   44.748758] mt7530 mdio-bus:1f lan4: configuring for phy/gmii link mode
[   44.762624] 8021q: adding VLAN 0 to HW filter on device lan4
[   44.777636] br-lan: port 4(lan4) entered blocking state
[   44.788556] br-lan: port 4(lan4) entered disabled state
[   44.800408] device lan4 entered promiscuous mode
[   44.825702] mt7530 mdio-bus:1f wan: configuring for phy/gmii link mode
[   44.839372] 8021q: adding VLAN 0 to HW filter on device wan
[   49.731181] mt7530 mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[   49.746239] br-lan: port 1(lan1) entered blocking state
[   49.756762] br-lan: port 1(lan1) entered forwarding state
[   49.771372] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

BusyBox v1.35.0 (2022-01-15 22:05:55 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r18589-e821849c4f
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------

@DarioX7 @Lucky1 -
i, too, have flashed this build (r18598) and i appreciate the work in creating it.
as you see - all 3 radios are set to CH36. in wireless survey, there are 4 radios, the first being a 2.4G radio. given the dual band/dual antenna system that htis router has, it might be tricky to get all radio sets working.
this is where we need some help.
i will conitnue to experiement with this.
thanks again

there is only 2x 7615 radios
the 1st x4 radio is divided into 2x 2.4G & 2x 5G
the 2nd 7615 is just a 4x 5G radio
so it should appear to have
a 2.4G 2x radio
a 5G 4x radio
a 5G 2x radio

I'm not sure the DBDC "Dual Band Dual Concurrent" on the 1st 7615 is working correctly yet

@Lucky1
What exactly do you need for me to check on my device? I am a more skittish hobbyist with some knowledge of it, so if I don't know what you ask about OpenWrt, I will try to find out and return what you ask for.

As for the DIR-3060, I would like to see official OpenWrt support, because the original firmware has not been updated for a long time and the device itself is EOL.

After reading the previous thread regarding the DIR-3060 Router, I would like to thank you for supporting the development of this RAMIPS platform.

Hi DarioX7
I myself don't have this device
but for those that do like your self who want this to have official support
it need someone with a device to summit a pull request to OpenWRT
I'm sure it needs some tweaks like mac addresses matching the oem firmware
& leds & buttons etc but all this takes time & you need the device to polish off this stuff
if this is ever going to get official support someone is going to have to do this
it could be you or another person reading this

Hello Lucky1, I own the router and I can help to improve the image. I can provide ssh access to the device.
I installed the image from luckys.onmypc.net and I can confirm that all 3 WIFi adapters are recognized as AC adapters. The MAC address of the Lan interface matches the MAC address on the sticker of the router.

Hi Iivailo
this need someone who has motivation & has a device
to submit a pull request to the openwrt repository
I don't have this device
The work that made that image is at https://github.com/Lucky1openwrt/openwrt/tree/DIR-3060-A1
that image is old now
I know the MT7615 driver is much improved & maybe the DBDC mode is as well
anyone is welcome to take what's there & polish it off & call it their own
This could be you

Hi,
I got your commit adding support for DIR-3060 and applied it to a 20.03 branch. The LEDs for the WIFI do not work, the others are fine. When I disable the wireless adapters the LEDs are on and when I enable them they are off (which is the opposite of the expected behavior). The reset button also works, but there is still an issue with the wifi. The first wireless adapter is recognized as AC, but it is actually the 2.4GHz adapter. The second adapter (Radio1) does not broadcast, the 3rd is fine. Later I will do more tests and try to get the 2nd WiFi working.

for changing the led change the "GPIO_ACTIVE_LOW" to "GPIO_ACTIVE_HIGH"
in the below DTS file

there are 2 radio IC's "MT7615" on this device
1st 4x4 radio is split into 2x 2.4G & 2x2 5G call DBDC "dual band dual concurrent"
2nd is just a pain 4x4 5G
there was no way to tell what each of the radios was what band way back then
maybe the has changed https://github.com/openwrt/mt76
1st radio's config was from the DIR-853-A3's

Hi, I solved the problems with the LEDs of the Wi-Fi and with the LED of the WAN interface. Everything seems to work. There are 2 minor issues with the Wi-Fi. The first problem is that the 2.4GHz adapter is not properly recognized as only 2.4GHz device and by default it is configured to use AC mode and channel 36(5GHz). After changing the settings, the device is properly working on 2.4GHz. How can I limit the modes on the compiled image by default? Setting the ieee80211-freq-limit parameter in the DTS file affects both bands of the MT7615DN chip. I archive my goal that way, but the second adapter (the 5GHz adapter of the MT7615DN chip) is not usable. I checked the DTS file of DIR-853 and other routers with MT7615DN and I didn't find anything which can solve the issue. Is this problem also available on DIR-853? The second Wi-Fi problem is that the DFS channels are not working on the device. There is an exception in the logs.

daemon.notice hostapd: Frequency 5320 (primary) not allowed for AP mode, flags: 0x416b NO-IR RADAR
daemon.err hostapd: Primary frequency not allowed
daemon.warn hostapd: wlan1: IEEE 802.11 Configured channel (64) or frequency (5320) (secondary_channel=-1) not found from the channel list of the current mode (2) IEEE 802.11a
daemon.warn hostapd: wlan1: IEEE 802.11 Hardware does not support configured channel
daemon.err hostapd: Could not select hw_mode and channel. (-3)
daemon.notice hostapd: wlan1: interface state UNINITIALIZED->DISABLED
daemon.notice hostapd: wlan1: AP-DISABLED

I'm getting the same exception also on a DIR-2660, so it looks like it is a mt76 problem.

sounds like you are getting somewhere :slight_smile:
the DBDC has always had these problems
I'm hoping some day someone with the skills with MT76
will sort is out one day but yes the DIR-853's had the same problems

the DBDC radio may be limited to non DFS channels
but the 4x radio should be fine like my 1960 & 878
as the 2660 is the same it;s fine for DFS as well
so i don't understand that

my only recommendation is to make you code available for other to better
and if motivated add it to openwrt via a pull request

Hi, today I made a PR and I hope it will get soon in the master branch. You can also see there my changes if you want. Here is the PR: https://github.com/openwrt/openwrt/pull/10697
On my DIR-3060 the DFS channels are not working on both 5GHz radios. Both DIR-3060 and DIR-2660 which I have are from the UK and in this country they are available, so my guess was that this is a driver issue. I can get a DIR-1960 to test this weekend.

1 Like

it's good to hear about the PR
the DIR-2660 & Dir-1960 are the same PCB
the only difference is the usb 2.0 port is not loaded in the DIR-1960
& it's marketed as a AC1900 but at lest mine loaded as a AC2600
I'm in Australia and the DFS works ok here now
I'm surprised it's not working for you
I can set mine to UK and test a channel if you want ?
just tested 52 and 132 and they seen fine set to GB

You gave me the idea to manually set the country for the adapters and now both adapters work on DFS channels. It looks like the country code is not read from the configuration partitions. Maybe this mean that the flash has a different structure than that described in the DTS file and openwrt can't read from them. How can I be sure that all partitions are mapped correctly?

you have to compare flash partitions against the OEM firmware

the country stuff for d-link is there but not used
I know that some radio's have the option for country setting
but i also know they never set them
I have had a few netgear usb ones that
won't connect to channel 13
with the default windows drivers
you have to install the netgear one's
it can be a real pain
but d-link with the same chip-set did work
due to them setting the correct country of sale

@iivailo @Lucky1 Is it possible to use the code in this PR for a DIR-3040 rev A1? It has the exact same FCC ID as the DIR-3060 rev A1.

it's got a different model number so I don't think so
if it uses the exact same dlink firmware file for both devices then maybe
but i would think it's different in some way

anyway you can for sure use the work going into the dir-3060-a1
but it all needs to be checked right down to the flash partition layout
and going on other devices it will at lest need the matching header saying 3040 not 3060
at the very least

Yes, that is what I'm attempting right now. I'm seeing if changing the names from dir-3060 to dir-3040, like how dir-2640 and dir-2660 are compared, works out. How would I check the flash partition layout? Similarly, how would I check the dlink firmware file and compare it to the dir-3060-a1 version? The deviwiki for the dir-2640 says the dir-2640 is exactly the same as the dir-2660 ("apart from the color of the LEDs and the presence of a dedicated push button for toggling the Wi-Fi networks"), so I'm hoping that dlink just did something similar.

1st thing you need a serial cable & capture the oem logs
this will have to flash layout
note the current mac address's on each interface

then you need to back the firmware that's there
I'd try to load the initramfs image for the 3060 into ram via uboot
then via the " Save mtdblock contents" option
backup all the partitions
while there have a play as what works or not

then look at the saved kernal MDT & see what header id is there
I'm gessing it's DIR-3040

that's round one anyway