New build for DIR-853 A3

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 = <&reg_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.

I just realised I did not includ the errors for JFFS.

This continues from the boot process from the serial int he first post

   40.709090] mtk_soc_eth 1e100000.ethernet eth0: Link is Down
[   40.729876] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[   40.746235] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   40.820827] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode
[   40.828984] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x4e3e instead
[   40.852941] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x4861 instead
[   40.864951] 8021q: adding VLAN 0 to HW filter on device lan1
[   40.871865] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000008: 0xa55c instead
[   40.883451] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   40.902090] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0xdf0a instead
[   40.902110] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0x128f instead
[   40.915517] br-lan: port 1(lan1) entered blocking state
[   40.933609] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000014: 0x4c4e instead
[   40.933625] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000018: 0x512f instead
[   40.933654] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000001c: 0x0f2b instead
[   40.933673] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000020: 0x71f5 instead
[   40.933685] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000024: 0xc26b instead
[   40.933695] jffs2: Further such events for this erase block will not be printed
[   40.997236] jffs2: Old JFFS2 bitmask found at 0x000122d4
[   41.001204] br-lan: port 1(lan1) entered disabled state
[   41.020079] jffs2: You cannot use older JFFS2 filesystems with newer kernels
[   41.060770] device lan1 entered promiscuous mode
[   41.082909] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020000: 0x1002 instead
[   41.083155] device eth0 entered promiscuous mode
[   41.093507] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020004: 0xd6c5 instead
[   41.093528] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020008: 0xfffa instead
[   41.182780] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002000c: 0xde61 instead
[   41.201764] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020010: 0xddc7 instead
[   41.220777] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020014: 0x3884 instead
[   41.239845] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020018: 0x764c instead
[   41.258903] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0002001c: 0x11b4 instead
[   41.278192] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020020: 0x657e instead
[   41.297333] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00020024: 0x09b4 instead
[   41.316325] jffs2: Further such events for this erase block will not be printed
[   41.316449] mt7530 mdio-bus:1f lan2: configuring for phy/gmii link mode
[   41.369078] 8021q: adding VLAN 0 to HW filter on device lan2
[   41.381170] br-lan: port 2(lan2) entered blocking state
[   41.391655] br-lan: port 2(lan2) entered disabled state
[   41.396214] jffs2: Old JFFS2 bitmask found at 0x0003b308
[   41.412734] jffs2: You cannot use older JFFS2 filesystems with newer kernels
[   41.431525] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040000: 0x39aa instead
[   41.450464] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040004: 0xcc36 instead
[   41.452894] device lan2 entered promiscuous mode
[   41.469433] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040008: 0xf674 instead
[   41.497664] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004000c: 0xf5c0 instead
[   41.516630] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040010: 0x17aa instead
[   41.535577] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040014: 0xf34a instead
[   41.554660] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040018: 0xa407 instead
[   41.573662] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0004001c: 0x9cbb instead
[   41.592644] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040020: 0x9fd5 instead
[   41.611767] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00040024: 0x60e2 instead
[   41.630753] jffs2: Further such events for this erase block will not be printed
[   41.644768] mt7530 mdio-bus:1f lan3: configuring for phy/gmii link mode
[   41.685164] 8021q: adding VLAN 0 to HW filter on device lan3
[   41.697201] br-lan: port 3(lan3) entered blocking state
[   41.699890] jffs2: Old JFFS2 bitmask found at 0x0005a638
[   41.707642] br-lan: port 3(lan3) entered disabled state
[   41.718218] jffs2: You cannot use older JFFS2 filesystems with newer kernels
[   41.721708] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060000: 0xb1aa instead
[   41.761598] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060004: 0x7b5a instead
[   41.780517] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060008: 0x01ab instead
[   41.799428] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006000c: 0xd989 instead
[   41.812736] device lan3 entered promiscuous mode
[   41.818341] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060010: 0x98d4 instead
[   41.846454] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060014: 0x0169 instead
[   41.865385] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060018: 0x77d9 instead
[   41.884387] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0006001c: 0xbc41 instead
[   41.903310] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060020: 0x9c4f instead
[   41.922253] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00060024: 0x87fa instead
[   41.941161] jffs2: Further such events for this erase block will not be printed
[   41.948723] mt7530 mdio-bus:1f lan4: configuring for phy/gmii link mode
[   41.996954] 8021q: adding VLAN 0 to HW filter on device lan4
[   42.000660] jffs2: Old JFFS2 bitmask found at 0x0006f7d4
[   42.008957] br-lan: port 4(lan4) entered blocking state
[   42.018852] jffs2: You cannot use older JFFS2 filesystems with newer kernels
[   42.029265] br-lan: port 4(lan4) entered disabled state
[   42.060101] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080000: 0xe8f0 instead
[   42.079029] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080004: 0xa29c instead
[   42.097985] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080008: 0x6ca9 instead
[   42.116911] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0008000c: 0xceca instead
[   42.135830] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080010: 0xbc02 instead
[   42.136745] device lan4 entered promiscuous mode
[   42.154765] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080014: 0x6996 instead
[   42.182901] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080018: 0xcd63 instead
[   42.201861] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0008001c: 0xa9d9 instead
[   42.220855] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080020: 0xfe53 instead
[   42.239814] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00080024: 0x12c8 instead
[   42.258741] jffs2: Further such events for this erase block will not be printed
[   42.335362] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0000: 0x2716 instead
[   42.354324] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0004: 0xad30 instead
[   42.356746] mt7530 mdio-bus:1f wan: configuring for phy/gmii link mode
[   42.373292] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0008: 0xdd83 instead
[   42.405213] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a000c: 0x65ab instead
[   42.412960] 8021q: adding VLAN 0 to HW filter on device wan
[   42.424169] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0010: 0x0962 instead
[   42.454257] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0014: 0x8c2c instead
[   42.473333] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0018: 0xf0a8 instead
[   42.492416] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a001c: 0x9a03 instead
[   42.511501] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0020: 0xdb4a instead
[   42.530528] jffs2: jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x000a0024: 0x945a instead
[   42.549552] jffs2: Further such events for this erase block will not be printed
[   42.632507] jffs2: Old JFFS2 bitmask found at 0x000bb434

