D-Link DIR-2660 backporting issues

Hi all,
Sorry if the section is not correct for beginner questions.
I was trying to backport the device from the current snapshot to 19.07 but without much success other than compiling it. It seems it's the issue probably with the nand driver or its configuration.
This devce doesn't use the generic SPI flash but the parallel NAND - Winbond W29N01HV.
Unfortunately the it refuses to boot like in the bootlog below. If it can help with troubleshooting I can attach the diff file.
Thank you all in advance!

===================================================================
                MT7621   stage1 code 10:33:11 (ASIC)
                CPU=50000000 HZ BUS=16666666 HZ
==================================================================
Change MPLL source from XTAL to CR...
do MEMPLL setting..
MEMPLL Config : 0x11100000
3PLL mode + External loopback
=== XTAL-40Mhz === DDR-1200Mhz ===
PLL3 FB_DL: 0x0, 1/0 = 829/195 01000000
PLL2 FB_DL: 0x13, 1/0 = 513/511 4D000000
PLL4 FB_DL: 0x18, 1/0 = 610/414 61000000
do DDR setting..[00320381]
Apply DDR3 Setting...(use customer AC)
          0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120
      --------------------------------------------------------------------------------
0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0007:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0008:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0009:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000E:|    0    0    0    0    0    0    0    0    0    0    1    1    1    1    1    1
000F:|    0    0    0    0    0    1    1    1    1    1    1    1    1    1    1    0
0010:|    1    1    1    1    1    1    1    1    1    1    0    0    0    0    0    0
0011:|    1    1    1    1    1    0    0    0    0    0    0    0    0    0    0    0
0012:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0013:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0014:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
rank 0 coarse = 16
rank 0 fine = 40
B:|    0    0    0    0    0    0    0    0    1    1    1    0    0    0    0    0
opt_dle value:9
DRAMC_R0DELDLY[018]=00002020
==================================================================
                RX      DQS perbit delay software calibration 
==================================================================
1.0-15 bit dq delay value
==================================================================
bit|     0  1  2  3  4  5  6  7  8  9
--------------------------------------
0 |    8 6 7 9 7 7 7 6 6 6 
10 |    7 8 9 9 7 7 
--------------------------------------

==================================================================
2.dqs window
x=pass dqs delay value (min~max)center 
y=0-7bit DQ of every group
input delay:DQS0 =32 DQS1 = 32
==================================================================
bit     DQS0     bit      DQS1
0  (1~58)29  8  (2~60)31
1  (1~60)30  9  (1~59)30
2  (1~58)29  10  (1~62)31
3  (1~61)31  11  (0~58)29
4  (1~60)30  12  (1~64)32
5  (1~62)31  13  (1~60)30
6  (1~58)29  14  (1~62)31
7  (1~63)32  15  (1~59)30
==================================================================
3.dq delay value last
==================================================================
bit|    0  1  2  3  4  5  6  7  8   9
--------------------------------------
0 |    11 8 10 10 9 8 10 6 7 8 
10 |    8 11 9 11 8 9 
==================================================================
==================================================================
     TX  perbyte calibration 
==================================================================
DQS loop = 15, cmp_err_1 = ffff0000 
dqs_perbyte_dly.last_dqsdly_pass[0]=15,  finish count=1 
dqs_perbyte_dly.last_dqsdly_pass[1]=15,  finish count=2 
DQ loop=15, cmp_err_1 = ffff0080
dqs_perbyte_dly.last_dqdly_pass[1]=15,  finish count=1 
DQ loop=14, cmp_err_1 = ffff0000
dqs_perbyte_dly.last_dqdly_pass[0]=14,  finish count=2 
byte:0, (DQS,DQ)=(8,8)
byte:1, (DQS,DQ)=(8,8)
20,data:88
[EMI] DRAMC calibration passed

===================================================================
                MT7621   stage1 code done 
                CPU=50000000 HZ BUS=16666666 HZ
===================================================================


U-Boot 1.1.3 (Apr 25 2019 - 14:00:06)

Board: Ralink APSoC DRAM:  256 MB
relocate_code Pointer at: 8ffa8000

Config XHCI 40M PLL 
******************************
Software System Reset Occurred
******************************
Allocate 16 byte aligned buffer: 8ffdfdb0
Enable NFI Clock
# MTK NAND # : Use HW ECC
NAND ID [EF F1 00 95 00]
Device not found, ID: eff1
Not Support this Device! 
chip_mode=00000001
Support this Device in MTK table! eff1 
select_chip
[NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
Signature matched and data read!
load_fact_bbt success 1023
load fact bbt success
[mtk_nand] probe successfully!
mtd->writesize=2048 mtd->oobsize=64,    mtd->erasesize=131072  devinfo.iowidth=8
..============================================ 
Ralink UBoot Version: 5.0.0.0
-------------------------------------------- 
ASIC MT7621A DualCore (MAC to MT7530 Mode)
DRAM_CONF_FROM: Auto-Detection 
DRAM_TYPE: DDR3 
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: 4 MBytes NOR Flash
Date:Apr 25 2019  Time:14:00:06
============================================ 
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:256, ways:4, linesz:32 ,total:32768 

 ##### The CPU freq = 880 MHZ #### 
 estimate memory size =256 Mbytes
#Reset_MT7530
set LAN/WAN LLLLW
########BUTTON_RESET: 15

=================================================
Check image validation:hdr1_addr[bc180000]hdr2_addr[c0980000]
Image1 Header Magic Number --> OK
Image2 Header Magic Number --> OK
Image1 Header Checksum --> OK
Image2 Header Checksum --> OK
Image1 Data Checksum --> ..............................OK
..Erasing NAND Flash...
ranand_erase: start:80000, len:20000 
.Writing to NAND Flash...
done
Image2 Data Checksum --> ..............................OK
Checksum1 != Checksum2,Image2 need to be updated!
Image1 Stable Flag --> Stable
Image1 Try Counter --> 0

Image1: OK Image2: Broken

Image2 is borken. Copy Image1 to Image2.

Copy Image:
Image1(0x180000) to Image2(0x4980000), size=0x1D5883
..............................ranand_erase: start:4980000, len:20000 
..ranand_erase: start:49a0000, len:20000 
..ranand_erase: start:49c0000, len:20000 
..ranand_erase: start:49e0000, len:20000 
..ranand_erase: start:4a00000, len:20000 
..ranand_erase: start:4a20000, len:20000 
..ranand_erase: start:4a40000, len:20000 
..ranand_erase: start:4a60000, len:20000 
..ranand_erase: start:4a80000, len:20000 
..ranand_erase: start:4aa0000, len:20000 
..ranand_erase: start:4ac0000, len:20000 
..ranand_erase: start:4ae0000, len:20000 
..ranand_erase: start:4b00000, len:20000 
..ranand_erase: start:4b20000, len:20000 
....ranand_erase: start:4b40000, len:20000 
.(5192)offs=78905344 piece=0 piece_size=88195 rc=0
Done!

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

Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   6: System Enter UBoot to Update Img or Bin. 
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 
default: 3

You choosed 3

\x08\x08\x08 0 
   
3: System Boot system code via Flash.
## Booting image at bc180000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.202
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1923043 Bytes =  1.8 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 4.14.202 (user@ubuntu) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r0+11228-78c4c04dd7)) #0 SMP Wed Oct 28 22:22:44 2020
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is D-Link DIR-2660 A1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    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-0x0000000007ffffff]
[    0.000000]   HighMem  empty
[    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] random: get_random_bytes called from start_kernel+0x94/0x4ac with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu s26192 r8192 d22960 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,57600 root=/dev/mtdblock4 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=00011d80
[    0.000000] Readback ErrCtl register=00011d80
[    0.000000] Memory: 122320K/131072K available (4544K kernel code, 231K rwdata, 1008K rodata, 1244K init, 248K bss, 8752K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.015495] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.087830] pid_max: default: 32768 minimum: 301
[    0.097138] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110161] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.125884] Hierarchical SRCU implementation.
[    0.135354] smp: Bringing up secondary CPUs ...
[    0.165221] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.165230] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.165242] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.165374] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.204724] Synchronize counters for CPU 1: done.
[    0.288972] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.288979] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.288987] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.289060] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.325559] Synchronize counters for CPU 2: done.
[    0.406047] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.406055] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.406062] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.406144] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.445132] Synchronize counters for CPU 3: done.
[    0.504729] smp: Brought up 1 node, 4 CPUs
[    0.516537] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.536007] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.548421] pinctrl core: initialized pinctrl subsystem
[    0.560047] NET: Registered protocol family 16
[    0.578426] pull PCIe RST: RALINK_RSTCTRL = 4000000
[    0.888422] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.898487] ***** Xtal 40MHz *****
[    0.905220] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.915424] Port 0 N_FTS = 1b102800
[    0.922325] Port 1 N_FTS = 1b102800
[    0.929249] Port 2 N_FTS = 1b102800
[    2.087928] PCIE2 no card, disable it(RST&CLK)
[    2.096616]  -> 21007f2
[    2.101437] PCIE0 enabled
[    2.106638] PCIE1 enabled
[    2.111817] PCI host bridge /pcie@1e140000 ranges:
[    2.121341]  MEM 0x0000000060000000..0x000000006fffffff
[    2.131703]   IO 0x000000001e160000..0x000000001e16ffff
[    2.142070] PCI coherence region base: 0xbfbf8000, mask/settings: 0x60000000
[    2.164866] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.176132] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.187359] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.200041] PCI host bridge to bus 0000:00
[    2.208052] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.221724] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    2.233455] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    2.246947] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    2.263362] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.279161] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.296156] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    2.309190] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.323002] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    2.336142] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.349960] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.363437] pci 0000:00:01.0: BAR 8: assigned [mem 0x60100000-0x601fffff]
[    2.376923] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[    2.390399] pci 0000:00:01.0: BAR 1: assigned [mem 0x60210000-0x6021ffff]
[    2.403882] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.418400] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.428217] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.441729] pci 0000:02:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit]
[    2.456239] pci 0000:00:01.0: PCI bridge to [bus 02]
[    2.466065] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff]
[    2.480866] clocksource: Switched to clocksource GIC
[    2.492221] NET: Registered protocol family 2
[    2.501506] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    2.515246] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    2.527855] TCP: Hash tables configured (established 1024 bind 1024)
[    2.540582] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.552089] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.564738] NET: Registered protocol family 1
[    2.810814] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    2.822046] Crashlog allocated RAM at address 0x3f00000
[    2.832549] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.851264] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.862741] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.883623] random: fast init done
[    2.892178] io scheduler noop registered
[    2.899823] io scheduler deadline registered (default)
[    2.910987] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    2.924781] console [ttyS0] disabled
[    2.931828] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    2.949765] console [ttyS0] enabled
[    2.949765] console [ttyS0] enabled
[    2.963555] bootconsole [early0] disabled
[    2.963555] bootconsole [early0] disabled
[    2.981389] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    2.995450] Enable NFI Clock
[    3.001194] # MTK NAND # : Use HW ECC
[    3.008483] Device not found, ID: eff1
[    3.015945] Not Support this Device! 
[    3.023407] chip_mode=00000001
[    3.029470] Support this Device in MTK table! eff1 
[    3.039370] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    3.052242] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[    3.064893] nand: Winbond NAND 128MiB 3,3V 8-bit
[    3.074087] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.089174] Scanning device for bad blocks
[    3.231165] 9 fixed-partitions partitions found on MTD device MT7621-NAND
[    3.244678] Creating 9 MTD partitions on "MT7621-NAND":
[    3.255092] 0x000000000000-0x000000080000 : "Bootloader"
[    3.266600] 0x000000080000-0x000000100000 : "config"
[    3.277349] 0x000000100000-0x000000140000 : "factory"
[    3.288262] 0x000000140000-0x000000180000 : "config2"
[    3.299156] 0x000000180000-0x000002980000 : "firmware"
[    3.310605] 0x000002980000-0x000004980000 : "private"
[    3.321823] 0x000004980000-0x000007180000 : "firmware2"
[    3.333401] 0x000007180000-0x000007780000 : "mydlink"
[    3.344365] 0x000007780000-0x000008000000 : "reserved"
[    3.355528] [mtk_nand] probe successfully!
[    3.364417] Signature matched and data read!
[    3.372924] load_fact_bbt success 1023
[    3.381039] libphy: Fixed MDIO Bus: probed
[    3.452641] mtk_soc_eth 1e100000.ethernet: generated random MAC address 82:59:30:53:e0:26
[    3.469114] libphy: mdio: probed
[    4.875102] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    4.887515] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
[    4.906500] NET: Registered protocol family 10
[    4.916913] Segment Routing with IPv6
[    4.924365] NET: Registered protocol family 17
[    4.933278] 8021q: 802.1Q VLAN Support v1.8
[    4.943882] hctosys: unable to open rtc device (rtc0)
[    4.956674] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x0527 instead
[    4.975667] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x9d1c instead
[    4.994543] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x995f instead
[    5.013421] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x1d00 instead
[    5.032314] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0x0080 instead


