RG-EW3200GX PRO does not boot after flashing OpenWrt

Perhaps this indicates some progress:
I was able to boot the sysupgrade.bin image from TFTP (just to clarify this is the same imaged used during the initial install downloaded from https://openwrt.org/toh/hwdata/ruijie/ruijie_rg-ew3200gx_pro)
The @frollic image aparently did some changes to the mtd partitions during load
Here is the console log (and mtd / mount info at the end of the log)
Notes:

if I try to flash the image to the mtd (via sysupgrade) the router doesn't boot up with error
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
(will provide complete console log in my next post)

Bytes transferred = 15269888 (e90000 hex)
get filesize 0xe90000
bootm flag=0, states=70f
## Loading kernel from FIT Image at 4007ff28 ...
   Using 'config-1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-5.10.176
     Type:         Kernel Image
     Compression:  lzma compressed
     Data Start:   0x40080014
     Data Size:    3757760 Bytes = 3.6 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    crc32
     Hash value:   4bc4af17
     Hash algo:    sha1
     Hash value:   e3392e4f112b42601a89d03996ce4da79fea0f4c
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 4007ff28 ...
   Using 'config-1' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt ruijie_rg-ew3200gx-pro device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4041581c
     Data Size:    28329 Bytes = 27.7 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   d5d49dce
     Hash algo:    sha1
     Hash value:   d399d02d67875c07872172baf0a79e88f37a341c
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x4041581c
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 4cf53000, end 4cf5cea8 ... OK

Starting kernel ...

[ATF][    74.941143]save kernel info
[ATF][    74.944080]Kernel_EL2
[ATF][    74.946750]Kernel is 64Bit
[ATF][    74.949838]pc=0x44000000, r0=0x4cf53000, r1=0x0
INFO:    BL3-1: Preparing for EL3 exit to normal world, Kernel
INFO:    BL3-1: Next image address = 0x44000000
INFO:    BL3-1: Next image spsr = 0x3c9
[ATF][    74.967536]el3_exit
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.10.176 (builder@buildhost) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r20134-5f15225c1e) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Thu Apr 27 20:28:15 2023
[    0.000000] Machine model: Ruijie RG-EW3200GX PRO
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000004fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000042ffffff]
[    0.000000]   node   0: [mem 0x0000000043000000-0x000000004302ffff]
[    0.000000]   node   0: [mem 0x0000000043030000-0x000000004fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000004fffffff]
[    0.000000] On node 0 totalpages: 65536
[    0.000000]   DMA zone: 1024 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 65536 pages, LIFO batch:15
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] percpu: Embedded 20 pages/cpu s44312 r8192 d29416 u81920
[    0.000000] pcpu-alloc: s44312 r8192 d29416 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] CPU features: detected: ARM erratum 843419
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64512
[    0.000000] Kernel command line: console=ttyS0,115200n1 swiotlb=512
[    0.000000] Dentry cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 232824K/262144K available (8318K kernel code, 894K rwdata, 1448K rodata, 448K init, 300K bss, 29320K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] arch_timer: cp15 timer(s) running at 12.50MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049cda, max_idle_ns: 440795202628 ns
[    0.000003] sched_clock: 56 bits at 12MHz, resolution 80ns, wraps every 4398046511080ns
[    0.000188] Calibrating delay loop (skipped), value calculated using timer frequency.. 25.00 BogoMIPS (lpj=125000)
[    0.000199] pid_max: default: 32768 minimum: 301
[    0.000272] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.000279] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.001294] rcu: Hierarchical SRCU implementation.
[    0.001401] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.001587] smp: Bringing up secondary CPUs ...
[    0.001929] Detected VIPT I-cache on CPU1
[    0.001973] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.002035] smp: Brought up 1 node, 2 CPUs
[    0.002043] SMP: Total of 2 processors activated.
[    0.002048] CPU features: detected: 32-bit EL0 Support
[    0.002052] CPU features: detected: CRC32 instructions
[    0.002163] CPU: All CPU(s) started at EL2
[    0.002174] alternatives: patching kernel code
[    0.005256] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.005275] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.005363] pinctrl core: initialized pinctrl subsystem
[    0.006472] NET: Registered protocol family 16
[    0.006801] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.006826] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.006848] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.007163] thermal_sys: Registered thermal governor 'fair_share'
[    0.007166] thermal_sys: Registered thermal governor 'bang_bang'
[    0.007171] thermal_sys: Registered thermal governor 'step_wise'
[    0.007176] thermal_sys: Registered thermal governor 'user_space'
[    0.007393] ASID allocator initialised with 65536 entries
[    0.007900] pstore: Registered ramoops as persistent store backend
[    0.007907] ramoops: using 0x10000@0x42ff0000, ecc: 0
[    0.033548] cryptd: max_cpu_qlen set to 1000
[    0.035305] SCSI subsystem initialized
[    0.035684] libata version 3.00 loaded.
[    0.035809] usbcore: registered new interface driver usbfs
[    0.035835] usbcore: registered new interface driver hub
[    0.035857] usbcore: registered new device driver usb
[    0.037771] clocksource: Switched to clocksource arch_sys_counter
[    0.038309] NET: Registered protocol family 2
[    0.038402] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.039175] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.039193] TCP established hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.039212] TCP bind hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.039239] TCP: Hash tables configured (established 2048 bind 2048)
[    0.039306] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.039321] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.039415] NET: Registered protocol family 1
[    0.039436] PCI: CLS 0 bytes, default 64
[    0.042293] workingset: timestamp_bits=46 max_order=16 bucket_order=0
[    0.044820] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.044833] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.078519] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    0.082144] mt-pmic-pwrap 10001000.pwrap: unexpected interrupt int=0x1
[    0.096211] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.097880] printk: console [ttyS0] disabled
[    0.118082] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 21, base_baud = 1562500) is a ST16650V2
[    0.706092] printk: console [ttyS0] enabled
[    0.711226] mtk_rng 1020f000.rng: registered RNG driver
[    0.711387] random: crng init done
[    0.716625] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.728263] loop: module loaded
[    0.731407] Loading iSCSI transport class v2.0-870.
[    0.737500] mtk-spi-nor 11014000.spi: IRQ not available.
[    0.743571] spi-nor spi0.0: XM25QH128C (16384 Kbytes)
[    0.748778] 8 fixed-partitions partitions found on MTD device spi0.0
[    0.755144] OF: Bad cell count for /spi@11014000/flash@0/partitions
[    0.761420] OF: Bad cell count for /spi@11014000/flash@0/partitions
[    0.767846] Creating 8 MTD partitions on "spi0.0":
[    0.772630] 0x000000000000-0x000000040000 : "Preloader"
[    0.778169] 0x000000040000-0x000000060000 : "ATF"
[    0.783117] 0x000000060000-0x0000000b0000 : "u-boot"
[    0.788326] 0x0000000b0000-0x0000000d0000 : "u-boot-env"
[    0.793840] 0x0000000d0000-0x000000150000 : "Factory"
[    0.799140] 0x000000150000-0x000000160000 : "product_info"
[    0.804839] 0x000000160000-0x000000170000 : "kdump"
[    0.809947] 0x000000170000-0x000001000000 : "firmware"
[    0.815423] 2 fit-fw partitions found on MTD device firmware
[    0.821088] Creating 2 MTD partitions on "firmware":
[    0.826045] 0x000000000000-0x0000003e0000 : "kernel"
[    0.831351] 0x0000003e0000-0x000000e90000 : "rootfs"
[    0.836513] mtd: setting mtd36 (rootfs) as root device
[    0.841697] 1 squashfs-split partitions found on MTD device rootfs
[    0.847878] 0x0000007d0000-0x000000e90000 : "rootfs_data"
[    0.865475] mtk-spi-nor 11014000.spi: spi frequency: 46666653 Hz
[    0.896983] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xffffffc011bc0000, irq 28
[    0.906555] i2c /dev entries driver
[    0.911020] mtk-wdt 10212000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    0.921687] NET: Registered protocol family 10
[    0.926768] Segment Routing with IPv6
[    0.930489] NET: Registered protocol family 17
[    0.934952] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.948071] 8021q: 802.1Q VLAN Support v1.8
[    0.953402] pstore: Using crash dump compression: deflate
[    0.968082] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges:
[    0.974618] mtk-pcie 1a143000.pcie: Parsing ranges property...
[    0.980466] mtk-pcie 1a143000.pcie:      MEM 0x0020000000..0x0027ffffff -> 0x0020000000
[    1.027286] mtk-pcie 1a143000.pcie: PCI host bridge to bus 0000:00
[    1.033473] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.038955] pci_bus 0000:00: root bus resource [mem 0x20000000-0x27ffffff]
[    1.045822] pci_bus 0000:00: scanning bus
[    1.049874] pci 0000:00:00.0: [14c3:3258] type 01 class 0x060400
[    1.055901] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x1ffffffff 64bit pref]
[    1.064564] pci_bus 0000:00: fixups for bus
[    1.068749] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 0
[    1.075442] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.083455] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 1
[    1.090245] pci_bus 0000:01: scanning bus
[    1.094458] pci 0000:01:00.0: [14c3:7915] type 00 class 0x000280
[    1.100639] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
[    1.107962] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit pref]
[    1.115283] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit pref]
[    1.123238] pci 0000:01:00.0: supports D1 D2
[    1.127499] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.134134] pci 0000:01:00.0: PME# disabled
[    1.138622] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    1.178896] pci_bus 0000:01: fixups for bus
[    1.183073] pci_bus 0000:01: bus scan returning with max=01
[    1.188649] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.195260] pci_bus 0000:00: bus scan returning with max=01
[    1.200843] pci 0000:00:00.0: BAR 0: no space for [mem size 0x200000000 64bit pref]
[    1.208495] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x200000000 64bit pref]
[    1.216491] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    1.223277] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit pref]
[    1.231100] pci 0000:01:00.0: BAR 2: assigned [mem 0x20100000-0x20103fff 64bit pref]
[    1.238925] pci 0000:01:00.0: BAR 4: assigned [mem 0x20104000-0x20104fff 64bit pref]
[    1.246742] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.251710] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    1.258567] pcieport 0000:00:00.0: of_irq_parse_pci: failed with rc=-22
[    1.265172] pcieport 0000:00:00.0: assign IRQ: got 0
[    1.270144] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[    1.276247] pcieport 0000:00:00.0: enabling bus mastering
[    1.282067] mtk_hsdma 1b007000.dma-controller: Using 3 as missing dma-requests property
[    1.290267] mtk_hsdma 1b007000.dma-controller: MediaTek HSDMA driver registered
[    1.345917] mt7530 mdio-bus:00 lan1 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=136)
[    1.365637] mt7530 mdio-bus:00 lan2 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=137)
[    1.385263] mt7530 mdio-bus:00 lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=138)
[    1.404892] mt7530 mdio-bus:00 lan4 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=139)
[    1.424499] mt7530 mdio-bus:00 wan (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7531 PHY] (irq=140)
[    1.436004] mt7530 mdio-bus:00: configuring for fixed/2500base-x link mode
[    1.443041] DSA: tree 0 setup
[    1.443240] mt7530 mdio-bus:00: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    1.456458] VFS: Mounted root (squashfs filesystem) readonly on device 31:36.
[    1.463799] Freeing unused kernel memory: 448K
[    1.507812] Run /sbin/init as init process
[    1.511899]   with arguments:
[    1.514857]     /sbin/init
[    1.517553]   with environment:
[    1.520704]     HOME=/
[    1.523054]     TERM=linux
[    1.765103] init: Console is alive
[    1.768656] init: - watchdog -
[    1.804180] kmodloader: no module folders for kernel version 5.10.176 found
[    1.812330] init: - preinit -
[    2.154909] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/2500base-x link mode
[    2.163274] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    2.176010] mt7530 mdio-bus:00 lan1: configuring for phy/gmii link mode
[    2.183269] 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
[    4.277863] jffs2: notice: (834) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    4.294691] mount_root: switching to jffs2 overlay
[    4.311915] overlayfs: upper fs does not support tmpfile.
[    4.333367] overlayfs: "xino" feature enabled using 32 upper inode bits.
[    4.348197] urandom-seed: Seeding with /etc/urandom.seed
[    4.397935] procd: - early -
[    4.400868] procd: - watchdog -
[    4.935920] procd: - watchdog -
[    4.939327] procd: - ubus -
[    4.992810] procd: - init -
Please press Enter to activate this console.
[    5.224071] urngd: v1.0.2 started.
[    5.237284] kmodloader: no module folders for kernel version 5.10.176 found
[    8.550947] mtk_soc_eth 1b100000.ethernet eth0: Link is Down
[    8.560924] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/2500base-x link mode
[    8.569327] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    8.569561] br-lan: port 1(eth0) entered blocking state
[    8.583194] br-lan: port 1(eth0) entered disabled state
[    8.588596] device eth0 entered promiscuous mode
[    8.595144] br-lan: port 1(eth0) entered blocking state
[    8.600406] br-lan: port 1(eth0) entered forwarding state



