Hi all,
Hope everyone is safe and doing well.
I am trying to build openwrt for a Dlink DIR-853 A3. It is a device given with my internet provider.
After having a look through the hardware online and in my own device I noticed that it is different from the DIR-853 A1 which uses a 16MB flash . Mine is a 128Mb NAND instead.
After using the work from Support for DIR-878 and which lucky for me only had 4 files changed from the main openwrt tree I managed to build an image that boots but I am getting some errors obviously.
I think most of the work to be done would be on the dts file I created.
Anyway this is the output of the kernel booting after flashing.
===================================================================
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 ===
PLL2 FB_DL: 0x8, 1/0 = 571/453 21000000
PLL3 FB_DL: 0x8, 1/0 = 629/395 21000000
PLL4 FB_DL: 0x15, 1/0 = 534/490 55000000
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 1
000E:| 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1
000F:| 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0
0010:| 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0
0011:| 1 1 1 0 0 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 = 15
rank 0 fine = 72
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 7 7 9 7 7 9 6 6 5
10 | 8 7 7 10 8 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~59)30 8 (1~58)29
1 (1~62)31 9 (1~58)29
2 (1~60)30 10 (1~62)31
3 (1~62)31 11 (1~58)29
4 (1~62)31 12 (1~61)31
5 (1~62)31 13 (1~59)30
6 (1~61)31 14 (1~60)30
7 (1~61)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 8 7
10 | 8 9 7 11 9 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 = 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 (Dec 20 2018 - 11:06:07)
Board: Ralink APSoC DRAM: 256 MB
relocate_code Pointer at: 8ffa8000
Config XHCI 40M PLL
Allocate 16 byte aligned buffer: 8ffdf830
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
.*** Warning - bad CRC, using default environment
============================================
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: NAND Flash
Date:Dec 20 2018 Time:11:06:07
============================================
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
=================================================
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
Image2 Data Checksum --> ....................................OK
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
0
3: System Boot system code via Flash.
## Booting image at bc180000 ...
Image Name: MIPS OpenWrt Linux-5.4.40
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 2335590 Bytes = 2.2 MB
Load Address: 80001000
Entry Point: 80001000
.................................... Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80001000) ...
## Giving linux memsize in MB, 256
Starting kernel ...
[ 0.000000] Linux version 5.4.40 (karim@ubuntu-matebook) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r13224-2308644b0c)) #0 SMP Tue May 12 17:16:41 2020
[ 0.000000] SoC Type: MediaTek MT7621 ver:1 eco:3
[ 0.000000] printk: bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001992f (MIPS 1004Kc)
[ 0.000000] MIPS: machine is D-Link DIR-853 A3
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] VPE topology {2,2} total 4
[ 0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.000000] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000000000000-0x000000000fffffff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000000000fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[ 0.000000] percpu: Embedded 14 pages/cpu s26672 r8192 d22480 u57344
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64960
[ 0.000000] Kernel command line: console=ttyS0,57600 rootfstype=squashfs,jffs2
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] Writing ErrCtl register=0000270a
[ 0.000000] Readback ErrCtl register=0000270a
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 250860K/262144K available (5566K kernel code, 202K rwdata, 1216K rodata, 1260K init, 230K bss, 11284K reserved, 0K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] NR_IRQS: 256
[ 0.000000] random: get_random_bytes called from start_kernel+0x340/0x54c with crng_init=0
[ 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.000008] sched_clock: 32 bits at 440MHz, resolution 2ns, wraps every 4880645118ns
[ 0.015476] Calibrating delay loop... 583.68 BogoMIPS (lpj=1167360)
[ 0.055828] pid_max: default: 32768 minimum: 301
[ 0.065167] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.079574] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.097658] rcu: Hierarchical SRCU implementation.
[ 0.107773] smp: Bringing up secondary CPUs ...
[ 0.136163] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.136173] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.136185] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.136282] CPU1 revision is: 0001992f (MIPS 1004Kc)
[ 0.144959] Synchronize counters for CPU 1: done.
[ 0.227246] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.227255] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.227263] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.227317] CPU2 revision is: 0001992f (MIPS 1004Kc)
[ 0.243503] Synchronize counters for CPU 2: done.
[ 0.322444] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[ 0.322452] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[ 0.322460] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[ 0.322518] CPU3 revision is: 0001992f (MIPS 1004Kc)
[ 0.331105] Synchronize counters for CPU 3: done.
[ 0.390709] smp: Brought up 1 node, 4 CPUs
[ 0.403094] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 0.422409] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[ 0.436353] pinctrl core: initialized pinctrl subsystem
[ 0.448131] NET: Registered protocol family 16
[ 0.486703] random: fast init done
[ 0.496765] clocksource: Switched to clocksource GIC
[ 0.508642] NET: Registered protocol family 2
[ 0.517884] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.534401] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[ 0.549602] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.563781] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.576494] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.589384] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.603432] NET: Registered protocol family 1
[ 0.611990] PCI: CLS 0 bytes, default 32
[ 0.708698] 4 CPUs re-calibrate udelay(lpj = 1163264)
[ 0.720165] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[ 0.744117] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 0.755625] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[ 0.778376] mt7621_gpio 1e000600.gpio: registering 32 gpios
[ 0.789720] mt7621_gpio 1e000600.gpio: registering 32 gpios
[ 0.801042] mt7621_gpio 1e000600.gpio: registering 32 gpios
[ 0.812998] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[ 0.826977] printk: console [ttyS0] disabled
[ 0.835436] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[ 0.853362] printk: console [ttyS0] enabled
[ 0.853362] printk: console [ttyS0] enabled
[ 0.869917] printk: bootconsole [early0] disabled
[ 0.869917] printk: bootconsole [early0] disabled
[ 0.890912] mt7621-nand 1e003000.nand: Using programmed access timing: 31c07388
[ 0.905783] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[ 0.918448] nand: Winbond W29N01HV
[ 0.925227] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 0.940315] mt7621-nand 1e003000.nand: ECC strength adjusted to 4 bits
[ 0.953354] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[ 0.967917] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[ 0.982483] Scanning device for bad blocks
[ 1.639598] 9 fixed-partitions partitions found on MTD device mt7621-nand
[ 1.653129] Creating 9 MTD partitions on "mt7621-nand":
[ 1.663546] 0x000000000000-0x000000080000 : "Bootloader"
[ 1.675321] 0x000000080000-0x000000100000 : "Config"
[ 1.686316] 0x000000100000-0x000000140000 : "Factory"
[ 1.697645] 0x000000140000-0x000000180000 : "Config2"
[ 1.709057] 0x000000180000-0x000002980000 : "firmware"
[ 1.722260] 2 ubootpad96-fw partitions found on MTD device firmware
[ 1.734957] Creating 2 MTD partitions on "firmware":
[ 1.744861] 0x000000000000-0x00000023a406 : "kernel"
[ 1.755953] 0x00000023a406-0x000002800000 : "rootfs"
[ 1.767082] mtd: device 6 (rootfs) set to be root filesystem
[ 1.778396] 1 squashfs-split partitions found on MTD device rootfs
[ 1.790719] 0x0000005c0000-0x000002800000 : "rootfs_data"
[ 1.802701] 0x000002980000-0x000004980000 : "Private"
[ 1.814001] 0x000004980000-0x000007180000 : "Kernel2"
[ 2.017949] 0x000007180000-0x000007780000 : "mydlink"
[ 2.029331] 0x000007780000-0x000007f80000 : "Reserved"
[ 2.042332] libphy: Fixed MDIO Bus: probed
[ 2.075093] libphy: mdio: probed
[ 2.081753] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[ 2.095645] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
[ 2.114396] mt7621-pci 1e140000.pcie: Parsing DT failed
[ 2.127367] NET: Registered protocol family 10
[ 2.137931] Segment Routing with IPv6
[ 2.145361] NET: Registered protocol family 17
[ 2.154541] 8021q: 802.1Q VLAN Support v1.8
[ 2.165443] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[ 3.061097] libphy: dsa slave smi: probed
[ 3.080783] mt7530 mdio-bus:1f lan4 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY]
[ 3.108781] mt7530 mdio-bus:1f lan3 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY]
[ 3.136784] mt7530 mdio-bus:1f lan2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY]
[ 3.164793] mt7530 mdio-bus:1f lan1 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY]
[ 3.192790] mt7530 mdio-bus:1f wan (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY]
[ 3.256724] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode
[ 3.880717] mt7530 mdio-bus:1f: Link is Up - 1Gbps/Full - flow control off
[ 3.964747] DSA: tree 0 setup
[ 3.971000] rt2880-pinmux pinctrl: pcie is already enabled
[ 3.981942] mt7621-pci 1e140000.pcie: Error applying setting, reverse things back
[ 3.996984] mt7621-pci-phy 1e149000.pcie-phy: PHY for 0xbe149000 (dual port = 1)
[ 4.011912] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[ 4.126385] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
[ 4.137501] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[ 4.248243] mt7621-pci 1e140000.pcie: pcie1 no card, disable it (RST & CLK)
[ 4.262110] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[ 4.275975] mt7621-pci 1e140000.pcie: PCIE0 enabled
[ 4.285695] mt7621-pci 1e140000.pcie: PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[ 4.304412] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[ 4.317092] pci_bus 0000:00: root bus resource [io 0x1e160000-0x1e16ffff]
[ 4.330787] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[ 4.344481] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 4.355448] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[ 4.367444] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[ 4.379932] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[ 4.392487] pci 0000:00:00.0: supports D1
[ 4.400471] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[ 4.413365] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 4.429541] pci 0000:01:00.0: [14c3:7615] type 00 class 0x000280
[ 4.441565] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[ 4.455250] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5 GT/s x1 link)
[ 4.484127] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[ 4.494552] pci 0000:00:00.0: bridge window [io 0x0000-0x0fff]
[ 4.506690] pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff]
[ 4.520211] pci 0000:00:00.0: bridge window [mem 0x00000000-0x000fffff pref]
[ 4.534603] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[ 4.547816] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[ 4.561001] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[ 4.574869] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[ 4.588393] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[ 4.602782] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[ 4.616310] pci 0000:00:00.0: BAR 7: assigned [io 0x1e160000-0x1e160fff]
[ 4.629842] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[ 4.644409] pci 0000:00:00.0: PCI bridge to [bus 01]
[ 4.654301] pci 0000:00:00.0: bridge window [io 0x1e160000-0x1e160fff]
[ 4.667821] pci 0000:00:00.0: bridge window [mem 0x60000000-0x600fffff]
[ 4.681344] pci 0000:00:00.0: bridge window [mem 0x60100000-0x601fffff pref]
[ 4.696424] hctosys: unable to open rtc device (rtc0)
[ 4.713160] VFS: Mounted root (squashfs filesystem) readonly on device 31:6.
[ 4.731548] Freeing unused kernel memory: 1260K
[ 4.740628] This architecture does not have kernel memory protection.
[ 4.753463] Run /sbin/init as init process
[ 5.340386] init: Console is alive
[ 5.347427] init: - watchdog -
[ 6.298720] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[ 6.405965] usbcore: registered new interface driver usbfs
[ 6.417027] usbcore: registered new interface driver hub
[ 6.427767] usbcore: registered new device driver usb
[ 6.442777] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 6.461894] SCSI subsystem initialized
[ 6.472815] ehci-fsl: Freescale EHCI Host controller driver
[ 6.485006] ehci-platform: EHCI generic platform driver
[ 6.497586] ehci-pci: EHCI PCI platform driver
[ 6.508394] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 6.521720] ohci-platform: OHCI generic platform driver
[ 6.539428] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vusb33 not found, using dummy regulator
[ 6.557161] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[ 6.567773] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[ 6.588899] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[ 6.607203] xhci-mtk 1e1c0000.xhci: irq 20, io mem 0x1e1c0000
[ 6.619893] hub 1-0:1.0: USB hub found
[ 6.627509] hub 1-0:1.0: 2 ports detected
[ 6.636130] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[ 6.646781] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[ 6.661709] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0 SuperSpeed
[ 6.674578] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 6.691562] hub 2-0:1.0: USB hub found
[ 6.699130] hub 2-0:1.0: 1 port detected
[ 6.715099] usbcore: registered new interface driver usb-storage
[ 6.727355] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[ 6.745041] init: - preinit -
[ 7.471214] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[ 7.487318] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 7.504175] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
/bin/board_detect: /etc/board.d/01_leds: line 30: syntax error: unexpected "|"
[ 7.719835] random: jshn: uninitialized urandom read (4 bytes read)
[ 7.763857] random: jshn: uninitialized urandom read (4 bytes read)
[ 7.796651] random: jshn: uninitialized urandom read (4 bytes read)
[ 7.960728] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode
[ 8.000884] 8021q: adding VLAN 0 to HW filter on device lan1
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[ 12.190022] mount_root: no usable overlay filesystem found, using tmpfs overlay
[ 12.200726] mt7530 mdio-bus:1f lan1: Link is Up - 1Gbps/Full - flow control rx/tx
[ 12.219585] IPv6: ADDRCONF(NETDEV_CHANGE): lan1: link becomes ready
[ 12.236004] urandom-seed: Seed file not found (/etc/urandom.seed)
[ 12.356730] mt7530 mdio-bus:1f lan1: Link is Down
[ 12.444901] procd: - early -
[ 12.450750] procd: - watchdog -
[ 13.044898] procd: - watchdog -
[ 13.051477] procd: - ubus -
[ 13.142718] urandom_read: 3 callbacks suppressed
[ 13.142729] random: ubusd: uninitialized urandom read (4 bytes read)
[ 13.214788] random: ubusd: uninitialized urandom read (4 bytes read)
[ 13.227967] random: ubusd: uninitialized urandom read (4 bytes read)
[ 13.241591] procd: - init -
Please press Enter to activate this console.
[ 13.670746] kmodloader: loading kernel modules from /etc/modules.d/*
[ 13.697274] i2c /dev entries driver
[ 13.710452] usbcore: registered new interface driver cdc_wdm
[ 13.722484] Loading modules backported from Linux version v5.4.27-0-g585e0cc08069
[ 13.737436] Backport generated by backports.git v5.4.27-1-0-gf6e8852f
[ 13.761283] usbcore: registered new interface driver ums-alauda
[ 13.774401] usbcore: registered new interface driver ums-cypress
[ 13.787634] usbcore: registered new interface driver ums-datafab
[ 13.800853] usbcore: registered new interface driver ums-freecom
[ 13.814082] usbcore: registered new interface driver ums-isd200
[ 13.827151] usbcore: registered new interface driver ums-jumpshot
[ 13.828409] urngd: v1.0.2 started.
[ 13.840461] usbcore: registered new interface driver ums-karma
[ 13.859230] usbcore: registered new interface driver ums-sddr09
[ 13.872366] usbcore: registered new interface driver ums-sddr55
[ 13.885634] usbcore: registered new interface driver ums-usbat
[ 13.905256] xt_time: kernel timezone is -0000
[ 13.973332] mt7621-pci 1e140000.pcie: bus=1 slot=0 irq=23
[ 13.984155] pci 0000:00:00.0: enabling device (0004 -> 0007)
[ 13.995448] mt7615e 0000:01:00.0: enabling device (0000 -> 0002)
[ 14.011888] random: crng init done
[ 14.018251] mt7615e 0000:01:00.0: Invalid MAC address, using random address 72:1f:5f:2c:26:48
[ 14.018720] random: 1 urandom warning(s) missed due to ratelimiting
[ 14.066795] usbcore: registered new interface driver mt76x2u
[ 14.101300] PPP generic driver version 2.4.2
[ 14.113229] NET: Registered protocol family 24
[ 14.142929] usbcore: registered new interface driver mt76x0u
[ 14.147014] mt7615e 0000:01:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[ 14.147014]
[ 14.159159] kmodloader: done loading kernel modules from /etc/modules.d/*
[ 14.445550] mt7615e 0000:01:00.0: N9 Firmware Version: 2.0, Build Time: 20200131181812
[ 14.587110] mt7615e 0000:01:00.0: CR4 Firmware Version: _reserved_, Build Time: 20190121161307
There are a lot more JFFS error after that.
This is my DTS file. I used a copy of the DIR-878 and tried to modify by using the MIR3G dts as a reference for USB and NAND.
/dts-v1/;
#include "mt7621.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
/ {
compatible = "dlink,dir-853-a3", "mediatek,mt7621-soc";
model = "D-Link DIR-853 A3";
aliases {
led-boot = &led_power_orange;
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_net_orange;
label-mac-device = &gmac0;
};
chosen {
bootargs = "console=ttyS0,57600";
};
leds {
compatible = "gpio-leds";
led_power_orange: power_orange {
label = "dir-853-a3:orange:power";
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
};
led_power_green: power_green {
label = "dir-853-a3:green:power";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
led_net_orange: net_orange {
label = "dir-853-a3:orange:net";
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
};
net_green {
label = "dir-853-a3:green:net";
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RESTART>;
};
wps {
label = "wps";
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
linux,code = <KEY_WPS_BUTTON>;
};
wifi {
label = "wifi";
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
linux,code = <KEY_RFKILL>;
};
};
reg_usb_vbus: regulator {
compatible = "regulator-fixed";
regulator-name = "usb_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio 12 GPIO_ACTIVE_HIGH>;
enable-active-high;
};
};
&xhci {
vbus-supply = <®_usb_vbus>;
};
&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 {
compatible = "ubootpad96,uimage";
label = "firmware";
reg = <0x180000 0x2800000>;
};
partition@2980000 {
label = "Private";
reg = <0x2980000 0x2000000>;
read-only;
};
partition@4980000 {
label = "Kernel2";
compatible = "ubootpad96,uimage";
reg = <0x4980000 0x2800000>;
};
partition@7180000 {
label = "mydlink";
reg = <0x7180000 0x600000>;
read-only;
};
partition@7780000 {
label = "Reserved";
reg = <0x7780000 0x800000>;
read-only;
};
};
};
&gmac0 {
mtd-mac-address = <&factory 0xe000>;
};
&switch0 {
ports {
port@0 {
status = "okay";
label = "lan4";
};
port@1 {
status = "okay";
label = "lan3";
};
port@2 {
status = "okay";
label = "lan2";
};
port@3 {
status = "okay";
label = "lan1";
};
port@4 {
status = "okay";
label = "wan";
mtd-mac-address = <&factory 0xe006>;
};
};
};
&pcie {
status = "okay";
};
&pcie0 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x8000>;
ieee80211-freq-limit = <5000000 6000000>;
};
};
&pcie1 {
mt76@0,0 {
reg = <0x0000 0 0 0 0>;
mediatek,mtd-eeprom = <&factory 0x0000>;
};
};
&state_default {
gpio {
groups = "uart3", "jtag", "wdt";
function = "gpio";
};
};
The image boots and Luci works. No changes are kept after reboot.
I can only see one wireless card (The 802.11AC) and the connection doesnt seem stable and thats just for SSH And Luci at the moment.
Thaks for looking.
K.