=====================
                  cut
=====================


[   58.071388] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x027e0808: 0xff7f instead
[   58.090255] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x027e0820: 0x30a5 instead
[   58.109126] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x027e083c: 0x8eff instead
[   58.128100] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x027e100c: 0x0001 instead
[   58.146966] jffs2: Further such events for this erase block will not be printed
[   58.192820] jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[   58.209615] jffs2: empty_blocks 0, bad_blocks 0, c->nr_blocks 320
[   58.222024] VFS: Cannot open root device "mtdblock4" or unknown-block(31,4): error -5
[   58.237644] Please append a correct "root=" boot option; here are the available partitions:
[   58.254291] 1f00             512 mtdblock0 
[   58.254297]  (driver?)
[   58.267295] 1f01             512 mtdblock1 
[   58.267300]  (driver?)
[   58.280300] 1f02             256 mtdblock2 
[   58.280306]  (driver?)
[   58.293326] 1f03             256 mtdblock3 
[   58.293332]  (driver?)
[   58.306329] 1f04           40960 mtdblock4 
[   58.306334]  (driver?)
[   58.319334] 1f05           32768 mtdblock5 
[   58.319339]  (driver?)
[   58.332352] 1f06           40960 mtdblock6 
[   58.332357]  (driver?)
[   58.345353] 1f07            6144 mtdblock7 
[   58.345358]  (driver?)
[   58.358358] 1f08            8704 mtdblock8 
[   58.358363]  (driver?)
[   58.371374] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,4)
[   58.396067] Rebooting in 1 seconds..

this is what i think it is
these d-link devices have a bigger header then the normal uboot
and you must have padded that out ok in the firmware file to upload it
but the firmware itself uses the partition size number in the header to find the next partition
due to your header not being the normal size the offset is wrong
it need to adjust for the bigger header
somehow you have not ported this part

1 Like

Thank you for the reply!
I copied the newer version of firmware-utils with the pssadhdr and I added it in mt7621.mk
Please take a look at my diff below

diff -ruN downloaded/openwrt-19.07-78c4c04/target/linux/ramips/base-files/etc/board.d/01_leds ../openwrt-19.07-78c4c04/target/linux/ramips/base-files/etc/board.d/01_leds
--- downloaded/openwrt-19.07-78c4c04/target/linux/ramips/base-files/etc/board.d/01_leds	2020-12-24 15:00:31.346965563 -0800
+++ ../openwrt-19.07-78c4c04/target/linux/ramips/base-files/etc/board.d/01_leds	2020-12-20 10:36:54.334163000 -0800
@@ -13,6 +13,9 @@
 board_config_update
 
 case $board in
+dlink,dir-2660-a1)
+	ucidef_set_led_netdev "wan" "wan" "white:net" "wan"
+	;;
 3g-6200n|\
 br-6475nd|\
 mzk-w300nh2)
diff -ruN downloaded/openwrt-19.07-78c4c04/target/linux/ramips/base-files/lib/ramips.sh ../openwrt-19.07-78c4c04/target/linux/ramips/base-files/lib/ramips.sh
--- downloaded/openwrt-19.07-78c4c04/target/linux/ramips/base-files/lib/ramips.sh	2020-12-24 15:00:31.346965563 -0800
+++ ../openwrt-19.07-78c4c04/target/linux/ramips/base-files/lib/ramips.sh	2020-12-23 05:51:52.590746201 -0800
@@ -160,6 +160,9 @@
 	*"DIR-860L B1")
 		name="dir-860l-b1"
 		;;
+	*"DIR-2660 A1")
+		name="dir-2660-a1"
+		;;
 	*"Dovado Tiny AC")
 		name="tiny-ac"
 		;;
diff -ruN downloaded/openwrt-19.07-78c4c04/target/linux/ramips/base-files/lib/upgrade/platform.sh ../openwrt-19.07-78c4c04/target/linux/ramips/base-files/lib/upgrade/platform.sh
--- downloaded/openwrt-19.07-78c4c04/target/linux/ramips/base-files/lib/upgrade/platform.sh	2020-12-24 15:00:31.346965563 -0800
+++ ../openwrt-19.07-78c4c04/target/linux/ramips/base-files/lib/upgrade/platform.sh	2020-12-23 05:03:33.917282341 -0800
@@ -60,6 +60,8 @@
 	netgear,r6350|\
 	ubnt-erx|\
 	ubnt-erx-sfp|\
+	dlink,dir-1960-a1|\
+	dlink,dir-2660-a1|\
 	xiaomi,mir3g|\
 	xiaomi,mir3p)
 		nand_do_upgrade "$1"
diff -ruN downloaded/openwrt-19.07-78c4c04/target/linux/ramips/dts/DIR-2660-A1.dts ../openwrt-19.07-78c4c04/target/linux/ramips/dts/DIR-2660-A1.dts
--- downloaded/openwrt-19.07-78c4c04/target/linux/ramips/dts/DIR-2660-A1.dts	1969-12-31 16:00:00.000000000 -0800
+++ ../openwrt-19.07-78c4c04/target/linux/ramips/dts/DIR-2660-A1.dts	2020-12-24 02:18:06.812621000 -0800
@@ -0,0 +1,176 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/dts-v1/;
+
+#include "mt7621.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+
+/ {
+	compatible = "dlink,dir-2660-a1", "mediatek,mt7621-soc";
+	model = "D-Link DIR-2660 A1";
+
+	aliases {
+		led-boot = &led_power_orange;
+		led-failsafe = &led_power_white;
+		led-running = &led_power_white;
+		led-upgrade = &led_net_orange;						   
+	};
+
+	memory@0 {
+		device_type = "memory";
+		reg = <0x0 0x8000000>;
+	};
+
+	chosen {
+		bootargs = "console=ttyS0,57600 root=/dev/mtdblock4";
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_power_orange: power_orange {
+			label = "dir-2660-a1:orange:power";
+			gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
+		};
+
+		led_power_white: power_white {
+			label = "dir-2660-a1:white:power";
+			gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
+		};
+
+		led_net_orange: net_orange {
+			label = "dir-2660-a1:orange:net";
+			gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
+		};
+
+		net_white {
+			label = "dir-2660-a1:white:net";
+			gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
+		};
+
+		usb2_white {
+			label = "dir-2660-a1:white:usb2";
+			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&ehci_port2>;
+			linux,default-trigger = "usbport";
+		};
+
+		usb3_white {
+			label = "dir-2660-a1:white:usb3";
+			gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
+			trigger-sources = <&xhci_ehci_port1>;
+			linux,default-trigger = "usbport";
+		};
+	};
+	
+	keys {
+		compatible = "gpio-keys-polled";
+		poll-interval = <20>;
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+};
+
+&nand {
+	status = "okay";
+
+	partitions {
+		compatible = "fixed-partitions";
+		#address-cells = <1>;
+		#size-cells = <1>;
+
+		partition@0 {
+			label = "Bootloader";
+			reg = <0x0 0x80000>;
+			read-only;
+		};
+
+		partition@80000 {
+			label = "config";
+			reg = <0x80000 0x80000>;
+			read-only;
+		};
+
+		factory: partition@100000 {
+			label = "factory";
+			reg = <0x100000 0x40000>;
+			read-only;
+		};
+
+		partition@140000 {
+			label = "config2";
+			reg = <0x140000 0x40000>;
+			read-only;
+		};
+
+		partition@180000 {
+			label = "firmware";
+			compatible = "sge,uimage";
+			reg = <0x180000 0x2800000>;
+		};
+
+		partition@2980000 {
+			label = "private";
+			reg = <0x2980000 0x2000000>;
+			read-only;
+		};
+
+		partition@4980000 {
+			label = "firmware2";
+			compatible = "sge,uimage";
+			reg = <0x4980000 0x2800000>;
+		};
+
+		partition@7180000 {
+			label = "mydlink";
+			reg = <0x7180000 0x600000>;
+			read-only;
+		};
+
+		partition@7780000 {
+			label = "reserved";
+			reg = <0x7780000 0x880000>;
+			read-only;
+		};
+	};
+};
+
+&pcie {
+	status = "okay";
+};
+
+&pcie0 {
+	mt76@0,0 {
+		reg = <0x0000 0 0 0 0>;
+		mediatek,mtd-eeprom = <&factory 0x0000>;
+		ieee80211-freq-limit = <2400000 2500000>;
+	};
+};
+
+&pcie1 {
+	mt76@0,0 {
+		reg = <0x0000 0 0 0 0>;
+		mediatek,mtd-eeprom = <&factory 0x8000>;
+		ieee80211-freq-limit = <5000000 6000000>;
+	};
+};
+
+&pinctrl {
+	state_default: pinctrl0 {
+		gpio {
+			ralink,group = "i2c", "uart2", "uart3", "rgmii2", "sdhci";
+			ralink,function = "gpio";
+		};
+	};
+};
diff -ruN downloaded/openwrt-19.07-78c4c04/target/linux/ramips/image/Makefile ../openwrt-19.07-78c4c04/target/linux/ramips/image/Makefile
--- downloaded/openwrt-19.07-78c4c04/target/linux/ramips/image/Makefile	2020-12-24 15:00:31.362966095 -0800
+++ ../openwrt-19.07-78c4c04/target/linux/ramips/image/Makefile	2020-12-23 07:30:40.324792686 -0800
@@ -62,6 +62,11 @@
 		-a 4 -f $(IMAGE_ROOTFS)
 endef
 
+define Build/uimage-padhdr
+	uimage_padhdr $(if $(1),-l $(1)) -i $@ -o $@.new
+	mv $@.new $@
+endef
+
 define Build/loader-common
 	rm -rf $@.src
 	$(MAKE) -C lzma-loader \
diff -ruN downloaded/openwrt-19.07-78c4c04/target/linux/ramips/image/mt7621.mk ../openwrt-19.07-78c4c04/target/linux/ramips/image/mt7621.mk
--- downloaded/openwrt-19.07-78c4c04/target/linux/ramips/image/mt7621.mk	2020-12-24 15:00:31.366966228 -0800
+++ ../openwrt-19.07-78c4c04/target/linux/ramips/image/mt7621.mk	2020-12-23 14:44:12.257719103 -0800
@@ -116,6 +116,23 @@
 endef
 TARGET_DEVICES += asus_rt-ac57u
 
+define Device/dlink_dir-2660-a1
+  DTS := DIR-2660-A1
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  KERNEL_SIZE := 4096k
+  KERNEL := $$(KERNEL) | uimage-padhdr 96
+  UBINIZE_OPTS := -E 5
+  IMAGE_SIZE := $(ralink_default_fw_size_32M)
+  IMAGES += factory.bin
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+  IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) | append-ubi | check-size $$$$(IMAGE_SIZE)
+  DEVICE_TITLE := D-Link DIR-2660 A1
+  DEVICE_PACKAGES := kmod-mt7615e kmod-mt7615-firmware kmod-usb3 \
+	kmod-usb-ledtrig-usbport
+endef
+TARGET_DEVICES += dlink_dir-2660-a1
+
 define Device/dir-860l-b1
   $(Device/seama)
   DTS := DIR-860L-B1

At quick glance. If you redefine board name in ramips.sh:

you must use this new dir-2660-a1 in other files (01_leds, platform.sh etc).
So it's simpler to remove changes in ramips.sh and openwrt will use default board name dlink,dir-2660-a1 from dts-file compatible property.