BusyBox v1.36.1 (2023-05-26 21:04:48 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt SNAPSHOT, r23104-ef98dc3b3e
 -----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:/# ifconfig
br-lan    Link encap:Ethernet  HWaddr 54:16:51:BE:AF:30  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fd0a:7463:1794::1/60 Scope:Global
          inet6 addr: fe80::5616:51ff:febe:af30/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1504  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:1928 (1.8 KiB)

eth0      Link encap:Ethernet  HWaddr 54:16:51:BE:AF:30  
          UP BROADCAST RUNNING MULTICAST  MTU:1504  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:20 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:2784 (2.7 KiB)
          Interrupt:28 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:88 errors:0 dropped:0 overruns:0 frame:0
          TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6864 (6.7 KiB)  TX bytes:6864 (6.7 KiB)

root@OpenWrt:/#  df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 4.0M      4.0M         0 100% /rom
tmpfs                   113.9M     52.0K    113.9M   0% /tmp
/dev/mtdblock10           6.8M    348.0K      6.4M   5% /overlay
overlayfs:/overlay        6.8M    348.0K      6.4M   5% /
tmpfs                   512.0K         0    512.0K   0% /dev

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00010000 "Preloader"
mtd1: 00020000 00010000 "ATF"
mtd2: 00050000 00010000 "u-boot"
mtd3: 00020000 00010000 "u-boot-env"
mtd4: 00080000 00010000 "Factory"
mtd5: 00010000 00010000 "product_info"
mtd6: 00010000 00010000 "kdump"
mtd7: 00e90000 00010000 "firmware"
mtd8: 003e0000 00010000 "kernel"
mtd9: 00ab0000 00010000 "rootfs"
mtd10: 006c0000 00010000 "rootfs_data"

root@OpenWrt:/# touch /etc/_test

root@OpenWrt:/# cat /etc/fw_env.config
cat: can't open '/etc/fw_env.config': No such file or directory

root@OpenWrt:/# cat /proc/cmdline
console=ttyS0,115200n1 swiotlb=512

root@OpenWrt:/# mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock10 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,noexec,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,noatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
pstore on /sys/fs/pstore type pstore (rw,noatime)
root@OpenWrt:/#

This is the "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)"
the image starts to load but it seems to have some trouble mounting the mtd partitions

 *** U-Boot SPI NOR ***

     1. System Load Linux to SDRAM via TFTP.
     2. System Load Linux firmware then write to Flash via TFTP.

SELECTING OPTION 2

[do_read_image_blks] This is a FIT image,img_size = 0x39ccec
[do_read_image_blks] img_blks = 0x39ccec
[do_read_image_blks] img_align_size = 0x39ccec
read len: 3788012
bootm flag=0, states=70f
## Loading kernel from FIT Image at 4007ff28 ...
   Using 'config-1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-5.10.176
     Type:         Kernel Image
     Compression:  lzma compressed
     Data Start:   0x40080014
     Data Size:    3757760 Bytes = 3.6 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x44000000
     Entry Point:  0x44000000
     Hash algo:    crc32
     Hash value:   4bc4af17
     Hash algo:    sha1
     Hash value:   e3392e4f112b42601a89d03996ce4da79fea0f4c
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 4007ff28 ...
   Using 'config-1' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt ruijie_rg-ew3200gx-pro device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4041581c
     Data Size:    28329 Bytes = 27.7 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   d5d49dce
     Hash algo:    sha1
     Hash value:   d399d02d67875c07872172baf0a79e88f37a341c
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x4041581c
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 4cf53000, end 4cf5cea8 ... OK

Starting kernel ...

[ATF][   126.129108]save kernel info
[ATF][   126.132045]Kernel_EL2
[ATF][   126.134715]Kernel is 64Bit
[ATF][   126.137803]pc=0x44000000, r0=0x4cf53000, r1=0x0
INFO:    BL3-1: Preparing for EL3 exit to normal world, Kernel
INFO:    BL3-1: Next image address = 0x44000000
INFO:    BL3-1: Next image spsr = 0x3c9
[ATF][   126.155501]el3_exit
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.10.176 (builder@buildhost) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r20134-5f15225c1e) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 SMP Thu Apr 27 20:28:15 2023
[    0.000000] Machine model: Ruijie RG-EW3200GX PRO
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000004fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000042ffffff]
[    0.000000]   node   0: [mem 0x0000000043000000-0x000000004302ffff]
[    0.000000]   node   0: [mem 0x0000000043030000-0x000000004fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000004fffffff]
[    0.000000] On node 0 totalpages: 65536
[    0.000000]   DMA zone: 1024 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 65536 pages, LIFO batch:15
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv0.2 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: Trusted OS migration not required
[    0.000000] percpu: Embedded 20 pages/cpu s44312 r8192 d29416 u81920
[    0.000000] pcpu-alloc: s44312 r8192 d29416 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: detected: ARM erratum 845719
[    0.000000] CPU features: kernel page table isolation disabled by kernel configuration
[    0.000000] CPU features: detected: ARM erratum 843419
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64512
[    0.000000] Kernel command line: console=ttyS0,115200n1 swiotlb=512
[    0.000000] Dentry cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 232824K/262144K available (8318K kernel code, 894K rwdata, 1448K rodata, 448K init, 300K bss, 29320K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] GIC: GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
[    0.000000] arch_timer: cp15 timer(s) running at 12.50MHz (phys).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x2e2049cda, max_idle_ns: 440795202628 ns
[    0.000003] sched_clock: 56 bits at 12MHz, resolution 80ns, wraps every 4398046511080ns
[    0.000189] Calibrating delay loop (skipped), value calculated using timer frequency.. 25.00 BogoMIPS (lpj=125000)
[    0.000199] pid_max: default: 32768 minimum: 301
[    0.000272] Mount-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.000279] Mountpoint-cache hash table entries: 512 (order: 0, 4096 bytes, linear)
[    0.001297] rcu: Hierarchical SRCU implementation.
[    0.001405] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.001591] smp: Bringing up secondary CPUs ...
[    0.001934] Detected VIPT I-cache on CPU1
[    0.001978] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.002040] smp: Brought up 1 node, 2 CPUs
[    0.002048] SMP: Total of 2 processors activated.
[    0.002053] CPU features: detected: 32-bit EL0 Support
[    0.002058] CPU features: detected: CRC32 instructions
[    0.002168] CPU: All CPU(s) started at EL2
[    0.002179] alternatives: patching kernel code
[    0.005258] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.005277] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.005366] pinctrl core: initialized pinctrl subsystem
[    0.006515] NET: Registered protocol family 16
[    0.006784] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.006813] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.006836] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.007114] thermal_sys: Registered thermal governor 'fair_share'
[    0.007117] thermal_sys: Registered thermal governor 'bang_bang'
[    0.007122] thermal_sys: Registered thermal governor 'step_wise'
[    0.007126] thermal_sys: Registered thermal governor 'user_space'
[    0.007313] ASID allocator initialised with 65536 entries
[    0.007734] pstore: Registered ramoops as persistent store backend
[    0.007739] ramoops: using 0x10000@0x42ff0000, ecc: 0
[    0.033530] cryptd: max_cpu_qlen set to 1000
[    0.035332] SCSI subsystem initialized
[    0.035460] libata version 3.00 loaded.
[    0.035600] usbcore: registered new interface driver usbfs
[    0.035632] usbcore: registered new interface driver hub
[    0.035656] usbcore: registered new device driver usb
[    0.036710] clocksource: Switched to clocksource arch_sys_counter
[    0.037262] NET: Registered protocol family 2
[    0.037365] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.037707] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.037724] TCP established hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.037743] TCP bind hash table entries: 2048 (order: 3, 32768 bytes, linear)
[    0.037772] TCP: Hash tables configured (established 2048 bind 2048)
[    0.037837] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.037853] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.037940] NET: Registered protocol family 1
[    0.037960] PCI: CLS 0 bytes, default 64
[    0.040560] workingset: timestamp_bits=46 max_order=16 bucket_order=0
[    0.043078] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.043088] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.075606] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    0.079621] mt-pmic-pwrap 10001000.pwrap: unexpected interrupt int=0x1
[    0.093815] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.095642] printk: console [ttyS0] disabled
[    0.115851] 11002000.serial: ttyS0 at MMIO 0x11002000 (irq = 21, base_baud = 1562500) is a ST16650V2
[    0.703962] printk: console [ttyS0] enabled
[    0.709043] mtk_rng 1020f000.rng: registered RNG driver
[    0.709217] random: crng init done
[    0.714442] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.726045] loop: module loaded
[    0.729209] Loading iSCSI transport class v2.0-870.
[    0.735297] mtk-spi-nor 11014000.spi: IRQ not available.
[    0.741364] spi-nor spi0.0: XM25QH128C (16384 Kbytes)
[    0.746542] 8 fixed-partitions partitions found on MTD device spi0.0
[    0.752932] OF: Bad cell count for /spi@11014000/flash@0/partitions
[    0.759211] OF: Bad cell count for /spi@11014000/flash@0/partitions
[    0.765621] Creating 8 MTD partitions on "spi0.0":
[    0.770428] 0x000000000000-0x000000040000 : "Preloader"
[    0.775970] 0x000000040000-0x000000060000 : "ATF"
[    0.780963] 0x000000060000-0x0000000b0000 : "u-boot"
[    0.786147] 0x0000000b0000-0x0000000d0000 : "u-boot-env"
[    0.791700] 0x0000000d0000-0x000000150000 : "Factory"
[    0.797000] 0x000000150000-0x000000160000 : "product_info"
[    0.802696] 0x000000160000-0x000000170000 : "kdump"
[    0.807810] 0x000000170000-0x000001000000 : "firmware"
[    0.825486] FIT image in "firmware" at offset e90000 has null size
[    0.840407] mtk-spi-nor 11014000.spi: spi frequency: 46666653 Hz
[    0.871947] mtk_soc_eth 1b100000.ethernet eth0: mediatek frame engine at 0xffffffc011c20000, irq 28
[    0.881516] i2c /dev entries driver
[    0.885951] mtk-wdt 10212000.watchdog: Watchdog enabled (timeout=31 sec, nowayout=0)
[    0.896625] NET: Registered protocol family 10
[    0.901696] Segment Routing with IPv6
[    0.905396] NET: Registered protocol family 17
[    0.909874] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    0.923063] 8021q: 802.1Q VLAN Support v1.8
[    0.928441] pstore: Using crash dump compression: deflate
[    0.943104] mtk-pcie 1a143000.pcie: host bridge /pcie@1a143000 ranges:
[    0.949665] mtk-pcie 1a143000.pcie: Parsing ranges property...
[    0.955495] mtk-pcie 1a143000.pcie:      MEM 0x0020000000..0x0027ffffff -> 0x0020000000
[    1.002305] mtk-pcie 1a143000.pcie: PCI host bridge to bus 0000:00
[    1.008492] pci_bus 0000:00: root bus resource [bus 00-ff]
[    1.013969] pci_bus 0000:00: root bus resource [mem 0x20000000-0x27ffffff]
[    1.020841] pci_bus 0000:00: scanning bus
[    1.024884] pci 0000:00:00.0: [14c3:3258] type 01 class 0x060400
[    1.030918] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x1ffffffff 64bit pref]
[    1.039576] pci_bus 0000:00: fixups for bus
[    1.043754] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 0
[    1.050458] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    1.058468] pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 1
[    1.065250] pci_bus 0000:01: scanning bus
[    1.069466] pci 0000:01:00.0: [14c3:7915] type 00 class 0x000280
[    1.075644] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x000fffff 64bit pref]
[    1.082967] pci 0000:01:00.0: reg 0x18: [mem 0x00000000-0x00003fff 64bit pref]
[    1.090291] pci 0000:01:00.0: reg 0x20: [mem 0x00000000-0x00000fff 64bit pref]
[    1.098249] pci 0000:01:00.0: supports D1 D2
[    1.102510] pci 0000:01:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    1.109143] pci 0000:01:00.0: PME# disabled
[    1.113622] pci 0000:01:00.0: 2.000 Gb/s available PCIe bandwidth, limited by 2.5 GT/s PCIe x1 link at 0000:00:00.0 (capable of 4.000 Gb/s with 5.0 GT/s PCIe x1 link)
[    1.157862] pci_bus 0000:01: fixups for bus
[    1.162039] pci_bus 0000:01: bus scan returning with max=01
[    1.167615] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    1.174225] pci_bus 0000:00: bus scan returning with max=01
[    1.179809] pci 0000:00:00.0: BAR 0: no space for [mem size 0x200000000 64bit pref]
[    1.187461] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x200000000 64bit pref]
[    1.195456] pci 0000:00:00.0: BAR 8: assigned [mem 0x20000000-0x201fffff]
[    1.202242] pci 0000:01:00.0: BAR 0: assigned [mem 0x20000000-0x200fffff 64bit pref]
[    1.210065] pci 0000:01:00.0: BAR 2: assigned [mem 0x20100000-0x20103fff 64bit pref]
[    1.217889] pci 0000:01:00.0: BAR 4: assigned [mem 0x20104000-0x20104fff 64bit pref]
[    1.225707] pci 0000:00:00.0: PCI bridge to [bus 01]
[    1.230672] pci 0000:00:00.0:   bridge window [mem 0x20000000-0x201fffff]
[    1.237528] pcieport 0000:00:00.0: of_irq_parse_pci: failed with rc=-22
[    1.244133] pcieport 0000:00:00.0: assign IRQ: got 0
[    1.249104] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
[    1.255207] pcieport 0000:00:00.0: enabling bus mastering
[    1.261033] mtk_hsdma 1b007000.dma-controller: Using 3 as missing dma-requests property
[    1.269237] mtk_hsdma 1b007000.dma-controller: MediaTek HSDMA driver registered
[    1.324869] mt7530 mdio-bus:00 lan1 (uninitialized): PHY [mt7530-0:00] driver [MediaTek MT7531 PHY] (irq=136)
[    1.344599] mt7530 mdio-bus:00 lan2 (uninitialized): PHY [mt7530-0:01] driver [MediaTek MT7531 PHY] (irq=137)
[    1.364211] mt7530 mdio-bus:00 lan3 (uninitialized): PHY [mt7530-0:02] driver [MediaTek MT7531 PHY] (irq=138)
[    1.383828] mt7530 mdio-bus:00 lan4 (uninitialized): PHY [mt7530-0:03] driver [MediaTek MT7531 PHY] (irq=139)
[    1.403443] mt7530 mdio-bus:00 wan (uninitialized): PHY [mt7530-0:04] driver [MediaTek MT7531 PHY] (irq=140)
[    1.414943] mt7530 mdio-bus:00: configuring for fixed/2500base-x link mode
[    1.421989] DSA: tree 0 setup
[    1.422181] mt7530 mdio-bus:00: Link is Up - 2.5Gbps/Full - flow control rx/tx
[    1.432430] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6
[    1.439915] Please append a correct "root=" boot option; here are the available partitions:
[    1.448274] 1f00             256 mtdblock0 
[    1.448276]  (driver?)
[    1.454800] 1f04             128 mtdblock1 
[    1.454802]  (driver?)
[    1.461329] 1f08             320 mtdblock2 
[    1.461331]  (driver?)
[    1.467858] 1f0c             128 mtdblock3 
[    1.467859]  (driver?)
[    1.474383] 1f10             512 mtdblock4 
[    1.474385]  (driver?)
[    1.480910] 1f14              64 mtdblock5 
[    1.480912]  (driver?)
[    1.487442] 1f18              64 mtdblock6 
[    1.487443]  (driver?)
[    1.493966] 1f1c           14912 mtdblock7 
[    1.493968]  (driver?)
[    1.500493] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[    1.508748] SMP: stopping secondary CPUs
[    1.512663] Kernel Offset: disabled
[    1.516143] CPU features: 0x00000002,04002004
[    1.520489] Memory Limit: none
[    1.526331] Rebooting in 1 seconds..