I am by no means an expert, but from what I understand OpenWrt uses UBI instead of JFFS2 for NAND flash. You can read here and further down for info on that.

There are probably other MT7621 devices with NAND around and supported in OpenWrt so taking a look at how they do it might maybe help?

Good luck on your endeavours :slightly_smiling_face:.

1 Like

Thanks a lot I will have a read through.

I did see a reference about UBI on the Mir3G dts file so I will dig into that as well.

Cheers.

1 Like

I see now you're the same guy that responded on the DIR-878 thread. Thanks for that!

You can also hop onto IRC and ask for pointers, might take a while until someone knowledgeable responds but it never hurts to try (#openwrt or #openwrt-devel on Freenode).

It has been a while since I used IRC but I will give it a go. Considering my limited knowledge in the area and the amount of details that I omitted/added wrong I am surprised that it even boots!

Just an update. I managed to make it work thanks to code from others. This is where the issue was in the mt7621.mk file and after too many combinations this is the one that worked .

define Device/dlink_dir-853-a3
	UBINIZE_OPTS := -E 5
	BLOCKSIZE := 128k
	PAGESIZE := 2048
	KERNEL_SIZE := 4096k
	DEVICE_VENDOR := D-Link
  DEVICE_MODEL := DIR-853
	DEVICE_VARIANT := A3
	KERNEL_INITRAMFS := $$(KERNEL) | ubootpad96
	IMAGES += factory.bin
	DEVICE_PACKAGES :=  kmod-mt7615e kmod-usb3 \
	kmod-usb-ledtrig-usbport wpad-basic uboot-envtools
	IMAGE/factory.bin := append-kernel | ubootpad96 | pad-to $$(KERNEL_SIZE) |\
	append-ubi
endef

I did use the UBI header. The specoal ubootpad96 had to be added before padding to kernel size to then add the ubi at the end.

I did a test with reboot which save the changes.

This is the bootlog now in case someone has a similar issue

3: System Boot system code via Flash.
## Booting image at bc180000 ...
   Image Name:   MIPS OpenWrt Linux-5.4.34
   Image Type:   MIPS Linux Kernel Image (lzma compressed)
   Data Size:    2339845 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.34 (karim@ubuntu-matebook) (gcc version 8.4.0 (OpenWrt GCC 8.4.0 r13052-04ca4f1d12)) #0 SMP Thu Apr 23 21:27:04 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=00022700
[    0.000000] Readback ErrCtl register=00022700
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 250860K/262144K available (5583K kernel code, 197K rwdata, 1212K rodata, 1252K init, 230K bss, 11284K reserved, 0K cma-reserved, 0K hi)
[    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/0x554 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.015483] Calibrating delay loop... 583.68 BogoMIPS (lpj=1167360)
[    0.055826] pid_max: default: 32768 minimum: 301
[    0.065163] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.079565] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.097524] rcu: Hierarchical SRCU implementation.
[    0.107597] smp: Bringing up secondary CPUs ...
[    0.139183] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.139193] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.139204] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.139302] CPU1 revision is: 0001992f (MIPS 1004Kc)
[    0.144743] Synchronize counters for CPU 1: done.
[    0.230015] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.230023] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.230031] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.230085] CPU2 revision is: 0001992f (MIPS 1004Kc)
[    0.243219] Synchronize counters for CPU 2: done.
[    0.325418] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.325426] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.325434] MIPS secondary cache 256kB, 8-way, linesize 32 bytes.
[    0.325493] CPU3 revision is: 0001992f (MIPS 1004Kc)
[    0.330819] Synchronize counters for CPU 3: done.
[    0.390425] smp: Brought up 1 node, 4 CPUs
[    0.402917] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.422226] futex hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.436158] pinctrl core: initialized pinctrl subsystem
[    0.447930] NET: Registered protocol family 16
[    0.484606] random: fast init done
[    0.495792] clocksource: Switched to clocksource GIC
[    0.507528] NET: Registered protocol family 2
[    0.516834] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    0.533351] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    0.548553] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.562723] TCP: Hash tables configured (established 2048 bind 2048)
[    0.575442] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.588327] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.602381] NET: Registered protocol family 1
[    0.610939] PCI: CLS 0 bytes, default 32
[    0.707755] 4 CPUs re-calibrate udelay(lpj = 1163264)
[    0.719266] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    0.743302] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.754807] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.777452] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.788765] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.800088] mt7621_gpio 1e000600.gpio: registering 32 gpios
[    0.811940] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.825774] printk: console [ttyS0] disabled
[    0.834235] 1e000c00.uartlite: ttyS0 at MMIO 0x1e000c00 (irq = 19, base_baud = 3125000) is a 16550A
[    0.852161] printk: console [ttyS0] enabled
[    0.852161] printk: console [ttyS0] enabled
[    0.868707] printk: bootconsole [early0] disabled
[    0.868707] printk: bootconsole [early0] disabled
[    0.889674] mt7621-nand 1e003000.nand: Using programmed access timing: 31c07388
[    0.904509] nand: device found, Manufacturer ID: 0xef, Chip ID: 0xf1
[    0.917166] nand: Winbond W29N01HV
[    0.923944] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.939023] mt7621-nand 1e003000.nand: ECC strength adjusted to 4 bits
[    0.952060] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[    0.966622] mt7621-nand 1e003000.nand: Using programmed access timing: 21005134
[    0.981186] Scanning device for bad blocks
[    1.638287] 9 fixed-partitions partitions found on MTD device mt7621-nand
[    1.651817] Creating 9 MTD partitions on "mt7621-nand":
[    1.662247] 0x000000000000-0x000000080000 : "Bootloader"
[    1.674094] 0x000000080000-0x000000100000 : "uboot_env"
[    1.685768] 0x000000100000-0x000000140000 : "Factory"
[    1.696983] 0x000000140000-0x000000180000 : "Config2"
[    1.708218] 0x000000180000-0x000002980000 : "firmware"
[    1.731038] 2 ubootpad96-fw partitions found on MTD device firmware
[    1.743539] Creating 2 MTD partitions on "firmware":
[    1.753440] 0x000000000000-0x000000400000 : "kernel"
[    1.764683] 0x000000400000-0x000002800000 : "ubi"
[    1.775448] 0x000002980000-0x000004980000 : "Private"
[    1.786946] 0x000004980000-0x000007180000 : "Kernel2"
[    1.798448] 0x000007180000-0x000007780000 : "mydlink"
[    1.809682] 0x000007780000-0x000007f80000 : "Reserved"
[    1.822157] libphy: Fixed MDIO Bus: probed
[    1.858167] libphy: mdio: probed
[    1.864835] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    1.878772] mtk_soc_eth 1e100000.ethernet eth0: mediatek frame engine at 0xbe100000, irq 21
[    1.897583] mt7621-pci 1e140000.pcie: Parsing DT failed
[    1.910570] NET: Registered protocol family 10
[    1.921094] Segment Routing with IPv6
[    1.928541] NET: Registered protocol family 17
[    1.937712] 8021q: 802.1Q VLAN Support v1.8
[    1.948548] mt7530 mdio-bus:1f: MT7530 adapts as multi-chip module
[    2.844135] libphy: dsa slave smi: probed
[    2.863823] mt7530 mdio-bus:1f lan4 (uninitialized): PHY [dsa-0.0:00] driver [Generic PHY]
[    2.891835] mt7530 mdio-bus:1f lan3 (uninitialized): PHY [dsa-0.0:01] driver [Generic PHY]
[    2.919837] mt7530 mdio-bus:1f lan2 (uninitialized): PHY [dsa-0.0:02] driver [Generic PHY]
[    2.947834] mt7530 mdio-bus:1f lan1 (uninitialized): PHY [dsa-0.0:03] driver [Generic PHY]
[    2.975837] mt7530 mdio-bus:1f wan (uninitialized): PHY [dsa-0.0:04] driver [Generic PHY]
[    3.039778] mt7530 mdio-bus:1f: configuring for fixed/rgmii link mode
[    3.663771] mt7530 mdio-bus:1f: Link is Up - 1Gbps/Full - flow control off
[    3.747804] DSA: tree 0 setup
[    3.754058] rt2880-pinmux pinctrl: pcie is already enabled
[    3.765003] mt7621-pci 1e140000.pcie: Error applying setting, reverse things back
[    3.780044] mt7621-pci-phy 1e149000.pcie-phy: PHY for 0xbe149000 (dual port = 1)
[    3.794966] mt7621-pci-phy 1e14a000.pcie-phy: PHY for 0xbe14a000 (dual port = 0)
[    3.909432] mt7621-pci-phy 1e149000.pcie-phy: Xtal is 40MHz
[    3.920545] mt7621-pci-phy 1e14a000.pcie-phy: Xtal is 40MHz
[    4.031287] mt7621-pci 1e140000.pcie: pcie1 no card, disable it (RST & CLK)
[    4.045157] mt7621-pci 1e140000.pcie: pcie2 no card, disable it (RST & CLK)
[    4.059023] mt7621-pci 1e140000.pcie: PCIE0 enabled
[    4.068742] mt7621-pci 1e140000.pcie: PCI coherence region base: 0x60000000, mask/settings: 0xf0000002
[    4.087453] mt7621-pci 1e140000.pcie: PCI host bridge to bus 0000:00
[    4.100130] pci_bus 0000:00: root bus resource [io  0x1e160000-0x1e16ffff]
[    4.113822] pci_bus 0000:00: root bus resource [mem 0x60000000-0x6fffffff]
[    4.127515] pci_bus 0000:00: root bus resource [bus 00-ff]
[    4.138483] pci 0000:00:00.0: [0e8d:0801] type 01 class 0x060400
[    4.150482] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x7fffffff]
[    4.162967] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
[    4.175519] pci 0000:00:00.0: supports D1
[    4.183504] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    4.196385] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.212560] pci 0000:01:00.0: [14c3:7615] type 00 class 0x000280
[    4.224580] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit]
[    4.238266] 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.267125] pci 0000:00:00.0: PCI bridge to [bus 01-ff]
[    4.277556] pci 0000:00:00.0:   bridge window [io  0x0000-0x0fff]
[    4.289692] pci 0000:00:00.0:   bridge window [mem 0x00000000-0x000fffff]
[    4.303213] pci 0000:00:00.0:   bridge window [mem 0x00000000-0x000fffff pref]
[    4.317605] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    4.330826] pci 0000:00:00.0: BAR 0: no space for [mem size 0x80000000]
[    4.344002] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x80000000]
[    4.357870] pci 0000:00:00.0: BAR 8: assigned [mem 0x60000000-0x600fffff]
[    4.371392] pci 0000:00:00.0: BAR 9: assigned [mem 0x60100000-0x601fffff pref]
[    4.385779] pci 0000:00:00.0: BAR 1: assigned [mem 0x60200000-0x6020ffff]
[    4.399309] pci 0000:00:00.0: BAR 7: assigned [io  0x1e160000-0x1e160fff]
[    4.412848] pci 0000:01:00.0: BAR 0: assigned [mem 0x60000000-0x600fffff 64bit]
[    4.427416] pci 0000:00:00.0: PCI bridge to [bus 01]
[    4.437305] pci 0000:00:00.0:   bridge window [io  0x1e160000-0x1e160fff]
[    4.450825] pci 0000:00:00.0:   bridge window [mem 0x60000000-0x600fffff]
[    4.464347] pci 0000:00:00.0:   bridge window [mem 0x60100000-0x601fffff pref]
[    4.480132] UBI: auto-attach mtd6
[    4.486754] ubi0: attaching mtd6
[    4.539220] UBI: EOF marker found, PEBs from 36 will be erased
[    4.551117] ubi0: scanning is finished
[    4.623579] ubi0: volume 1 ("rootfs_data") re-sized from 9 to 230 LEBs
[    4.637525] ubi0: attached mtd6 (name "ubi", size 36 MiB)
[    4.648318] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    4.662012] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    4.675533] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    4.689404] ubi0: good PEBs: 288, bad PEBs: 0, corrupted PEBs: 0
[    4.701368] ubi0: user volume: 2, internal volumes: 1, max. volumes count: 128
[    4.715770] ubi0: max/mean erase counter: 1/0, WL threshold: 4096, image sequence number: 1587677224
[    4.733968] ubi0: available PEBs: 0, total reserved PEBs: 288, PEBs reserved for bad PEB handling: 20
[    4.752361] ubi0: background thread "ubi_bgt0d" started, PID 474
[    4.754181] block ubiblock0_0: created from ubi0:0(rootfs)
[    4.775294] ubiblock: device ubiblock0_0 (rootfs) set to be root filesystem
[    4.789177] hctosys: unable to open rtc device (rtc0)
[    4.814132] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    4.832158] Freeing unused kernel memory: 1252K
[    4.841194] This architecture does not have kernel memory protection.
[    4.854017] Run /sbin/init as init process
[    5.471001] init: Console is alive
[    5.478040] init: - watchdog -
[    6.614794] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    6.737412] usbcore: registered new interface driver usbfs
[    6.748457] usbcore: registered new interface driver hub
[    6.759208] usbcore: registered new device driver usb
[    6.771217] exfat: module is from the staging directory, the quality is unknown, you have been warned.
[    6.791490] exFAT: Version 1.3.0
[    6.825081] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    6.844454] SCSI subsystem initialized
[    6.855312] ehci-fsl: Freescale EHCI Host controller driver
[    6.867441] ehci-platform: EHCI generic platform driver
[    6.880693] uhci_hcd: USB Universal Host Controller Interface driver
[    6.900654] xhci-mtk 1e1c0000.xhci: 1e1c0000.xhci supply vusb33 not found, using dummy regulator
[    6.918396] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    6.929015] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 1
[    6.951937] xhci-mtk 1e1c0000.xhci: hcc params 0x01401198 hci version 0x96 quirks 0x0000000000210010
[    6.970235] xhci-mtk 1e1c0000.xhci: irq 20, io mem 0x1e1c0000
[    6.982941] hub 1-0:1.0: USB hub found
[    6.990511] hub 1-0:1.0: 2 ports detected
[    6.999142] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
[    7.009772] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
[    7.024696] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0 SuperSpeed
[    7.037624] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    7.054627] hub 2-0:1.0: USB hub found
[    7.062191] hub 2-0:1.0: 1 port detected
[    7.075510] leds-gpio: probe of leds failed with error -16
[    7.089520] usbcore: registered new interface driver usb-storage
[    7.103156] usbcore: registered new interface driver uas
[    7.114023] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    7.140109] init: - preinit -
[    7.487833] usb 1-1: new high-speed USB device number 2 using xhci-mtk
[    7.522369] usb-storage 1-1:1.0: USB Mass Storage device detected
[    7.544308] scsi host0: usb-storage 1-1:1.0
[    7.582837] random: procd: uninitialized urandom read (4 bytes read)
[    7.772619] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[    7.788700] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[    7.805550] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    7.945247] random: jshn: uninitialized urandom read (4 bytes read)
[    8.060628] random: jshn: uninitialized urandom read (4 bytes read)
[    8.327785] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode
[    8.367938] 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
[    8.585037] scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer Blade     1.27 PQ: 0 ANSI: 6
[    8.605935] sd 0:0:0:0: [sda] 62530624 512-byte logical blocks: (32.0 GB/29.8 GiB)
[    8.622474] sd 0:0:0:0: [sda] Write Protect is off
[    8.632355] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    8.667974]  sda: sda1
[    8.677631] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   12.611192] UBIFS (ubi0:1): default file-system created
[   12.622964] UBIFS (ubi0:1): Mounting in unauthenticated mode
[   12.634463] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 668
[   12.758445] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   12.774081] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   12.793850] UBIFS (ubi0:1): FS size: 27934720 bytes (26 MiB, 220 LEBs), journal size 1396736 bytes (1 MiB, 11 LEBs)
[   12.814633] UBIFS (ubi0:1): reserved for root: 1319425 bytes (1288 KiB)
[   12.827810] UBIFS (ubi0:1): media format: w4/r0 (latest is w5/r0), UUID B9677B32-BFB6-4EDB-B7F7-376FAE495362, small LPT model
[   12.853519] mount_root: overlay filesystem has not been fully initialized yet
[   12.868200] mount_root: switching to ubifs overlay
[   12.898081] overlayfs: upper fs does not support xattr, falling back to index=off and metacopy=off.
[   12.921876] urandom-seed: Seed file not found (/etc/urandom.seed)
[   13.079549] procd: - early -
[   13.085442] procd: - watchdog -
[   13.683931] procd: - watchdog -
[   13.690509] procd: - ubus -
[   13.743522] urandom_read: 5 callbacks suppressed
[   13.743533] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.766366] random: ubusd: uninitialized urandom read (4 bytes read)
[   13.780379] procd: - init -
Please press Enter to activate this console.
[   14.208955] kmodloader: loading kernel modules from /etc/modules.d/*
[   14.238389] Loading modules backported from Linux version v5.4.27-0-g585e0cc08069
[   14.253384] Backport generated by backports.git v5.4.27-1-0-gf6e8852f
[   14.277085] usbcore: registered new interface driver ums-alauda
[   14.290047] usbcore: registered new interface driver ums-cypress
[   14.303284] usbcore: registered new interface driver ums-datafab
[   14.316455] usbcore: registered new interface driver ums-freecom
[   14.329669] usbcore: registered new interface driver ums-isd200
[   14.342716] usbcore: registered new interface driver ums-jumpshot
[   14.356058] usbcore: registered new interface driver ums-karma
[   14.369167] usbcore: registered new interface driver ums-sddr09
[   14.382268] usbcore: registered new interface driver ums-sddr55
[   14.393904] urngd: v1.0.2 started.
[   14.395463] usbcore: registered new interface driver ums-usbat
[   14.420510] xt_time: kernel timezone is -0000
[   14.480948] mt7621-pci 1e140000.pcie: bus=1 slot=0 irq=23
[   14.491773] pci 0000:00:00.0: enabling device (0004 -> 0007)
[   14.503052] mt7615e 0000:01:00.0: enabling device (0000 -> 0002)
[   14.546821] random: crng init done
[   14.555831] PPP generic driver version 2.4.2
[   14.567822] NET: Registered protocol family 24
[   14.593093] kmodloader: done loading kernel modules from /etc/modules.d/*
[   14.610692] mt7615e 0000:01:00.0: HW/SW Version: 0x8a108a10, Build Time: 20180518100604a
[   14.610692] 
[   14.895071] mt7615e 0000:01:00.0: N9 Firmware Version: 2.0, Build Time: 20200131181812
[   15.059112] mt7615e 0000:01:00.0: CR4 Firmware Version: _reserved_, Build Time: 20190121161307
[   52.721290] mtk_soc_eth 1e100000.ethernet eth0: Link is Down
[   52.740434] mtk_soc_eth 1e100000.ethernet eth0: configuring for fixed/rgmii link mode
[   52.756569] mtk_soc_eth 1e100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   52.827889] mt7530 mdio-bus:1f lan1: configuring for phy/gmii link mode
[   52.860207] 8021q: adding VLAN 0 to HW filter on device lan1
[   52.871916] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   52.885447] br-lan: port 1(lan1) entered blocking state
[   52.895956] br-lan: port 1(lan1) entered disabled state
[   52.931883] device lan1 entered promiscuous mode
[   52.941262] device eth0 entered promiscuous mode
[   53.079935] mt7530 mdio-bus:1f lan2: configuring for phy/gmii link mode
[   53.120161] 8021q: adding VLAN 0 to HW filter on device lan2
[   53.132580] br-lan: port 2(lan2) entered blocking state
[   53.143123] br-lan: port 2(lan2) entered disabled state
[   53.203815] device lan2 entered promiscuous mode
[   53.355785] mt7530 mdio-bus:1f lan3: configuring for phy/gmii link mode
[   53.395955] 8021q: adding VLAN 0 to HW filter on device lan3
[   53.407718] br-lan: port 3(lan3) entered blocking state
[   53.418203] br-lan: port 3(lan3) entered disabled state
[   53.511803] device lan3 entered promiscuous mode
[   53.647822] mt7530 mdio-bus:1f lan4: configuring for phy/gmii link mode
[   53.687944] 8021q: adding VLAN 0 to HW filter on device lan4
[   53.699702] br-lan: port 4(lan4) entered blocking state
[   53.710171] br-lan: port 4(lan4) entered disabled state
[   53.827801] device lan4 entered promiscuous mode
[   53.967794] mt7530 mdio-bus:1f wan: configuring for phy/gmii link mode
[   54.016026] 8021q: adding VLAN 0 to HW filter on device wan
[   57.991796] mt7530 mdio-bus:1f lan4: Link is Up - 1Gbps/Full - flow control rx/tx
[   58.006765] br-lan: port 4(lan4) entered blocking state
[   58.017191] br-lan: port 4(lan4) entered forwarding state
[   58.075816] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready


1 Like

That's quick (and great). Will you be submitting a patch?

1 Like

Not at all. The issue was with my syntax. It took me a while to get around the syntax in the MK file.

This is to the "ubootpad96" extra padding for this board. The other device using it is not a NAND so it didn't have to use UBI.

Anyway R1 is probably same like A1 with 16mb flash :confused:

Do you happen to have pictures of the inside of the device? and the factory bootlog by any chance?

anyway how to open this case i unscrewed 4 screws and now?

1 Like

Just a warning but the DIR-878-A1 & the DIR-878-A1-R1 are different
the boot loader & partition layout's are all different & not compatible with each other
the firmware is very different the Russian version is much better :slight_smile:
this maybe the same for the DIR-853-A3

1 Like

Anyway, the R1 firmware can be easily installed on the Russian version and then return to the European version :slight_smile: info from ru support :slight_smile:
this commands from a1
https://gist.github.com/a2nt/10b96f421d18f501ed238a063601291e :stuck_out_tongue:
DIR853/EE=A1/R1
DIR853/ET=A3

I managed to remove the top cover with the help of a flat head screwdriver. I am not sure this is the correct method as I tend to always break a clip when I do that.

can you also post the output of "dmesg"? The flash is diffnately different as mine has 128mb and yours is only 16mb. I guess it's a similar chip to the A1/A2 model.

Having said that the board on the A3 has "DIR-1360 Ver 1.0" written on it. I compared pictures with the exo DIR-1360 and they look the same, I guess Dlink used that board for this specific model.

Nevertheless Lucky1's work on the ubootpad96+mtdsplit made it easy for someone like me to get a working openwrt image on the DIR-853-A3.

EDIT: Just to confirm that my device is A3 which is completely different from A1/R1.

Could you take a photo of the latches?

IMG-20200601-141735 IMG-20200601-141544

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.