I'm not sure about firmware-utils
but the file I was thinking it was is "\target\linux\generic\files\drivers\mtd\mtdsplit\mtdsplit_uimage.c
it's about "sge,uimage"
I would think it would error tho
I'll have a look a bit later when i have more time

Thanks for the heads up.
I will remove the redefinition from ramips.sh and check if it helps.
@Lucky1 I'm looking forward for that, will check the "sge,uimage" how it differs comparing to the latest snapshot, if it comes to the firmware-utils, I needed to update it to latest because the older one was missing program to use "uimage-padhdr 96"

Okay, I copied the whole "\target\linux\generic\files\drivers\mtd\mtdsplit" directory and reconfigured menuconfig. The compilation was successful and now it seems it recognizes the partition so it loos like it was a good one :slight_smile:

[    3.323295] 2 sge-fw partitions found on MTD device firmware
[    3.334614] Creating 2 MTD partitions on "firmware":
[    3.344509] 0x000000000000-0x000000400000 : "kernel"
[    3.355464] 0x000000400000-0x000002800000 : "ubi"

Now the booting process is probably just having problems with jffs2_scan_eraseblock


===================================================================
                MT7621   stage1 code 10:33:11 (ASIC)
                CPU=50000000 HZ BUS=16666666 HZ
==================================================================
Change MPLL source from XTAL to CR...
do MEMPLL setting..
MEMPLL Config : 0x11100000
3PLL mode + External loopback
=== XTAL-40Mhz === DDR-1200Mhz ===
PLL3 FB_DL: 0x0, 1/0 = 814/210 01000000
PLL2 FB_DL: 0x14, 1/0 = 688/336 51000000
PLL4 FB_DL: 0x18, 1/0 = 532/492 61000000
do DDR setting..[00320381]
Apply DDR3 Setting...(use customer AC)
          0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120
      --------------------------------------------------------------------------------
0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0007:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0008:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0009:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000E:|    0    0    0    0    0    0    0    0    0    0    1    1    1    1    1    1
000F:|    0    0    0    0    0    1    1    1    1    1    1    1    1    1    1    0
0010:|    1    1    1    1    1    1    1    1    1    1    0    0    0    0    0    0
0011:|    1    1    1    1    1    0    0    0    0    0    0    0    0    0    0    0
0012:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0013:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0014:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
rank 0 coarse = 16
rank 0 fine = 40
B:|    0    0    0    0    0    0    0    0    1    1    1    0    0    0    0    0
opt_dle value:9
DRAMC_R0DELDLY[018]=00001F1F
==================================================================
                RX      DQS perbit delay software calibration 
==================================================================
1.0-15 bit dq delay value
==================================================================
bit|     0  1  2  3  4  5  6  7  8  9
--------------------------------------
0 |    8 6 7 9 7 7 7 5 6 6 
10 |    7 8 9 9 7 7 
--------------------------------------

==================================================================
2.dqs window
x=pass dqs delay value (min~max)center 
y=0-7bit DQ of every group
input delay:DQS0 =31 DQS1 = 31
==================================================================
bit     DQS0     bit      DQS1
0  (1~60)30  8  (2~60)31
1  (1~59)30  9  (1~60)30
2  (1~60)30  10  (1~62)31
3  (1~61)31  11  (1~58)29
4  (1~61)31  12  (1~62)31
5  (1~61)31  13  (1~60)30
6  (1~57)29  14  (1~62)31
7  (0~62)31  15  (1~59)30
==================================================================
3.dq delay value last
==================================================================
bit|    0  1  2  3  4  5  6  7  8   9
--------------------------------------
0 |    9 7 8 9 7 7 9 5 6 7 
10 |    7 10 9 10 7 8 
==================================================================
==================================================================
     TX  perbyte calibration 
==================================================================
DQS loop = 15, cmp_err_1 = ffff0000 
dqs_perbyte_dly.last_dqsdly_pass[0]=15,  finish count=1 
dqs_perbyte_dly.last_dqsdly_pass[1]=15,  finish count=2 
DQ loop=15, cmp_err_1 = ffff0000
dqs_perbyte_dly.last_dqdly_pass[0]=15,  finish count=1 
dqs_perbyte_dly.last_dqdly_pass[1]=15,  finish count=2 
byte:0, (DQS,DQ)=(8,8)
byte:1, (DQS,DQ)=(8,8)
20,data:88
[EMI] DRAMC calibration passed

===================================================================
                MT7621   stage1 code done 
                CPU=50000000 HZ BUS=16666666 HZ
===================================================================


U-Boot 1.1.3 (Apr 25 2019 - 14:00:06)

Board: Ralink APSoC DRAM:  256 MB
relocate_code Pointer at: 8ffa8000

Config XHCI 40M PLL 
Allocate 16 byte aligned buffer: 8ffdfdb0
Enable NFI Clock
# MTK NAND # : Use HW ECC
NAND ID [EF F1 00 95 00]
Device not found, ID: eff1
Not Support this Device! 
chip_mode=00000001
Support this Device in MTK table! eff1 
select_chip
[NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
Signature matched and data read!
load_fact_bbt success 1023
load fact bbt success
[mtk_nand] probe successfully!
mtd->writesize=2048 mtd->oobsize=64,    mtd->erasesize=131072  devinfo.iowidth=8
..============================================ 
Ralink UBoot Version: 5.0.0.0
-------------------------------------------- 
ASIC MT7621A DualCore (MAC to MT7530 Mode)
DRAM_CONF_FROM: Auto-Detection 
DRAM_TYPE: DDR3 
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: 4 MBytes NOR Flash
Date:Apr 25 2019  Time:14:00:06
============================================ 
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:256, ways:4, linesz:32 ,total:32768 

 ##### The CPU freq = 880 MHZ #### 
 estimate memory size =256 Mbytes
#Reset_MT7530
set LAN/WAN LLLLW
########BUTTON_RESET: 15

=================================================
Check image validation:hdr1_addr[bc180000]hdr2_addr[c0980000]
Image1 Header Magic Number --> OK
Image2 Header Magic Number --> OK
Image1 Header Checksum --> OK
Image2 Header Checksum --> OK
Image1 Data Checksum --> ..............................OK
..Erasing NAND Flash...
ranand_erase: start:80000, len:20000 
.Writing to NAND Flash...
done
Image2 Data Checksum --> ..............................OK
Image1 Stable Flag --> Stable
Image1 Try Counter --> 0

Image1: OK Image2: OK

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

Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   6: System Enter UBoot to Update Img or Bin. 
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 
default: 3

You choosed 3

\x08\x08\x08 0 
   
3: System Boot system code via Flash.
## Booting image at bc180000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.202
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1923375 Bytes =  1.8 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 4.14.202 (user@ubuntu) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r0+11228-78c4c04dd7)) #0 SMP Wed Oct 28 22:22:44 2020
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is D-Link DIR-2660 A1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    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-0x0000000007ffffff]
[    0.000000]   HighMem  empty
[    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] random: get_random_bytes called from start_kernel+0x94/0x4ac with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu s26192 r8192 d22960 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,57600 root=/dev/mtdblock4 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=00051d83
[    0.000000] Readback ErrCtl register=00051d83
[    0.000000] Memory: 122320K/131072K available (4545K kernel code, 235K rwdata, 1012K rodata, 1236K init, 248K bss, 8752K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.015495] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.087826] pid_max: default: 32768 minimum: 301
[    0.097134] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110157] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.125893] Hierarchical SRCU implementation.
[    0.135358] smp: Bringing up secondary CPUs ...
[    0.165489] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.165498] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.165509] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.165640] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.204730] Synchronize counters for CPU 1: done.
[    0.289236] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.289244] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.289251] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.289322] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.325558] Synchronize counters for CPU 2: done.
[    0.406309] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.406317] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.406323] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.406402] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.445130] Synchronize counters for CPU 3: done.
[    0.504728] smp: Brought up 1 node, 4 CPUs
[    0.516544] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.536011] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.548424] pinctrl core: initialized pinctrl subsystem
[    0.560040] NET: Registered protocol family 16
[    0.578890] pull PCIe RST: RALINK_RSTCTRL = 4000000
[    0.888898] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.898963] ***** Xtal 40MHz *****
[    0.905696] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.915899] Port 0 N_FTS = 1b102800
[    0.922801] Port 1 N_FTS = 1b102800
[    0.929725] Port 2 N_FTS = 1b102800
[    2.088438] PCIE2 no card, disable it(RST&CLK)
[    2.097128]  -> 21007f2
[    2.101952] PCIE0 enabled
[    2.107151] PCIE1 enabled
[    2.112330] PCI host bridge /pcie@1e140000 ranges:
[    2.121861]  MEM 0x0000000060000000..0x000000006fffffff
[    2.132218]   IO 0x000000001e160000..0x000000001e16ffff
[    2.142585] PCI coherence region base: 0xbfbf8000, mask/settings: 0x60000000
[    2.165460] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.176756] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.187959] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.200553] PCI host bridge to bus 0000:00
[    2.208563] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.222226] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    2.233970] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    2.247444] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    2.263912] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.279710] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.296840] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    2.309860] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.323687] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    2.336816] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.350639] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.364121] pci 0000:00:01.0: BAR 8: assigned [mem 0x60100000-0x601fffff]
[    2.377600] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[    2.391078] pci 0000:00:01.0: BAR 1: assigned [mem 0x60210000-0x6021ffff]
[    2.404568] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.419086] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.428905] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.442407] pci 0000:02:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit]
[    2.456925] pci 0000:00:01.0: PCI bridge to [bus 02]
[    2.466750] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff]
[    2.481616] clocksource: Switched to clocksource GIC
[    2.492933] NET: Registered protocol family 2
[    2.502251] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    2.515988] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    2.528588] TCP: Hash tables configured (established 1024 bind 1024)
[    2.541327] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.552829] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.565461] NET: Registered protocol family 1
[    2.811566] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    2.822894] Crashlog allocated RAM at address 0x3f00000
[    2.833415] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    2.848301] random: fast init done
[    2.858197] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.869693] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.892395] io scheduler noop registered
[    2.900043] io scheduler deadline registered (default)
[    2.911128] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    2.924835] console [ttyS0] disabled
[    2.931943] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    2.949836] console [ttyS0] enabled
[    2.949836] console [ttyS0] enabled
[    2.963627] bootconsole [early0] disabled
[    2.963627] bootconsole [early0] disabled
[    2.981688] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    2.995727] Enable NFI Clock
[    3.001446] # MTK NAND # : Use HW ECC
[    3.008758] Device not found, ID: eff1
[    3.016218] Not Support this Device! 
[    3.023678] chip_mode=00000001
[    3.029742] Support this Device in MTK table! eff1 
[    3.039635] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    3.052507] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[    3.065153] nand: Winbond NAND 128MiB 3,3V 8-bit
[    3.074346] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.089430] Scanning device for bad blocks
[    3.231380] 9 fixed-partitions partitions found on MTD device MT7621-NAND
[    3.244912] Creating 9 MTD partitions on "MT7621-NAND":
[    3.255325] 0x000000000000-0x000000080000 : "Bootloader"
[    3.266960] 0x000000080000-0x000000100000 : "config"
[    3.277905] 0x000000100000-0x000000140000 : "factory"
[    3.289011] 0x000000140000-0x000000180000 : "config2"
[    3.300111] 0x000000180000-0x000002980000 : "firmware"
[    3.323295] 2 sge-fw partitions found on MTD device firmware
[    3.334614] Creating 2 MTD partitions on "firmware":
[    3.344509] 0x000000000000-0x000000400000 : "kernel"
[    3.355464] 0x000000400000-0x000002800000 : "ubi"
[    3.366153] 0x000002980000-0x000004980000 : "private"
[    3.377481] 0x000004980000-0x000007180000 : "firmware2"
[    3.565025] 0x000007180000-0x000007780000 : "mydlink"
[    3.576237] 0x000007780000-0x000008000000 : "reserved"
[    3.587583] [mtk_nand] probe successfully!
[    3.596472] Signature matched and data read!
[    3.604979] load_fact_bbt success 1023
[    3.613190] libphy: Fixed MDIO Bus: probed
[    3.693391] mtk_soc_eth 1e100000.ethernet: generated random MAC address 4e:17:46:f4:32:9e
[    3.709858] libphy: mdio: probed
[    5.115852] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    5.128321] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
[    5.147202] NET: Registered protocol family 10
[    5.157567] Segment Routing with IPv6
[    5.165016] NET: Registered protocol family 17
[    5.173931] 8021q: 802.1Q VLAN Support v1.8
[    5.184999] UBI: auto-attach mtd6
[    5.191705] ubi0: attaching mtd6
[    5.528572] ubi0: scanning is finished
[    5.551003] ubi0: attached mtd6 (name "ubi", size 36 MiB)
[    5.561827] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    5.575522] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    5.589035] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    5.602906] ubi0: good PEBs: 288, bad PEBs: 0, corrupted PEBs: 0
[    5.614869] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    5.629248] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 985793009
[    5.647262] ubi0: available PEBs: 0, total reserved PEBs: 288, PEBs reserved for bad PEB handling: 20
[    5.665644] ubi0: background thread "ubi_bgt0d" started, PID 375
[    5.667599] block ubiblock0_0: created from ubi0:0(rootfs)
[    5.688567] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    5.702440] hctosys: unable to open rtc device (rtc0)
[    5.716781] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x0527 instead
[    5.735684] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0xbbba instead
[    5.754554] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0x995f instead
[    5.773428] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0x1d00 instead