and keeps in a rebooting loop...

I'm stuck at this point....

Well, another try
I've got ANOTHER Ruijie RG-EW3200GX PRO with STOCK firmware
followed https://git.openwrt.org/?p=openwrt/openwrt.git;a=commit;h=ce8a33b021a703b1933f627835f6cdc88c0ecdd3

Back up firmware(mtd7) partitions with:
        dd if=/dev/mtd7 of=/tmp/firmware.bin
   and then download the firmware.bin image via SCP.

en switched back to the "briked" RG-EW3200GX PRO and tried reverting to stock firmware using the steps provided in the url mentioned before **(DID NOT WORK)

root@OpenWrt:/tmp/tmp# mtd write firmware.bin firmware
Unlocking firmware ...

rebooted

read len: 8192
[do_read_image_blks] This is a FIT image,img_size = 0x39ccec
[do_read_image_blks] img_blks = 0x39ccec
[do_read_image_blks] img_align_size = 0x39ccec
read len: 3788012
bootm flag=0, states=70f
## Loading kernel from FIT Image at 4007ff28 ...
Bad FIT kernel image format!
ERROR: can't get kernel image!
MT7622>

tried with dd

root@OpenWrt:~# dd of=/tmp/firmware.bin if=/dev/mtd7
29824+0 records in
29824+0 records out
root@OpenWrt:~#

