Adding device from reverse engineered openwrt firmware-ramips-mt7620-xxxx-squashfs-sysupgrade_ssh.bin

Found a firmware bin that was able to be flashed to a device, however found that this device was not found in the OpenWRT library. I'm able to connect to the device and browse around the files.

How should I begin to add support for this device? I have read through the https://openwrt.org/docs/guide-developer/adding_new_device, and I can retrieve the sbin, lib and etc folders, however, I'm not sure how to get DTS, modules, and the rest of the specific device kernels.

Hoping someone can point me to the right direction.

Whats the device

ubus call system board

FCC ID
How much flash? Ram? what ports? What wifi hardware?

ubus call system board

{
        "kernel": "5.4.171",
        "hostname": "WTU-DR232",
        "system": "MediaTek MT7620A ver:2 eco:6",
        "model": "WTU-DR232",
        "board_name": "wooya,WTU-DR232",
        "release": {
                "distribution": "OpenWrt",
                "version": "21.02-SNAPSHOT",
                "revision": "unknown",
                "target": "ramips/mt7620",
                "description": "OpenWrt 21.02-SNAPSHOT unknown"
        }
}
df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 8.8M      8.8M         0 100% /rom
tmpfs                    60.1M    832.0K     59.3M   1% /tmp
/dev/mtdblock6            4.9M      3.3M      1.6M  67% /overlay
overlayfs:/overlay        4.9M      3.3M      1.6M  67% /
tmpfs                   512.0K         0    512.0K   0% /dev

free -h
              total        used        free      shared  buff/cache   available
Mem:         123112       19012       70652         832       33448       62384
Swap:             0           0           0
root@WTU-DR232:~# iwinfo
ra0       ESSID: "WTU-DR232-71FE"
          Access Point: 60:70:72:54:71:FE
          Mode: Master  Channel: 1 (2.412 GHz)
          Center Channel 1: 1 2: unknown
          Tx-Power: 20 dBm  Link Quality: unknown/70
          Signal: unknown  Noise: unknown
          Bit Rate: unknown
          Encryption: WPA2 PSK (CCMP)
          Type: nl80211  HW Mode(s): 802.11bgn
          Hardware: 14C3:7620 14C3:000C [MediaTek MT7620]
          TX power offset: none
          Frequency offset: none
          Supports VAPs: yes  PHY name: phy0
cat /proc/cpuinfo 
system type             : MediaTek MT7620A ver:2 eco:6
machine                 : WTU-DR232
processor               : 0
cpu model               : MIPS 24KEc V5.0
BogoMIPS                : 385.02
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 32
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16 dsp
Options implemented     : tlb 4kex 4k_cache prefetch mcheck ejtag llsc pindexed_dcache userlocal vint perf_cntr_intr_bit perf
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available
1 Like
cat /proc/mtd # flash size 16MB min
lspci # wifi adapters
1 Like
root@WTU-DR232:~# lspci 
root@WTU-DR232:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00030000 00001000 "u-boot"
mtd1: 00010000 00001000 "u-boot-env"
mtd2: 00010000 00001000 "factory"
mtd3: 00fb0000 00001000 "firmware"
mtd4: 0020aaf4 00001000 "kernel"
mtd5: 00da550c 00001000 "rootfs"
mtd6: 004ef000 00001000 "rootfs_data"
2 Likes

my bad, missed pci id

take binwalk -e -M, try to extract dfs, maybe you find kconfig in firmware.

thanks i’ll try that out and update here