===========================================
		cut
===========================================

[   56.988778] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x027e0820: 0xa1e8 instead
[   57.007647] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x027e083c: 0x5b8b instead
[   57.026619] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x027e100c: 0x0001 instead
[   57.045482] jffs2: Further such events for this erase block will not be printed
[   57.091314] jffs2: Cowardly refusing to erase blocks on filesystem with no valid JFFS2 nodes
[   57.108117] jffs2: empty_blocks 0, bad_blocks 0, c->nr_blocks 320
[   57.120520] VFS: Cannot open root device "mtdblock4" or unknown-block(31,4): error -5
[   57.136128] Please append a correct "root=" boot option; here are the available partitions:
[   57.152766] 1f00             512 mtdblock0 
[   57.152772]  (driver?)
[   57.165770] 1f01             512 mtdblock1 
[   57.165774]  (driver?)
[   57.178770] 1f02             256 mtdblock2 
[   57.178774]  (driver?)
[   57.191781] 1f03             256 mtdblock3 
[   57.191785]  (driver?)
[   57.204781] 1f04           40960 mtdblock4 
[   57.204786]  (driver?)
[   57.217781] 1f05            4096 mtdblock5 
[   57.217786]  (driver?)
[   57.230780] 1f06           36864 mtdblock6 
[   57.230784]  (driver?)
[   57.243798] 1f07           32768 mtdblock7 
[   57.243802]  (driver?)
[   57.256799] 1f08           40960 mtdblock8 
[   57.256803]  (driver?)
[   57.269797] 1f09            6144 mtdblock9 
[   57.269802]  (driver?)
[   57.282810] 1f0a            8704 mtdblock10 
[   57.282814]  (driver?)
[   57.295983] fe00            2356 ubiblock0_0 
[   57.295988]  (driver?)
[   57.309329] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,4)
[   57.334041] Rebooting in 1 seconds..

Can you please post a "git diff" to see the changes you have made?

The file has about 100kB, how can I upload that?

@Lucky1 looks like you were right, changing the mtdsplit driver was a good one, I forgot to remove "root=" from boot args and now it's booting successfully :smiley:
No network for now, not sure why, maybe because the MAC address is randomized?
Tried to set static IP to point to 192.168.1.1 like in the official OpenWRT build but no response to ping


===================================================================
                MT7621   stage1 code 10:33:11 (ASIC)
                CPU=50000000 HZ BUS=16666666 HZ
==================================================================
Change MPLL source from XTAL to CR...
do MEMPLL setting..
MEMPLL Config : 0x11100000
3PLL mode + External loopback
=== XTAL-40Mhz === DDR-1200Mhz ===
PLL3 FB_DL: 0x0, 1/0 = 819/205 01000000
PLL2 FB_DL: 0x14, 1/0 = 707/317 51000000
PLL4 FB_DL: 0x18, 1/0 = 574/450 61000000
do DDR setting..[00320381]
Apply DDR3 Setting...(use customer AC)
          0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120
      --------------------------------------------------------------------------------
0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0007:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0008:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0009:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000E:|    0    0    0    0    0    0    0    0    0    0    1    1    1    1    1    1
000F:|    0    0    0    0    0    1    1    1    1    1    1    1    1    1    1    0
0010:|    1    1    1    1    1    1    1    1    1    1    0    0    0    0    0    0
0011:|    1    1    1    1    1    0    0    0    0    0    0    0    0    0    0    0
0012:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0013:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0014:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
rank 0 coarse = 16
rank 0 fine = 40
B:|    0    0    0    0    0    0    0    1    1    1    0    0    0    0    0    0
opt_dle value:8
DRAMC_R0DELDLY[018]=00002020
==================================================================
                RX      DQS perbit delay software calibration 
==================================================================
1.0-15 bit dq delay value
==================================================================
bit|     0  1  2  3  4  5  6  7  8  9
--------------------------------------
0 |    8 7 7 9 7 7 7 6 6 6 
10 |    7 9 9 9 7 7 
--------------------------------------

==================================================================
2.dqs window
x=pass dqs delay value (min~max)center 
y=0-7bit DQ of every group
input delay:DQS0 =32 DQS1 = 32
==================================================================
bit     DQS0     bit      DQS1
0  (1~61)31  8  (2~60)31
1  (1~62)31  9  (1~60)30
2  (1~58)29  10  (1~62)31
3  (1~62)31  11  (2~60)31
4  (1~61)31  12  (1~64)32
5  (1~63)32  13  (1~60)30
6  (1~59)30  14  (1~62)31
7  (1~62)31  15  (1~58)29
==================================================================
3.dq delay value last
==================================================================
bit|    0  1  2  3  4  5  6  7  8   9
--------------------------------------
0 |    9 8 10 10 8 7 9 7 7 8 
10 |    8 10 9 11 8 10 
==================================================================
==================================================================
     TX  perbyte calibration 
==================================================================
DQS loop = 15, cmp_err_1 = ffff0000 
dqs_perbyte_dly.last_dqsdly_pass[0]=15,  finish count=1 
dqs_perbyte_dly.last_dqsdly_pass[1]=15,  finish count=2 
DQ loop=15, cmp_err_1 = ffff0080
dqs_perbyte_dly.last_dqdly_pass[1]=15,  finish count=1 
DQ loop=14, cmp_err_1 = ffff0000
dqs_perbyte_dly.last_dqdly_pass[0]=14,  finish count=2 
byte:0, (DQS,DQ)=(8,8)
byte:1, (DQS,DQ)=(8,8)
20,data:88
[EMI] DRAMC calibration passed

===================================================================
                MT7621   stage1 code done 
                CPU=50000000 HZ BUS=16666666 HZ
===================================================================


U-Boot 1.1.3 (Apr 25 2019 - 14:00:06)

Board: Ralink APSoC DRAM:  256 MB
relocate_code Pointer at: 8ffa8000

Config XHCI 40M PLL 
Allocate 16 byte aligned buffer: 8ffdfdb0
Enable NFI Clock
# MTK NAND # : Use HW ECC
NAND ID [EF F1 00 95 00]
Device not found, ID: eff1
Not Support this Device! 
chip_mode=00000001
Support this Device in MTK table! eff1 
select_chip
[NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
Signature matched and data read!
load_fact_bbt success 1023
load fact bbt success
[mtk_nand] probe successfully!
mtd->writesize=2048 mtd->oobsize=64,    mtd->erasesize=131072  devinfo.iowidth=8
..============================================ 
Ralink UBoot Version: 5.0.0.0
-------------------------------------------- 
ASIC MT7621A DualCore (MAC to MT7530 Mode)
DRAM_CONF_FROM: Auto-Detection 
DRAM_TYPE: DDR3 
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: 4 MBytes NOR Flash
Date:Apr 25 2019  Time:14:00:06
============================================ 
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:256, ways:4, linesz:32 ,total:32768 

 ##### The CPU freq = 880 MHZ #### 
 estimate memory size =256 Mbytes
#Reset_MT7530
set LAN/WAN LLLLW
########BUTTON_RESET: 15

=================================================
Check image validation:hdr1_addr[bc180000]hdr2_addr[c0980000]
Image1 Header Magic Number --> OK
Image2 Header Magic Number --> OK
Image1 Header Checksum --> OK
Image2 Header Checksum --> OK
Image1 Data Checksum --> ..............................OK
..Erasing NAND Flash...
ranand_erase: start:80000, len:20000 
.Writing to NAND Flash...
done
Image2 Data Checksum --> ..............................OK
Image1 Stable Flag --> Stable
Image1 Try Counter --> 0

Image1: OK Image2: OK

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

Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   6: System Enter UBoot to Update Img or Bin. 
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 
default: 3

You choosed 3

\x08\x08\x08 0 
   
3: System Boot system code via Flash.
## Booting image at bc180000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.202
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1923364 Bytes =  1.8 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 4.14.202 (user@ubuntu) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r0+11228-78c4c04dd7)) #0 SMP Wed Oct 28 22:22:44 2020
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is D-Link DIR-2660 A1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 10000000 @ 00000000 (usable)
[    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] random: get_random_bytes called from start_kernel+0x94/0x4ac with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu s26192 r8192 d22960 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Writing ErrCtl register=00011d83
[    0.000000] Readback ErrCtl register=00011d83
[    0.000000] Memory: 252272K/262144K available (4545K kernel code, 235K rwdata, 1012K rodata, 1236K init, 248K bss, 9872K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.015491] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.087818] pid_max: default: 32768 minimum: 301
[    0.097121] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110142] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.125805] Hierarchical SRCU implementation.
[    0.135211] smp: Bringing up secondary CPUs ...
[    0.165315] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.165324] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.165334] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.165461] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.204607] Synchronize counters for CPU 1: done.
[    0.288650] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.288657] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.288664] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.288737] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.325179] Synchronize counters for CPU 2: done.
[    0.405928] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.405936] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.405943] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.406023] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.444750] Synchronize counters for CPU 3: done.
[    0.504349] smp: Brought up 1 node, 4 CPUs
[    0.516148] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.535612] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.548028] pinctrl core: initialized pinctrl subsystem
[    0.559642] NET: Registered protocol family 16
[    0.578064] pull PCIe RST: RALINK_RSTCTRL = 4000000
[    0.888067] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.898132] ***** Xtal 40MHz *****
[    0.904865] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.915069] Port 0 N_FTS = 1b102800
[    0.921970] Port 1 N_FTS = 1b102800
[    0.928894] Port 2 N_FTS = 1b102800
[    2.087606] PCIE2 no card, disable it(RST&CLK)
[    2.096295]  -> 21007f2
[    2.101116] PCIE0 enabled
[    2.106317] PCIE1 enabled
[    2.111500] PCI host bridge /pcie@1e140000 ranges:
[    2.121020]  MEM 0x0000000060000000..0x000000006fffffff
[    2.131382]   IO 0x000000001e160000..0x000000001e16ffff
[    2.141748] PCI coherence region base: 0xbfbf8000, mask/settings: 0x60000000
[    2.164610] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.175851] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.187028] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.199352] PCI host bridge to bus 0000:00
[    2.207367] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.221040] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    2.232768] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    2.246266] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    2.262700] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.278504] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.295500] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    2.308536] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.322345] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    2.335486] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.349302] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.362780] pci 0000:00:01.0: BAR 8: assigned [mem 0x60100000-0x601fffff]
[    2.376267] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[    2.389742] pci 0000:00:01.0: BAR 1: assigned [mem 0x60210000-0x6021ffff]
[    2.403226] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.417745] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.427561] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.441073] pci 0000:02:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit]
[    2.455583] pci 0000:00:01.0: PCI bridge to [bus 02]
[    2.465409] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff]
[    2.480086] clocksource: Switched to clocksource GIC
[    2.491209] NET: Registered protocol family 2
[    2.500516] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    2.514272] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    2.527059] TCP: Hash tables configured (established 2048 bind 2048)
[    2.539770] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.551282] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.563924] NET: Registered protocol family 1
[    2.810041] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    2.821088] Crashlog allocated RAM at address 0x3f00000
[    2.831593] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    2.850226] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.861701] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.882932] random: fast init done
[    2.890319] io scheduler noop registered
[    2.897962] io scheduler deadline registered (default)
[    2.909072] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    2.922681] console [ttyS0] disabled
[    2.929686] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    2.947755] console [ttyS0] enabled
[    2.947755] console [ttyS0] enabled
[    2.961470] bootconsole [early0] disabled
[    2.961470] bootconsole [early0] disabled
[    2.979385] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    2.993413] Enable NFI Clock
[    2.999133] # MTK NAND # : Use HW ECC
[    3.006451] Device not found, ID: eff1
[    3.013915] Not Support this Device! 
[    3.021387] chip_mode=00000001
[    3.027452] Support this Device in MTK table! eff1 
[    3.037340] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    3.050215] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[    3.062867] nand: Winbond NAND 128MiB 3,3V 8-bit
[    3.072061] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.087149] Scanning device for bad blocks
[    3.229134] 9 fixed-partitions partitions found on MTD device MT7621-NAND
[    3.242652] Creating 9 MTD partitions on "MT7621-NAND":
[    3.253069] 0x000000000000-0x000000080000 : "Bootloader"
[    3.264602] 0x000000080000-0x000000100000 : "config"
[    3.275353] 0x000000100000-0x000000140000 : "factory"
[    3.286275] 0x000000140000-0x000000180000 : "config2"
[    3.297188] 0x000000180000-0x000002980000 : "firmware"
[    3.320241] 2 sge-fw partitions found on MTD device firmware
[    3.331516] Creating 2 MTD partitions on "firmware":
[    3.341414] 0x000000000000-0x000000400000 : "kernel"
[    3.352441] 0x000000400000-0x000002800000 : "ubi"
[    3.363139] 0x000002980000-0x000004980000 : "private"
[    3.374444] 0x000004980000-0x000007180000 : "firmware2"
[    3.561893] 0x000007180000-0x000007780000 : "mydlink"
[    3.573151] 0x000007780000-0x000008000000 : "reserved"
[    3.584481] [mtk_nand] probe successfully!
[    3.593361] Signature matched and data read!
[    3.601856] load_fact_bbt success 1023
[    3.610084] libphy: Fixed MDIO Bus: probed
[    3.681856] mtk_soc_eth 1e100000.ethernet: generated random MAC address 1a:00:f9:01:66:b6
[    3.698303] libphy: mdio: probed
[    5.104260] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    5.116721] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
[    5.135845] NET: Registered protocol family 10
[    5.146242] Segment Routing with IPv6
[    5.153642] NET: Registered protocol family 17
[    5.162542] 8021q: 802.1Q VLAN Support v1.8
[    5.173672] UBI: auto-attach mtd6
[    5.180329] ubi0: attaching mtd6
[    5.516934] ubi0: scanning is finished
[    5.539349] ubi0: attached mtd6 (name "ubi", size 36 MiB)
[    5.550121] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    5.563802] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    5.577309] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    5.591166] ubi0: good PEBs: 288, bad PEBs: 0, corrupted PEBs: 0
[    5.603117] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    5.617491] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1593466960
[    5.635667] ubi0: available PEBs: 0, total reserved PEBs: 288, PEBs reserved for bad PEB handling: 20
[    5.654041] ubi0: background thread "ubi_bgt0d" started, PID 377
[    5.655913] block ubiblock0_0: created from ubi0:0(rootfs)
[    5.676969] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    5.690839] hctosys: unable to open rtc device (rtc0)
[    5.707270] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    5.725797] Freeing unused kernel memory: 1236K
[    5.734845] This architecture does not have kernel memory protection.
[    6.284807] init: Console is alive
[    6.291945] init: - watchdog -
[    6.926332] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    7.022271] usbcore: registered new interface driver usbfs
[    7.033323] usbcore: registered new interface driver hub
[    7.044071] usbcore: registered new device driver usb
[    7.061635] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vbus not found, using dummy regulator
[    7.078904] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vusb33 not found, using dummy regulator
[    7.096580] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    7.107191] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    7.130242] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    7.148525] xhci-mtk 1e1c0000.xhci: irq 20, io mem 0x1e1c0000
[    7.160963] hub 1-0:1.0: USB hub found
[    7.168500] hub 1-0:1.0: 2 ports detected
[    7.177156] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    7.187792] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    7.202712] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0  SuperSpeed
[    7.215726] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    7.232693] hub 2-0:1.0: USB hub found
[    7.240284] hub 2-0:1.0: 1 port detected
[    7.253361] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.270440] init: - preinit -
[    7.853652] mtk_soc_eth 1e100000.ethernet eth0: port 0 link up
[    7.927105] mtk_soc_eth 1e100000.ethernet: PPE started
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[    8.006773] random: procd: uninitialized urandom read (4 bytes read)
 level