same error:

read len: 8192
[do_read_image_blks] This is a FIT image,img_size = 0x39ccec
[do_read_image_blks] img_blks = 0x39ccec
[do_read_image_blks] img_align_size = 0x39ccec
read len: 3788012
bootm flag=0, states=70f
## Loading kernel from FIT Image at 4007ff28 ...
Bad FIT kernel image format!
ERROR: can't get kernel image!
MT7622>

tried to load the image by TFTP --> same error

TFTP from server 10.10.10.3; our IP address is 10.10.10.254
Filename 'firmware.bin'.
Load address: 0x4007ff28
Loading: T T #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #
         4 MiB/s
done
Bytes transferred = 15269888 (e90000 hex)
get filesize 0xe90000
bootm flag=0, states=70f
Wrong Image Format for bootm command
ERROR: can't get kernel image!
MT7622> reset
resetting ...
mtk_arch_reset at pre-loader!

so......... what's going on???

so far I have to conclude that the information provided in the URL is NOT WORKING

Hello!, hope you all are ok!
Any advice or tip anyone of you can give me in order to unbrick the RG-EW3200GW PRO ?

So far, I'm wondering if other users could get into the same trouble by using the images and instructions published in the OpenWrt web

I have limited developer skills, but I'm willing to try to help in any possible way:
to diagnose if there was a hardware change (vs the devices I own and the published images)
provide a remote session for someone to do some debug
build a new image?
add a warning to the web alerting that the wiki might be innacurate

Thanks a lot!

1 Like

You didn't follow them though, AFAIK ?

1 Like

first device, you are right, I did not follow the exact procedure (my mistake)
second device, used the exact instructions and got the same problem...
and the recovery to stock procedure didn't work either
also the 5.0GHz radio is not recognized booting the -sysupgrade.bin neither the initramfs.bin

1 Like

just to follow up, I was able to restore the stock firmware.
So far the whole problem seems an MTD partition layout mismatch, causing the sysupgrade to be placed in the wrong offset (bricking the device)

This is the stock firmware booting:

[    1.210763] mtk-nor 11014000.spi: xm25qh128c (16384 Kbytes)
[    1.216422] 8 ofpart partitions found on MTD device mtk_nor
[    1.221993] Creating 8 MTD partitions on "mtk_nor":
[    1.226868] 0x000000000000-0x000000020000 : "Preloader"
[    1.232564] 0x000000020000-0x000000030000 : "ATF"   ---->> ATF is between 2000 and 3000
[    1.237702] 0x000000030000-0x000000080000 : "u-boot"
[    1.243066] 0x000000080000-0x000000090000 : "u-boot-env"
[    1.248799] 0x000000090000-0x0000000d0000 : "Factory"
[    1.254260] 0x0000000d0000-0x0000000e0000 : "product_info"
[    1.260142] 0x0000000e0000-0x0000000f0000 : "kdump"
[    1.265423] 0x0000000f0000-0x000001000000 : "firmware"  --> firm starting at f0000
[    1.271453] 2 fit-fw partitions found on MTD device firmware
[    1.277112] 0x0000000f0000-0x0000002e0000 : "kernel"
[    1.282477] 0x0000002f0000-0x000001000000 : "rootfs"
[    1.287881] mtd: device 9 (rootfs) set to be root filesystem
[    1.293703] 1 squashfs-split partitions found on MTD device rootfs
[    1.299889] 0x000000ee0000-0x000001000000 : "rootfs_data"