[   11.141764] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 482
[   11.214616] UBIFS (ubi0:1): recovery needed
[   11.405673] UBIFS (ubi0:1): recovery completed
[   11.414692] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   11.430284] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   11.450021] UBIFS (ubi0:1): FS size: 29839360 bytes (28 MiB, 235 LEBs), journal size 1523712 bytes (1 MiB, 12 LEBs)
[   11.470806] UBIFS (ubi0:1): reserved for root: 1409386 bytes (1376 KiB)
[   11.483978] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID 4D2CBCF9-B759-42C7-9809-137EB2EFA77E, small LPT model
[   11.508953] mount_root: switching to ubifs overlay
[   11.540353] urandom-seed: Seeding with /etc/urandom.seed
[   11.632715] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x6060000c, 0x10c = 0x80818
[   11.654643] procd: - early -
[   11.660536] procd: - watchdog -
[   12.330240] procd: - watchdog -
[   12.336809] procd: - ubus -
[   12.367039] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.400885] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.413939] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.427519] procd: - init -
Please press Enter to activate this console.
[   12.840301] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.857764] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.876292] Loading modules backported from Linux version v4.19.137-0-gc076c79e03c6
[   12.891686] Backport generated by backports.git v4.19.137-1-0-g60c3a249
[   12.906864] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.923924] nf_conntrack version 0.5.0 (4096 buckets, 16384 max)
[   12.971293] xt_time: kernel timezone is -0000
[   13.039267] bus=0x1, slot = 0x0, irq=0x0
[   13.047157] PCI: Enabling device 0000:00:00.0 (0004 -> 0006)
[   13.080803] mt7615e 0000:01:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   13.080803] 
[   13.093691] urngd: v1.0.2 started.
[   13.264257] random: crng init done
[   13.271058] random: 6 urandom warning(s) missed due to ratelimiting
[   13.328130] mt7615e 0000:01:00.0: N9 Firmware Version: _reserved_, Build Time: 20190103180756
[   13.352132] mt7615e 0000:01:00.0: CR4 Firmware Version: _reserved_, Build Time: 20181207140436
[   21.016337] bus=0x2, slot = 0x1, irq=0x0
[   21.024245] PCI: Enabling device 0000:00:01.0 (0004 -> 0006)
[   21.060602] mt7615e 0000:02:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   21.060602] 
[   21.095140] mt7615e 0000:02:00.0: N9 Firmware Version: _reserved_, Build Time: 20190103180756
[   21.119398] mt7615e 0000:02:00.0: CR4 Firmware Version: _reserved_, Build Time: 20181207140436
[   28.787850] PPP generic driver version 2.4.2
[   28.798179] NET: Registered protocol family 24
[   28.810288] kmodloader: done loading kernel modules from /etc/modules.d/*
[   32.983094] mtk_soc_eth 1e100000.ethernet: PPE started
[   32.999181] device eth0 entered promiscuous mode
[   33.009336] br-lan: port 1(eth0.1) entered blocking state
[   33.020485] br-lan: port 1(eth0.1) entered disabled state
[   33.031788] device eth0.1 entered promiscuous mode
[   33.044839] br-lan: port 1(eth0.1) entered blocking state
[   33.055646] br-lan: port 1(eth0.1) entered forwarding state
[   33.067210] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   34.050641] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready

No don't worry i just realised you posted everything above (for some reason I missed it before)

Did you define the switch in this file?

You are right, I didn't :sweat_smile:
Need to read a little :slight_smile:

You can just add it next to the DIR-860. I am sure it would be the same (check the ports if you use luci to check if they are the correct numbers).

Also you might need to add this to your DTS to get the correct MAC address
EDIT: it might be 0xe0000

&ethernet {
   
mtd-mac-address = <&factory 0xe0000>;

};

Thanks @kar200, will let you know how the tests will go after compiling all of that

Looks like it's pretty close but somehow the ping won't reach it when the static IP address is set, DHCP doesn't work. I added my board next to DIR-860

===================================================================
                MT7621   stage1 code 10:33:11 (ASIC)
                CPU=50000000 HZ BUS=16666666 HZ
==================================================================
Change MPLL source from XTAL to CR...
do MEMPLL setting..
MEMPLL Config : 0x11100000
3PLL mode + External loopback
=== XTAL-40Mhz === DDR-1200Mhz ===
PLL3 FB_DL: 0x0, 1/0 = 885/139 01000000
PLL2 FB_DL: 0x13, 1/0 = 566/458 4D000000
PLL4 FB_DL: 0x18, 1/0 = 636/388 61000000
do DDR setting..[00320381]
Apply DDR3 Setting...(use customer AC)
          0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120
      --------------------------------------------------------------------------------
0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0007:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0008:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0009:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000E:|    0    0    0    0    0    0    0    0    0    0    1    1    1    1    1    1
000F:|    0    0    0    0    0    1    1    1    1    1    1    1    1    1    1    0
0010:|    1    1    1    1    1    1    1    1    1    1    0    0    0    0    0    0
0011:|    1    1    1    1    1    0    0    0    0    0    0    0    0    0    0    0
0012:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0013:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0014:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
rank 0 coarse = 16
rank 0 fine = 40
B:|    0    0    0    0    0    0    0    0    1    1    1    0    0    0    0    0
opt_dle value:9
DRAMC_R0DELDLY[018]=0000201F
==================================================================
                RX      DQS perbit delay software calibration 
==================================================================
1.0-15 bit dq delay value
==================================================================
bit|     0  1  2  3  4  5  6  7  8  9
--------------------------------------
0 |    8 7 7 9 7 7 7 6 6 6 
10 |    7 8 9 9 7 7 
--------------------------------------

==================================================================
2.dqs window
x=pass dqs delay value (min~max)center 
y=0-7bit DQ of every group
input delay:DQS0 =31 DQS1 = 32
==================================================================
bit     DQS0     bit      DQS1
0  (1~59)30  8  (2~60)31
1  (1~61)31  9  (1~59)30
2  (1~60)30  10  (1~60)30
3  (1~61)31  11  (1~57)29
4  (1~61)31  12  (1~63)32
5  (1~62)31  13  (1~60)30
6  (1~58)29  14  (1~62)31
7  (1~61)31  15  (1~58)29
==================================================================
3.dq delay value last
==================================================================
bit|    0  1  2  3  4  5  6  7  8   9
--------------------------------------
0 |    9 7 8 9 7 7 9 6 7 8 
10 |    9 11 9 11 8 10 
==================================================================
==================================================================
     TX  perbyte calibration 
==================================================================
DQS loop = 15, cmp_err_1 = ffff0000 
dqs_perbyte_dly.last_dqsdly_pass[0]=15,  finish count=1 
dqs_perbyte_dly.last_dqsdly_pass[1]=15,  finish count=2 
DQ loop=15, cmp_err_1 = ffff0080
dqs_perbyte_dly.last_dqdly_pass[1]=15,  finish count=1 
DQ loop=14, cmp_err_1 = ffff0000
dqs_perbyte_dly.last_dqdly_pass[0]=14,  finish count=2 
byte:0, (DQS,DQ)=(8,8)
byte:1, (DQS,DQ)=(8,8)
20,data:88
[EMI] DRAMC calibration passed

===================================================================
                MT7621   stage1 code done 
                CPU=50000000 HZ BUS=16666666 HZ
===================================================================


U-Boot 1.1.3 (Apr 25 2019 - 14:00:06)

Board: Ralink APSoC DRAM:  256 MB
relocate_code Pointer at: 8ffa8000

Config XHCI 40M PLL 
Allocate 16 byte aligned buffer: 8ffdfdb0
Enable NFI Clock
# MTK NAND # : Use HW ECC
NAND ID [EF F1 00 95 00]
Device not found, ID: eff1
Not Support this Device! 
chip_mode=00000001
Support this Device in MTK table! eff1 
select_chip
[NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
Signature matched and data read!
load_fact_bbt success 1023
load fact bbt success
[mtk_nand] probe successfully!
mtd->writesize=2048 mtd->oobsize=64, mtd->erasesize=131072  devinfo.iowidth=8
..============================================ 
Ralink UBoot Version: 5.0.0.0
-------------------------------------------- 
ASIC MT7621A DualCore (MAC to MT7530 Mode)
DRAM_CONF_FROM: Auto-Detection 
DRAM_TYPE: DDR3 
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: 4 MBytes NOR Flash
Date:Apr 25 2019  Time:14:00:06
============================================ 
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:256, ways:4, linesz:32 ,total:32768 

 ##### The CPU freq = 880 MHZ #### 
 estimate memory size =256 Mbytes
#Reset_MT7530
set LAN/WAN LLLLW
########BUTTON_RESET: 15

=================================================
Check image validation:hdr1_addr[bc180000]hdr2_addr[c0980000]
Image1 Header Magic Number --> OK
Image2 Header Magic Number --> OK
Image1 Header Checksum --> OK
Image2 Header Checksum --> OK
Image1 Data Checksum --> ..............................OK
..Erasing NAND Flash...
ranand_erase: start:80000, len:20000 
.Writing to NAND Flash...
done
Image2 Data Checksum --> ..............................OK
Image1 Stable Flag --> Stable
Image1 Try Counter --> 0

Image1: OK Image2: OK

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

Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   6: System Enter UBoot to Update Img or Bin. 
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 
default: 3
\x08\x08\x08 0 
   
3: System Boot system code via Flash.
## Booting image at bc180000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.202
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1923372 Bytes =  1.8 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 4.14.202 (user@ubuntu) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r0+11228-78c4c04dd7)) #0 SMP Wed Oct 28 22:22:44 2020
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is D-Link DIR-2660 A1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 10000000 @ 00000000 (usable)
[    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] random: get_random_bytes called from start_kernel+0x94/0x4ac with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu s26192 r8192 d22960 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Writing ErrCtl register=00011981
[    0.000000] Readback ErrCtl register=00011981
[    0.000000] Memory: 252272K/262144K available (4545K kernel code, 235K rwdata, 1012K rodata, 1236K init, 248K bss, 9872K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.015496] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.087826] pid_max: default: 32768 minimum: 301
[    0.097135] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110158] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.125892] Hierarchical SRCU implementation.
[    0.135360] smp: Bringing up secondary CPUs ...
[    0.157233] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.157242] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.157253] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.157384] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.204731] Synchronize counters for CPU 1: done.
[    0.281000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.281007] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.281014] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.281087] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.325583] Synchronize counters for CPU 2: done.
[    0.398075] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.398083] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.398089] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.398170] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.445153] Synchronize counters for CPU 3: done.
[    0.504753] smp: Brought up 1 node, 4 CPUs
[    0.516571] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.536039] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.548455] pinctrl core: initialized pinctrl subsystem
[    0.560015] NET: Registered protocol family 16
[    0.578091] pull PCIe RST: RALINK_RSTCTRL = 4000000
[    0.888094] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.898159] ***** Xtal 40MHz *****
[    0.904892] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.915096] Port 0 N_FTS = 1b102800
[    0.921998] Port 1 N_FTS = 1b102800
[    0.928921] Port 2 N_FTS = 1b102800
[    2.087635] PCIE2 no card, disable it(RST&CLK)
[    2.096324]  -> 21007f2
[    2.101145] PCIE0 enabled
[    2.106347] PCIE1 enabled
[    2.111525] PCI host bridge /pcie@1e140000 ranges:
[    2.121049]  MEM 0x0000000060000000..0x000000006fffffff
[    2.131412]   IO 0x000000001e160000..0x000000001e16ffff
[    2.141778] PCI coherence region base: 0xbfbf8000, mask/settings: 0x60000000
[    2.164522] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.175775] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.187004] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.199546] PCI host bridge to bus 0000:00
[    2.207566] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.221237] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    2.232966] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    2.246459] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    2.262886] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.278686] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.295691] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    2.308724] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.322535] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    2.335675] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.349492] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.362969] pci 0000:00:01.0: BAR 8: assigned [mem 0x60100000-0x601fffff]
[    2.376457] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[    2.389932] pci 0000:00:01.0: BAR 1: assigned [mem 0x60210000-0x6021ffff]
[    2.403414] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.417934] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.427750] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.441262] pci 0000:02:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit]
[    2.455772] pci 0000:00:01.0: PCI bridge to [bus 02]
[    2.465598] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff]
[    2.480273] clocksource: Switched to clocksource GIC
[    2.491418] NET: Registered protocol family 2
[    2.500729] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    2.514485] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    2.527273] TCP: Hash tables configured (established 2048 bind 2048)
[    2.539983] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.551495] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.564143] NET: Registered protocol family 1
[    2.810223] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    2.821416] Crashlog allocated RAM at address 0x3f00000
[    2.831931] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    2.850614] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.862092] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.883284] random: fast init done
[    2.884628] io scheduler noop registered
[    2.897721] io scheduler deadline registered (default)
[    2.908705] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    2.922569] console [ttyS0] disabled
[    2.929576] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    2.947608] console [ttyS0] enabled
[    2.947608] console [ttyS0] enabled
[    2.961349] bootconsole [early0] disabled
[    2.961349] bootconsole [early0] disabled
[    2.979091] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    2.993127] Enable NFI Clock
[    2.998849] # MTK NAND # : Use HW ECC
[    3.006162] Device not found, ID: eff1
[    3.013624] Not Support this Device! 
[    3.021085] chip_mode=00000001
[    3.027148] Support this Device in MTK table! eff1 
[    3.037042] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    3.049912] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[    3.062561] nand: Winbond NAND 128MiB 3,3V 8-bit
[    3.071755] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.086837] Scanning device for bad blocks
[    3.228751] 9 fixed-partitions partitions found on MTD device MT7621-NAND
[    3.242268] Creating 9 MTD partitions on "MT7621-NAND":
[    3.252678] 0x000000000000-0x000000080000 : "Bootloader"
[    3.264189] 0x000000080000-0x000000100000 : "config"
[    3.274939] 0x000000100000-0x000000140000 : "factory"
[    3.285849] 0x000000140000-0x000000180000 : "config2"
[    3.296767] 0x000000180000-0x000002980000 : "firmware"
[    3.319760] 2 sge-fw partitions found on MTD device firmware
[    3.331068] Creating 2 MTD partitions on "firmware":
[    3.340958] 0x000000000000-0x000000400000 : "kernel"
[    3.351814] 0x000000400000-0x000002800000 : "ubi"
[    3.362309] 0x000002980000-0x000004980000 : "private"
[    3.373475] 0x000004980000-0x000007180000 : "firmware2"
[    3.560817] 0x000007180000-0x000007780000 : "mydlink"
[    3.571842] 0x000007780000-0x000008000000 : "reserved"
[    3.583017] [mtk_nand] probe successfully!
[    3.591905] Signature matched and data read!
[    3.600408] load_fact_bbt success 1023
[    3.608458] libphy: Fixed MDIO Bus: probed
[    3.682211] libphy: mdio: probed
[    5.088250] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    5.100824] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
[    5.119793] NET: Registered protocol family 10
[    5.130126] Segment Routing with IPv6
[    5.137549] NET: Registered protocol family 17
[    5.146453] 8021q: 802.1Q VLAN Support v1.8
[    5.157640] UBI: auto-attach mtd6
[    5.164303] ubi0: attaching mtd6
[    5.501083] ubi0: scanning is finished
[    5.523536] ubi0: attached mtd6 (name "ubi", size 36 MiB)
[    5.534311] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    5.547993] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    5.561505] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    5.575358] ubi0: good PEBs: 288, bad PEBs: 0, corrupted PEBs: 0
[    5.587311] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    5.601689] ubi0: max/mean erase counter: 2/0, WL threshold: 4096, image sequence number: 266538893
[    5.619690] ubi0: available PEBs: 0, total reserved PEBs: 288, PEBs reserved for bad PEB handling: 20
[    5.638062] ubi0: background thread "ubi_bgt0d" started, PID 375
[    5.639760] block ubiblock0_0: created from ubi0:0(rootfs)
[    5.660958] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    5.674823] hctosys: unable to open rtc device (rtc0)
[    5.691323] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    5.709706] Freeing unused kernel memory: 1236K
[    5.718773] This architecture does not have kernel memory protection.
[    6.268670] init: Console is alive
[    6.275783] init: - watchdog -
[    6.911359] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    7.007167] usbcore: registered new interface driver usbfs
[    7.018256] usbcore: registered new interface driver hub
[    7.029010] usbcore: registered new device driver usb
[    7.046627] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vbus not found, using dummy regulator
[    7.063939] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vusb33 not found, using dummy regulator
[    7.081628] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    7.092268] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    7.110408] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    7.128695] xhci-mtk 1e1c0000.xhci: irq 20, io mem 0x1e1c0000
[    7.141193] hub 1-0:1.0: USB hub found
[    7.148729] hub 1-0:1.0: 2 ports detected
[    7.157342] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    7.167987] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    7.182914] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0  SuperSpeed
[    7.195942] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    7.212940] hub 2-0:1.0: USB hub found
[    7.220557] hub 2-0:1.0: 1 port detected
[    7.233363] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.260617] init: - preinit -
[    7.890979] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[    7.917844] mtk_soc_eth 1e100000.ethernet: PPE started
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[    7.997563] random: procd: uninitialized urandom read (4 bytes read)
 level
[   11.142093] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 481
[   11.214986] UBIFS (ubi0:1): recovery needed
[   11.389368] UBIFS (ubi0:1): recovery completed
[   11.398377] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   11.413973] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   11.433708] UBIFS (ubi0:1): FS size: 29839360 bytes (28 MiB, 235 LEBs), journal size 1523712 bytes (1 MiB, 12 LEBs)
[   11.454476] UBIFS (ubi0:1): reserved for root: 1409386 bytes (1376 KiB)
[   11.467642] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID 17150FEE-C328-44A3-B7ED-B4574615CBA9, small LPT model
[   11.493766] mount_root: switching to ubifs overlay
[   11.528491] urandom-seed: Seeding with /etc/urandom.seed
[   11.624626] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x6060000c, 0x10c = 0x80818
[   11.646544] procd: - early -
[   11.652412] procd: - watchdog -
[   12.310425] procd: - watchdog -
[   12.316997] procd: - ubus -
[   12.346616] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.381070] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.394138] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.407727] procd: - init -
Please press Enter to activate this console.
[   12.833581] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.851244] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.869923] Loading modules backported from Linux version v4.19.137-0-gc076c79e03c6
[   12.885209] Backport generated by backports.git v4.19.137-1-0-g60c3a249
[   12.900394] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.917614] nf_conntrack version 0.5.0 (4096 buckets, 16384 max)
[   12.969126] xt_time: kernel timezone is -0000
[   13.040594] bus=0x1, slot = 0x0, irq=0x0
[   13.048440] PCI: Enabling device 0000:00:00.0 (0004 -> 0006)
[   13.080892] mt7615e 0000:01:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   13.080892] 
[   13.085506] urngd: v1.0.2 started.
[   13.264358] random: crng init done
[   13.271159] random: 6 urandom warning(s) missed due to ratelimiting
[   13.339187] mt7615e 0000:01:00.0: N9 Firmware Version: _reserved_, Build Time: 20190103180756
[   13.364136] mt7615e 0000:01:00.0: CR4 Firmware Version: _reserved_, Build Time: 20181207140436
[   21.024659] bus=0x2, slot = 0x1, irq=0x0
[   21.032565] PCI: Enabling device 0000:00:01.0 (0004 -> 0006)
[   21.060758] mt7615e 0000:02:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   21.060758] 
[   21.095568] mt7615e 0000:02:00.0: N9 Firmware Version: _reserved_, Build Time: 20190103180756
[   21.119851] mt7615e 0000:02:00.0: CR4 Firmware Version: _reserved_, Build Time: 20181207140436
[   28.785206] PPP generic driver version 2.4.2
[   28.795306] NET: Registered protocol family 24
[   28.807033] kmodloader: done loading kernel modules from /etc/modules.d/*
[   32.921402] mtk_soc_eth 1e100000.ethernet: PPE started
[   32.936625] br-lan: port 1(eth0.1) entered blocking state
[   32.947462] br-lan: port 1(eth0.1) entered disabled state
[   32.958949] device eth0.1 entered promiscuous mode
[   32.968722] device eth0 entered promiscuous mode
[   32.981540] br-lan: port 1(eth0.1) entered blocking state
[   32.992339] br-lan: port 1(eth0.1) entered forwarding state
[   33.003903] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   33.970831] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready



BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 19.07-SNAPSHOT, r0+11228-78c4c04dd7
 -----------------------------------------------------
=== 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.
--------------------------------------------------
root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr 30:E9:53:80:80:44  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::32e9:53ff:fe80:8044/64 Scope:Link
          inet6 addr: fdf4:ea98:75e5::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:1784 (1.7 KiB)

eth0      Link encap:Ethernet  HWaddr 30:E9:53:80:80:44  
          inet6 addr: fe80::32e9:53ff:fe80:8044/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:44 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:7423 (7.2 KiB)
          Interrupt:21 

eth0.1    Link encap:Ethernet  HWaddr 30:E9:53:80:80:44  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:1784 (1.7 KiB)

eth0.2    Link encap:Ethernet  HWaddr 30:E9:53:80:80:45  
          inet6 addr: fe80::32e9:53ff:fe80:8045/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:18 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:2958 (2.8 KiB)

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:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:816 (816.0 B)  TX bytes:816 (816.0 B)

root@OpenWrt:/# ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes


that's good to hear
kar200 is setting you on the right track
have to change it back to switch config form DSA
network was
ucidef_add_switch "switch0"
"0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0"
wan_mac=$(mtd_get_mac_binary factory 57350)
dts had
&ethernet {
mtd-mac-address = <&factory 0xe000>;
};

1 Like

Can you please pase the file "/etc/config/network"?

So I just applied the changes that you suggested @Lucky1 and still the same but at the end of file looks like it sees now the link, I unplugged the cable from LAN1, re-plugged to LAN2, LAN3, LAN4 and WAN at the end. There is a reaction to that.
@kar200 /etc/config network attached in bootlog as well.

===================================================================
                MT7621   stage1 code 10:33:11 (ASIC)
                CPU=50000000 HZ BUS=16666666 HZ
==================================================================
Change MPLL source from XTAL to CR...
do MEMPLL setting..
MEMPLL Config : 0x11100000
3PLL mode + External loopback
=== XTAL-40Mhz === DDR-1200Mhz ===
PLL3 FB_DL: 0x0, 1/0 = 842/182 01000000
PLL2 FB_DL: 0x13, 1/0 = 517/507 4D000000
PLL4 FB_DL: 0x18, 1/0 = 606/418 61000000
do DDR setting..[00320381]
Apply DDR3 Setting...(use customer AC)
          0    8   16   24   32   40   48   56   64   72   80   88   96  104  112  120
      --------------------------------------------------------------------------------
0000:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0001:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0002:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0003:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0004:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0005:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0006:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0007:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0008:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0009:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
000E:|    0    0    0    0    0    0    0    0    0    0    1    1    1    1    1    1
000F:|    0    0    0    0    0    1    1    1    1    1    1    1    1    1    1    0
0010:|    1    1    1    1    1    1    1    1    1    1    0    0    0    0    0    0
0011:|    1    1    1    1    1    0    0    0    0    0    0    0    0    0    0    0
0012:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0013:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0014:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0015:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0016:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0017:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0018:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
0019:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001A:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001B:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001C:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001D:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001E:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
001F:|    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0    0
rank 0 coarse = 16
rank 0 fine = 40
B:|    0    0    0    0    0    0    0    0    1    1    1    0    0    0    0    0
opt_dle value:9
DRAMC_R0DELDLY[018]=0000201F
==================================================================
                RX      DQS perbit delay software calibration 
==================================================================
1.0-15 bit dq delay value
==================================================================
bit|     0  1  2  3  4  5  6  7  8  9
--------------------------------------
0 |    8 7 7 9 7 7 7 6 6 6 
10 |    7 8 9 9 7 7 
--------------------------------------

==================================================================
2.dqs window
x=pass dqs delay value (min~max)center 
y=0-7bit DQ of every group
input delay:DQS0 =31 DQS1 = 32
==================================================================
bit     DQS0     bit      DQS1
0  (1~60)30  8  (2~61)31
1  (1~62)31  9  (1~60)30
2  (1~59)30  10  (1~60)30
3  (1~61)31  11  (1~58)29
4  (1~62)31  12  (1~63)32
5  (1~62)31  13  (1~60)30
6  (1~58)29  14  (1~62)31
7  (1~62)31  15  (1~59)30
==================================================================
3.dq delay value last
==================================================================
bit|    0  1  2  3  4  5  6  7  8   9
--------------------------------------
0 |    9 7 8 9 7 7 9 6 7 8 
10 |    9 11 9 11 8 9 
==================================================================
==================================================================
     TX  perbyte calibration 
==================================================================
DQS loop = 15, cmp_err_1 = ffff0000 
dqs_perbyte_dly.last_dqsdly_pass[0]=15,  finish count=1 
dqs_perbyte_dly.last_dqsdly_pass[1]=15,  finish count=2 
DQ loop=15, cmp_err_1 = ffff0080
dqs_perbyte_dly.last_dqdly_pass[1]=15,  finish count=1 
DQ loop=14, cmp_err_1 = ffff0000
dqs_perbyte_dly.last_dqdly_pass[0]=14,  finish count=2 
byte:0, (DQS,DQ)=(8,8)
byte:1, (DQS,DQ)=(8,8)
20,data:88
[EMI] DRAMC calibration passed

===================================================================
                MT7621   stage1 code done 
                CPU=50000000 HZ BUS=16666666 HZ
===================================================================


U-Boot 1.1.3 (Apr 25 2019 - 14:00:06)

Board: Ralink APSoC DRAM:  256 MB
relocate_code Pointer at: 8ffa8000

Config XHCI 40M PLL 
Allocate 16 byte aligned buffer: 8ffdfdb0
Enable NFI Clock
# MTK NAND # : Use HW ECC
NAND ID [EF F1 00 95 00]
Device not found, ID: eff1
Not Support this Device! 
chip_mode=00000001
Support this Device in MTK table! eff1 
select_chip
[NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
Signature matched and data read!
load_fact_bbt success 1023
load fact bbt success
[mtk_nand] probe successfully!
mtd->writesize=2048 mtd->oobsize=64, mtd->erasesize=131072  devinfo.iowidth=8
..============================================ 
Ralink UBoot Version: 5.0.0.0
-------------------------------------------- 
ASIC MT7621A DualCore (MAC to MT7530 Mode)
DRAM_CONF_FROM: Auto-Detection 
DRAM_TYPE: DDR3 
DRAM bus: 16 bit
Xtal Mode=3 OCP Ratio=1/3
Flash component: 4 MBytes NOR Flash
Date:Apr 25 2019  Time:14:00:06
============================================ 
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:256, ways:4, linesz:32 ,total:32768 

 ##### The CPU freq = 880 MHZ #### 
 estimate memory size =256 Mbytes
#Reset_MT7530
set LAN/WAN LLLLW
########BUTTON_RESET: 15

=================================================
Check image validation:hdr1_addr[bc180000]hdr2_addr[c0980000]
Image1 Header Magic Number --> OK
Image2 Header Magic Number --> OK
Image1 Header Checksum --> OK
Image2 Header Checksum --> OK
Image1 Data Checksum --> ..............................OK
..Erasing NAND Flash...
ranand_erase: start:80000, len:20000 
.Writing to NAND Flash...
done
Image2 Data Checksum --> ..............................OK
Image1 Stable Flag --> Stable
Image1 Try Counter --> 0

Image1: OK Image2: OK

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

Please choose the operation: 
   1: Load system code to SDRAM via TFTP. 
   2: Load system code then write to Flash via TFTP. 
   3: Boot system code via Flash (default).
   4: Entr boot command line interface.
   6: System Enter UBoot to Update Img or Bin. 
   7: Load Boot Loader code then write to Flash via Serial. 
   9: Load Boot Loader code then write to Flash via TFTP. 
default: 3
\x08\x08\x08 0 
   
3: System Boot system code via Flash.
## Booting image at bc180000 ...
   Image Name:   MIPS OpenWrt Linux-4.14.202
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    1923372 Bytes =  1.8 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 4.14.202 (patryk@ubuntu) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r0+11228-78c4c04dd7)) #0 SMP Wed Oct 28 22:22:44 2020
[    0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[    0.000000] MIPS: machine is D-Link DIR-2660 A1
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 10000000 @ 00000000 (usable)
[    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] random: get_random_bytes called from start_kernel+0x94/0x4ac with crng_init=0
[    0.000000] percpu: Embedded 14 pages/cpu s26192 r8192 d22960 u57344
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Writing ErrCtl register=00011d83
[    0.000000] Readback ErrCtl register=00011d83
[    0.000000] Memory: 252272K/262144K available (4545K kernel code, 235K rwdata, 1012K rodata, 1236K init, 248K bss, 9872K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS: 256
[    0.000000] CPU Clock: 880MHz
[    0.000000] clocksource: GIC: mask: 0xffffffffffffffff max_cycles: 0xcaf478abb4, max_idle_ns: 440795247997 ns
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 4343773742 ns
[    0.000009] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[    0.015496] Calibrating delay loop... 586.13 BogoMIPS (lpj=2930688)
[    0.087827] pid_max: default: 32768 minimum: 301
[    0.097136] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.110158] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.125890] Hierarchical SRCU implementation.
[    0.135358] smp: Bringing up secondary CPUs ...
[    0.157229] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.157238] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.157249] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.157380] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.204727] Synchronize counters for CPU 1: done.
[    0.280999] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.281006] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.281013] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.281085] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.325582] Synchronize counters for CPU 2: done.
[    0.398072] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.398080] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.398087] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.398168] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.445153] Synchronize counters for CPU 3: done.
[    0.504753] smp: Brought up 1 node, 4 CPUs
[    0.516572] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.536040] futex hash table entries: 1024 (order: 3, 32768 bytes)
[    0.548455] pinctrl core: initialized pinctrl subsystem
[    0.560082] NET: Registered protocol family 16
[    0.578265] pull PCIe RST: RALINK_RSTCTRL = 4000000
[    0.888269] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.898334] ***** Xtal 40MHz *****
[    0.905067] release PCIe RST: RALINK_RSTCTRL = 7000000
[    0.915271] Port 0 N_FTS = 1b102800
[    0.922173] Port 1 N_FTS = 1b102800
[    0.929096] Port 2 N_FTS = 1b102800
[    2.087812] PCIE2 no card, disable it(RST&CLK)
[    2.096500]  -> 21007f2
[    2.101321] PCIE0 enabled
[    2.106523] PCIE1 enabled
[    2.111701] PCI host bridge /pcie@1e140000 ranges:
[    2.121226]  MEM 0x0000000060000000..0x000000006fffffff
[    2.131588]   IO 0x000000001e160000..0x000000001e16ffff
[    2.141954] PCI coherence region base: 0xbfbf8000, mask/settings: 0x60000000
[    2.164246] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.175522] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.186726] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    2.199225] PCI host bridge to bus 0000:00
[    2.207241] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    2.220914] pci_bus 0000:00: root bus resource [io  0xffffffff]
[    2.232642] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    2.246138] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    2.262656] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.278468] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.295667] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    2.308704] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.322511] pci 0000:00:01.0: BAR 0: no space for [mem size 0x80000000]
[    2.335648] pci 0000:00:01.0: BAR 0: failed to assign [mem size 0x80000000]
[    2.349468] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    2.362946] pci 0000:00:01.0: BAR 8: assigned [mem 0x60100000-0x601fffff]
[    2.376433] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[    2.389908] pci 0000:00:01.0: BAR 1: assigned [mem 0x60210000-0x6021ffff]
[    2.403392] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    2.417910] pci 0000:00:00.0: PCI bridge to [bus 01]
[    2.427727] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    2.441239] pci 0000:02:00.0: BAR 0: assigned [mem 0x60100000-0x601fffff 64bit]
[    2.455748] pci 0000:00:01.0: PCI bridge to [bus 02]
[    2.465574] pci 0000:00:01.0:   bridge window [mem 0x60100000-0x601fffff]
[    2.480361] clocksource: Switched to clocksource GIC
[    2.491661] NET: Registered protocol family 2
[    2.500943] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    2.514698] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    2.527487] TCP: Hash tables configured (established 2048 bind 2048)
[    2.540202] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    2.551710] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    2.564357] NET: Registered protocol family 1
[    2.810310] 4 CPUs re-calibrate udelay(lpj = 2924544)
[    2.821731] Crashlog allocated RAM at address 0x3f00000
[    2.832231] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    2.851574] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.863057] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.885023] random: fast init done
[    2.892621] io scheduler noop registered
[    2.900259] io scheduler deadline registered (default)
[    2.911482] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    2.925416] console [ttyS0] disabled
[    2.932474] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    2.950440] console [ttyS0] enabled
[    2.950440] console [ttyS0] enabled
[    2.964196] bootconsole [early0] disabled
[    2.964196] bootconsole [early0] disabled
[    2.982184] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys error
[    2.996240] Enable NFI Clock
[    3.002016] # MTK NAND # : Use HW ECC
[    3.009308] Device not found, ID: eff1
[    3.016767] Not Support this Device! 
[    3.024235] chip_mode=00000001
[    3.030300] Support this Device in MTK table! eff1 
[    3.040196] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[    3.053078] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[    3.065729] nand: Winbond NAND 128MiB 3,3V 8-bit
[    3.074923] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    3.090013] Scanning device for bad blocks
[    3.232020] 9 fixed-partitions partitions found on MTD device MT7621-NAND
[    3.245533] Creating 9 MTD partitions on "MT7621-NAND":
[    3.255950] 0x000000000000-0x000000080000 : "Bootloader"
[    3.267451] 0x000000080000-0x000000100000 : "config"
[    3.278284] 0x000000100000-0x000000140000 : "factory"
[    3.289223] 0x000000140000-0x000000180000 : "config2"
[    3.300153] 0x000000180000-0x000002980000 : "firmware"
[    3.323152] 2 sge-fw partitions found on MTD device firmware
[    3.334495] Creating 2 MTD partitions on "firmware":
[    3.344397] 0x000000000000-0x000000400000 : "kernel"
[    3.355443] 0x000000400000-0x000002800000 : "ubi"
[    3.366143] 0x000002980000-0x000004980000 : "private"
[    3.377427] 0x000004980000-0x000007180000 : "firmware2"
[    3.565063] 0x000007180000-0x000007780000 : "mydlink"
[    3.576349] 0x000007780000-0x000008000000 : "reserved"
[    3.587677] [mtk_nand] probe successfully!
[    3.596558] Signature matched and data read!
[    3.605054] load_fact_bbt success 1023
[    3.613266] libphy: Fixed MDIO Bus: probed
[    3.692893] libphy: mdio: probed
[    5.098867] mtk_soc_eth 1e100000.ethernet: loaded mt7530 driver
[    5.111338] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
[    5.130692] NET: Registered protocol family 10
[    5.141145] Segment Routing with IPv6
[    5.148517] NET: Registered protocol family 17
[    5.157422] 8021q: 802.1Q VLAN Support v1.8
[    5.168552] UBI: auto-attach mtd6
[    5.175216] ubi0: attaching mtd6
[    5.511938] ubi0: scanning is finished
[    5.534374] ubi0: attached mtd6 (name "ubi", size 36 MiB)
[    5.545143] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    5.558823] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    5.572334] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    5.586185] ubi0: good PEBs: 288, bad PEBs: 0, corrupted PEBs: 0
[    5.598135] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    5.612512] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 608902411
[    5.630515] ubi0: available PEBs: 0, total reserved PEBs: 288, PEBs reserved for bad PEB handling: 20
[    5.648886] ubi0: background thread "ubi_bgt0d" started, PID 376
[    5.650834] block ubiblock0_0: created from ubi0:0(rootfs)
[    5.671799] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    5.685671] hctosys: unable to open rtc device (rtc0)
[    5.702066] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    5.720638] Freeing unused kernel memory: 1236K
[    5.729658] This architecture does not have kernel memory protection.
[    6.279418] init: Console is alive
[    6.286538] init: - watchdog -
[    6.921786] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    7.017692] usbcore: registered new interface driver usbfs
[    7.028749] usbcore: registered new interface driver hub
[    7.039512] usbcore: registered new device driver usb
[    7.057075] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vbus not found, using dummy regulator
[    7.074351] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vusb33 not found, using dummy regulator
[    7.092030] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    7.102636] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    7.120511] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    7.138780] xhci-mtk 1e1c0000.xhci: irq 20, io mem 0x1e1c0000
[    7.151257] hub 1-0:1.0: USB hub found
[    7.158799] hub 1-0:1.0: 2 ports detected
[    7.167423] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    7.178042] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    7.192957] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0  SuperSpeed
[    7.205979] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    7.222984] hub 2-0:1.0: USB hub found
[    7.230557] hub 2-0:1.0: 1 port detected
[    7.243754] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.270708] init: - preinit -
[    7.800970] mtk_soc_eth 1e100000.ethernet eth0: port 3 link up
[    7.928610] mtk_soc_eth 1e100000.ethernet: PPE started
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[    8.008760] random: procd: uninitialized urandom read (4 bytes read)
 level
[   11.151984] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 481
[   11.224958] UBIFS (ubi0:1): recovery needed
[   11.415855] UBIFS (ubi0:1): recovery completed
[   11.424875] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   11.440464] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   11.460196] UBIFS (ubi0:1): FS size: 29839360 bytes (28 MiB, 235 LEBs), journal size 1523712 bytes (1 MiB, 12 LEBs)
[   11.480968] UBIFS (ubi0:1): reserved for root: 1409386 bytes (1376 KiB)
[   11.494133] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID 363A5B1E-AB92-413D-B049-C0D79FB16D9F, small LPT model
[   11.519099] mount_root: switching to ubifs overlay
[   11.550605] urandom-seed: Seeding with /etc/urandom.seed
[   11.642937] mtk_soc_eth 1e100000.ethernet: 0x100 = 0x6060000c, 0x10c = 0x80818
[   11.664907] procd: - early -
[   11.670770] procd: - watchdog -
[   12.360516] procd: - watchdog -
[   12.367085] procd: - ubus -
[   12.397367] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.431184] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.444248] random: ubusd: uninitialized urandom read (4 bytes read)
[   12.457843] procd: - init -
Please press Enter to activate this console.
[   12.871369] kmodloader: loading kernel modules from /etc/modules.d/*
[   12.889342] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.908176] Loading modules backported from Linux version v4.19.137-0-gc076c79e03c6
[   12.923573] Backport generated by backports.git v4.19.137-1-0-g60c3a249
[   12.938926] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.956104] nf_conntrack version 0.5.0 (4096 buckets, 16384 max)
[   13.007550] xt_time: kernel timezone is -0000
[   13.071846] bus=0x1, slot = 0x0, irq=0x0
[   13.079699] PCI: Enabling device 0000:00:00.0 (0004 -> 0006)
[   13.091314] urngd: v1.0.2 started.
[   13.110995] mt7615e 0000:01:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   13.110995] 
[   13.235461] random: crng init done
[   13.242291] random: 6 urandom warning(s) missed due to ratelimiting
[   13.336169] mt7615e 0000:01:00.0: N9 Firmware Version: _reserved_, Build Time: 20190103180756
[   13.362042] mt7615e 0000:01:00.0: CR4 Firmware Version: _reserved_, Build Time: 20181207140436
[   21.026315] bus=0x2, slot = 0x1, irq=0x0
[   21.034209] PCI: Enabling device 0000:00:01.0 (0004 -> 0006)
[   21.070864] mt7615e 0000:02:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   21.070864] 
[   21.105100] mt7615e 0000:02:00.0: N9 Firmware Version: _reserved_, Build Time: 20190103180756
[   21.131288] mt7615e 0000:02:00.0: CR4 Firmware Version: _reserved_, Build Time: 20181207140436
[   28.802390] PPP generic driver version 2.4.2
[   28.812484] NET: Registered protocol family 24
[   28.824223] kmodloader: done loading kernel modules from /etc/modules.d/*
[   32.963216] mtk_soc_eth 1e100000.ethernet: PPE started
[   32.978912] br-lan: port 1(eth0.1) entered blocking state
[   32.989809] br-lan: port 1(eth0.1) entered disabled state
[   33.001418] device eth0.1 entered promiscuous mode
[   33.011023] device eth0 entered promiscuous mode
[   33.024132] br-lan: port 1(eth0.1) entered blocking state
[   33.034951] br-lan: port 1(eth0.1) entered forwarding state
[   33.046489] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   33.971118] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready



BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 19.07-SNAPSHOT, r0+11228-78c4c04dd7
 -----------------------------------------------------
=== 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.
--------------------------------------------------
root@OpenWrt:/# cat /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd74:41db:591e::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device 'lan_eth0_1_dev'
        option name 'eth0.1'
        option macaddr 'f0:b4:d2:7b:b6:71'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config device 'wan_eth0_2_dev'
        option name 'eth0.2'
        option macaddr 'f0:b4:d2:7b:b6:72'

config interface 'wan6'
        option ifname 'eth0.2'
        option proto 'dhcpv6'

root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr F0:B4:D2:7B:B6:71  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::f2b4:d2ff:fe7b:b671/64 Scope:Link
          inet6 addr: fd74:41db:591e::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:1784 (1.7 KiB)

eth0      Link encap:Ethernet  HWaddr F0:B4:D2:7B:B6:71  
          inet6 addr: fe80::f2b4:d2ff:fe7b:b671/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:614 errors:0 dropped:3 overruns:0 frame:0
          TX packets:49 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:82465 (80.5 KiB)  TX bytes:8987 (8.7 KiB)
          Interrupt:21 

eth0.1    Link encap:Ethernet  HWaddr F0:B4:D2:7B:B6:71  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:1784 (1.7 KiB)

eth0.2    Link encap:Ethernet  HWaddr F0:B4:D2:7B:B6:72  
          inet6 addr: fe80::f2b4:d2ff:fe7b:b672/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:23 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:4482 (4.3 KiB)

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:40 errors:0 dropped:0 overruns:0 frame:0
          TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2720 (2.6 KiB)  TX bytes:2720 (2.6 KiB)

root@OpenWrt:/# ping 192.168.1.2
PING 192.168.1.2 (192.168.1.2): 56 data bytes
[   78.373051] mtk_soc_eth 1e100000.ethernet eth0: port 3 link down
[   85.800238] mtk_soc_eth 1e100000.ethernet eth0: port 2 link up
[   97.399830] mtk_soc_eth 1e100000.ethernet eth0: port 2 link down
[  104.051774] mtk_soc_eth 1e100000.ethernet eth0: port 1 link up
[  117.986151] mtk_soc_eth 1e100000.ethernet eth0: port 1 link down
[  122.141777] mtk_soc_eth 1e100000.ethernet eth0: port 0 link up
[  134.773609] mtk_soc_eth 1e100000.ethernet eth0: port 0 link down
[  141.302379] mtk_soc_eth 1e100000.ethernet eth0: port 4 link up

it's good there is progress
it's been a while since the master was branched off v19
a lot has changed
I think it's time to start comparing DTS files with other one's
to find things that have changed
I'm also aware the switch still has problems in v19
and the wifi driver in v19 is old now compared to the master