This is the output using the initramfs image mentioned for the install procedure in the OpenWrt git/website:


[    1.791298] spi-nor spi0.0: XM25QH128C (16384 Kbytes)
[    1.799766] 8 fixed-partitions partitions found on MTD device spi0.0
[    1.806151] OF: Bad cell count for /spi@11014000/flash@0/partitions
[    1.812468] OF: Bad cell count for /spi@11014000/flash@0/partitions
[    1.818947] Creating 8 MTD partitions on "spi0.0":
[    1.823731] 0x000000000000-0x000000040000 : "Preloader"
[    1.829281] 0x000000040000-0x000000060000 : "ATF"   ----->> MISMATCH
[    1.834228] 0x000000060000-0x0000000b0000 : "u-boot"
[    1.839437] 0x0000000b0000-0x0000000d0000 : "u-boot-env"
[    1.844961] 0x0000000d0000-0x000000150000 : "Factory"
[    1.850291] 0x000000150000-0x000000160000 : "product_info"
[    1.855990] 0x000000160000-0x000000170000 : "kdump"
[    1.861128] 0x000000170000-0x000001000000 : "firmware" ----->> MISMATCH
[    1.878480] no rootfs found after FIT image in "firmware"

So, following the install instructions and next doing a sysupgrade the result is a bricked router:

bootm flag=0, states=70f
## Loading kernel from FIT Image at 4007ff28 ...
Bad FIT kernel image format!
ERROR: can't get kernel image!
1 Like

Well, got it working. Step 1 Built a custom image, changed mt7622-ruijie-rg-ew3200gx-pro.dts to match the proper mtd offsets (matching the stock firmware) and voilá! OpenWrt booted up just fine, and only then the 5G drivers loaded properly. Step 2 built another image with Luci pre-installed. Step 3 extensive testing (still in progress).

Bellow some screenshots:
imagen

imagen

@frollic thanks for your help

1 Like

Good work!

Post the DTS, will you?

1 Like

Here you go (contents of the modified mt7622-ruijie-rg-ew3200gx-pro.dts changed from line 248 to line 327):

// SPDX-License-Identifier: GPL-2.0-or-later OR MIT

/dts-v1/;
#include <dt-bindings/input/input.h>
#include <dt-bindings/gpio/gpio.h>

#include "mt7622.dtsi"
#include "mt6380.dtsi"

/ {
	model = "Ruijie RG-EW3200GX PRO";
	compatible = "ruijie,rg-ew3200gx-pro", "mediatek,mt7622";

	aliases {
		ethernet0 = &gmac0;
		label-mac-device = &gmac0;
		led-boot = &led_system;
		led-failsafe = &led_system;
		led-running = &led_system;
		led-upgrade = &led_system;
		serial0 = &uart0;
	};

	chosen {
		stdout-path = "serial0:115200n1";
		bootargs = "console=ttyS0,115200n1 swiotlb=512";
	};

	cpus {
		cpu@0 {
			proc-supply = <&mt6380_vcpu_reg>;
			sram-supply = <&mt6380_vm_reg>;
		};

		cpu@1 {
			proc-supply = <&mt6380_vcpu_reg>;
			sram-supply = <&mt6380_vm_reg>;
		};
	};

	gpio-keys {
		compatible = "gpio-keys";

		reset {
			label = "reset";
			linux,code = <KEY_RESTART>;
			gpios = <&pio 0 GPIO_ACTIVE_LOW>;
		};

		wps {
			label = "wps";
			linux,code = <KEY_WPS_BUTTON>;
			gpios = <&pio 102 GPIO_ACTIVE_LOW>;
		};
	};

	gpio-leds {
		compatible = "gpio-leds";

		mesh_green {
			label = "green:mesh";
			gpios = <&pio 79 GPIO_ACTIVE_LOW>;
		};

		mesh_red {
			label = "red:mesh";
			gpios = <&pio 82 GPIO_ACTIVE_LOW>;
		};

		led_system: system_blue {
			label = "blue:system";
			gpios = <&pio 81 GPIO_ACTIVE_LOW>;
			default-state = "on";
		};
	};

	memory {
		reg = <0 0x40000000 0 0x40000000>;
	};
};

&eth {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&eth_pins>;

	gmac0: mac@0 {
		compatible = "mediatek,eth-mac";
		reg = <0>;
		phy-connection-type = "2500base-x";
		fixed-link {
			speed = <2500>;
			full-duplex;
			pause;
		};
	};

	mdio: mdio-bus {
		#address-cells = <1>;
		#size-cells = <0>;

		switch@0 {
			compatible = "mediatek,mt7531";
			reg = <0>;
			reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
			
			interrupt-controller;
			#interrupt-cells = <2>;
			interrupt-parent = <&pio>;
			interrupts = <53 IRQ_TYPE_LEVEL_HIGH>;

			ports {
				#address-cells = <1>;
				#size-cells = <0>;

				port@0 {
					reg = <0>;
					label = "lan1";
				};

				port@1 {
					reg = <1>;
					label = "lan2";
				};

				port@2 {
					reg = <2>;
					label = "lan3";
				};

				port@3 {
					reg = <3>;
					label = "lan4";
				};

				wan: port@4 {
					reg = <4>;
					label = "wan";
				};

				port@6 {
					reg = <6>;
					label = "cpu";
					ethernet = <&gmac0>;
					phy-mode = "2500base-x";

					fixed-link {
						speed = <2500>;
						full-duplex;
						pause;
					};
				};
			};
		};
	};
};

&pcie0 {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&pcie0_pins>;
};

&slot0 {
	mt7915@0,0 {
		reg = <0x0000 0 0 0 0>;
		mediatek,mtd-eeprom = <&factory 0x5000>;
		ieee80211-freq-limit = <5000000 6000000>;
	};
};

&pio {
	epa_elna_pins: epa-elna-pins {
		mux {
			function = "antsel";
			groups = "antsel0", "antsel1", "antsel2", "antsel3",
				"antsel4", "antsel5", "antsel6", "antsel7",
				"antsel8", "antsel9", "antsel12", "antsel13",
				"antsel14", "antsel15", "antsel16", "antsel17";
		};
	};

	eth_pins: eth-pins {
		mux {
			function = "eth";
			groups = "mdc_mdio", "rgmii_via_gmac2";
		};
	};

	pcie0_pins: pcie0-pins {
		mux {
			function = "pcie";
			groups = "pcie0_pad_perst",
				 "pcie0_0_waken",
				 "pcie0_0_clkreq";
		};
	};

	pmic_bus_pins: pmic-bus-pins {
		mux {
			function = "pmic";
			groups = "pmic_bus";
		};
	};

	spi_nor_pins: spi-nor-pins {
		mux {
			function = "flash";
			groups = "spi_nor";
		};
	};

	uart0_pins: uart0-pins {
		mux {
			function = "uart";
			groups = "uart0_0_tx_rx";
		};
	};

	watchdog_pins: watchdog-pins {
		mux {
			function = "watchdog";
			groups = "watchdog";
		};
	};
};

&pwrap {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&pmic_bus_pins>;
};

&nor_flash {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&spi_nor_pins>;

	flash@0 {
		compatible = "jedec,spi-nor";
		reg = <0>;
		spi-max-frequency = <50000000>;

		partitions {
			compatible = "fixed-partitions";
			#address-cells = <1>;
			#size-cells = <1>;

			partition@0 {
				label = "Preloader";
				reg = <0x0 0x20000>;
				read-only;
			};

			partition@20000 {
				label = "ATF";
				reg = <0x20000 0x10000>;
				read-only;
			};

			partition@30000 {
				label = "u-boot";
				reg = <0x30000 0x50000>;
				read-only;
			};

			partition@80000 {
				label = "u-boot-env";
				reg = <0x80000 0x10000>;
			};

			factory: partition@90000 {
				label = "Factory";
				reg = <0x90000 0x40000>;
				read-only;
			};

			partition@d0000 {
				label = "product_info";
				reg = <0xd0000 0x10000>;
				read-only;
			};

			partition@e0000 {
				label = "kdump";
				reg = <0xe0000 0x10000>;
				read-only;
			};

			partition@f0000 {
				compatible = "denx,fit";
				label = "firmware";
				reg = <0xf0000 0xf10000>;
			};
		};
	};
};

&rtc {
	status = "disabled";
};

&uart0 {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&uart0_pins>;
};

&watchdog {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&watchdog_pins>;
};

&wmac {
	status = "okay";

	pinctrl-names = "default";
	pinctrl-0 = <&epa_elna_pins>;
	mediatek,mtd-eeprom = <&factory 0x0>;
};
1 Like

Hello everyone! Can you help me with a full dump for SPI programmer for this router. Partitions MTD made with openwrt are also good. Any help will be appreciated. Thank you!

Hi, I'm facing the same situation now. I have a question about how to build your own image. I can extract dtbs from openwrt firmware. Maybe I can convert it to dts then change to right partitions and recompile to the dtb. But I'm not sure what to do next. Can you help me?

Hi, have you considered contributing your changes to the official repo?

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