Backport QSDK binary firmware back to OpenWrt

hi there. my friend got a ORing IAR630C router with access point. it is based on QSDK with a very buggy and poorly written php based user interface. it feels replacing it by more robust openwrt would be a great idea. i had gone through the openwrt document but i am not too sure how to create dst and dsti file, and initial scripts. will it be possible to find out those required infos from the QSDK binary firmware?

cpuinfo

machine : Atheros DB120 reference board
processor : 0
cpu model : MIPS 74Kc V4.12
BogoMIPS : 278.93
wait instruction : yes
microsecond timers : yes
tlb_entries : 32
extra interrupt vector : yes
hardware watchpoint : yes, count: 4, address/irw mask: [0x0000, 0x08a0, 0x0008, 0x0740]
ASEs implemented : mips16 dsp
shadow register sets : 1
kscratch registers : 0
core : 0
VCED exceptions : not available
VCEI exceptions : not available

meminfo

MemTotal:         126336 kB
MemFree:           59328 kB
Buffers:            6412 kB
Cached:            36696 kB
SwapCached:            0 kB
Active:            15888 kB
Inactive:          30308 kB
Active(anon):       3156 kB
Inactive(anon):    17644 kB
Active(file):      12732 kB
Inactive(file):    12664 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          3120 kB
Mapped:             3300 kB
Shmem:             17712 kB
Slab:              10236 kB
SReclaimable:       1772 kB
SUnreclaim:         8464 kB
KernelStack:         408 kB
PageTables:          352 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       63168 kB
Committed_AS:      31068 kB
VmallocTotal:    1048372 kB
VmallocUsed:        1380 kB
VmallocChunk:    1023196 kB

dmesg

[    0.000000] Linux version 3.3.8 (root@localhost.localdomain) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Wed May 17 10:35:50 CST 2017
[    0.000000] MyLoader: sysp=aa94aa66, boardp=ea95ae62, parts=aa95aa66
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 2
[    0.000000] Clocks: CPU:560.000MHz, DDR:450.000MHz, AHB:225.000MHz, Ref:40.000MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00008000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00008000
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 80345b80, node_mem_map 81000000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32512 pages, LIFO batch:7
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=DB120 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),11584k(rootfs),4096k(kernel),256k(nvram),64k@0xff0000(art),15680k@0x50000(firmware) rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 126112k/131072k available (2341k kernel code, 4960k reserved, 626k data, 224k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:83
[    0.000000] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 512
[    0.070000] Performance counters: mips/74K PMU enabled, 4 32-bit counters available to each CPU, irq 13
[    0.080000] Initialized recycle list for cpu 0.
[    0.090000] NET: Registered protocol family 16
[    0.090000] gpiochip_add: registered GPIOs 0 to 22 on device: ath79
[    0.100000] MIPS: machine is Atheros DB120 reference board
[    0.100000] ar724x-pci ar724x-pci: PCIe link is down
[    0.110000] registering PCI controller with io_map_base unset
[    0.520000] bio: create slab <bio-0> at 0
[    0.520000] PCI host bridge to bus 0000:00
[    0.530000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.530000] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.540000] Switching to clocksource MIPS
[    0.540000] NET: Registered protocol family 2
[    0.550000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.550000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    0.560000] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.560000] TCP: Hash tables configured (established 4096 bind 4096)
[    0.570000] TCP reno registered
[    0.570000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.580000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.580000] NET: Registered protocol family 1
[    0.590000] PCI: CLS 0 bytes, default 32
[    0.600000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.610000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.620000] msgmni has been set to 246
[    0.620000] io scheduler noop registered
[    0.630000] io scheduler deadline registered (default)
[    0.630000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.660000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A
[    0.660000] console [ttyS0] enabled, bootconsole disabled
[    0.680000] m25p80 spi0.0: found w25q128, expected m25p80
[    0.680000] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.690000] 7 cmdlinepart partitions found on MTD device spi0.0
[    0.690000] Creating 7 MTD partitions on "spi0.0":
[    0.700000] 0x000000000000-0x000000040000 : "u-boot"
[    0.710000] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.710000] 0x000000050000-0x000000ba0000 : "rootfs"
[    0.720000] mtd: partition "rootfs" set to be root filesystem
[    0.730000] mtd: partition "rootfs_data" created automatically, ofs=740000, len=460000 
[    0.730000] 0x000000740000-0x000000ba0000 : "rootfs_data"
[    0.740000] 0x000000ba0000-0x000000fa0000 : "kernel"
[    0.750000] 0x000000fa0000-0x000000fe0000 : "nvram"
[    0.750000] 0x000000ff0000-0x000001000000 : "art"
[    0.760000] 0x000000050000-0x000000fa0000 : "firmware"
[    0.800000] ar8216: Unknown Atheros device [ver=2, rev=1, phy_id=004dd042]
[    0.820000] ar8216: Unknown Atheros device [ver=2, rev=1, phy_id=004dd042]
[    0.840000] ar8216: Unknown Atheros device [ver=2, rev=1, phy_id=004dd042]
[    0.870000] ar8216: Unknown Atheros device [ver=2, rev=1, phy_id=004dd042]
[    0.890000] ar8216: Unknown Atheros device [ver=2, rev=1, phy_id=004dd042]
[    0.900000] ag71xx_mdio: probed
[    0.910000] ag71xx_mdio: probed
[    0.910000] eth0: Atheros AG71xx at 0xb9000000, irq 4
[    1.470000] ag71xx ag71xx.0: eth0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd072, driver=Atheros 8035 ethernet]
[    1.480000] eth1: Atheros AG71xx at 0xba000000, irq 5
[    2.040000] eth1: Found an AR934X built-in switch
[    3.070000] TCP cubic registered
[    3.070000] NET: Registered protocol family 17
[    3.070000] Bridge firewalling registered
[    3.080000] 8021q: 802.1Q VLAN Support v1.8
[    3.080000] ### of_selftest(): No testcase data in device tree; not running tests
[    3.100000] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    3.100000] Freeing unused kernel memory: 224k freed
[    4.940000] Registered led device: db120:green:lan1
[    4.940000] Registered led device: db120:green:lan2
[    4.940000] Registered led device: db120:green:wlan
[    4.940000] Registered led device: db120:green:status
[    8.190000] JFFS2 notice: (520) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 17 of xref (0 dead, 2 orphan) found.
[   10.620000] ssdk_plat_init start
[   10.620000] chip_version:0xff
[   10.630000] chip_version:0x2
[   10.630000] Register QCA PHY driver
[   10.720000] qca-ssdk module init succeeded!
[   10.910000] NET: Registered protocol family 10
[   11.320000] SCSI subsystem initialized
[   11.360000] Button Hotplug driver version 0.4.1
[   11.670000] NTFS driver 2.1.30 [Flags: R/O MODULE].
[   11.950000] PPP generic driver version 2.4.2
[   12.050000] NET: Registered protocol family 24
[   12.150000] asf: module license 'Proprietary' taints kernel.
[   12.160000] Disabling lock debugging due to kernel taint
[   12.180000] ****Address of trace_timer :8717e5a0 
[   12.510000] ath_hal: 0.9.17.1 (AR5416, AR9380, REGOPS_FUNC, WRITE_EEPROM, TX_DATA_SWAP, RX_DATA_SWAP, 11D)
[   12.610000] ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
[   12.660000] ath_dfs: Version 2.0.0
[   12.660000] Copyright (c) 2005-2006 Atheros Communications, Inc. All Rights Reserved
[   12.690000] ath_spectral: Version 2.0.0
[   12.690000] Copyright (c) 2005-2009 Atheros Communications, Inc. All Rights Reserved
[   12.710000] SPECTRAL module built on May 17 2017 10:20:38
[   12.840000] ath_tx99: Version 2.0
[   12.840000] Copyright (c) 2010 Atheros Communications, Inc, All Rights Reserved
[   13.060000] ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
[   15.180000] __ath_attach: Set global_scn[0]
[   15.190000] *** All the minfree values should be <= ATH_TXBUF-32, otherwise default value will be used instead ***
[   15.200000] ACBKMinfree = 48
[   15.200000] ACBEMinfree = 32
[   15.200000] ACVIMinfree = 16
[   15.210000] ACVOMinfree = 0
[   15.210000] CABMinfree = 48
[   15.210000] UAPSDMinfree = 0
[   15.220000] ATH_TXBUF=540
[   15.220000] Enterprise mode: 0x00000000
[   15.230000] Restoring Cal data from DRAM
[   15.230000] 
[   15.230000] ART Version : -48.10.640
[   15.240000] SW Image Version : 9.50.2.1140.153
[   15.240000] Board Revision : 4 
[   15.250000] ar9300_attach: nf_2_nom -110 nf_2_max -60 nf_2_min -125 
[   15.260000] SPECTRAL : get_capability not registered
[   15.260000] HAL_CAP_PHYDIAG : Capable
[   15.270000] SPECTRAL : Need to fix the capablity check for RADAR (spectral_attach : 231)
[   15.270000] SPECTRAL : get_capability not registered
[   15.280000] HAL_CAP_RADAR   : Capable
[   15.280000] SPECTRAL : Need to fix the capablity check for SPECTRAL
[   15.280000]  (spectral_attach : 236)
[   15.290000] SPECTRAL : get_capability not registered
[   15.300000] HAL_CAP_SPECTRAL_SCAN : Capable
[   15.300000] SPECTRAL : get_tsf64 not registered
[   15.310000] spectral_init_netlink 63 NULL SKB
[   15.310000] SPECTRAL : No ADVANCED SPECTRAL SUPPORT
[   15.320000] SPECTRAL :----- module attached
[   15.320000] Green-AP : Green-AP : Attached
[   15.320000] 
[   15.330000] ath_get_caps[6166] rx chainmask mismatch actual 3 sc_chainmak 0
[   15.340000] ath_get_caps[6141] tx chainmask mismatch actual 3 sc_chainmak 0
[   15.350000] band steering initialized for direct attach hardware 
[   15.350000] ieee80211_bsteering_attach: Band steering initialized
[   15.360000] ath_attach_dfs[12684] dfsdomain 1
[   15.370000] SPECTRAL : module already attached
[   15.380000] osif_wrap_attach:295 osif wrap attached
[   15.380000] osif_wrap_devt_init:915 osif wrap dev table init done
[   15.390000] ath_tx_paprd_init sc 86a40000 PAPRD disabled in HAL
[   15.400000] wifi0: Atheros 9340: mem=0xb8100000, irq=47
[   15.400000] ath_pci: SmartAntenna-DRT-0.1 (Atheros/multi-bss)
[   15.460000] bonding: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
[   15.650000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   15.870000] nf_conntrack version 0.5.0 (1974 buckets, 7896 max)
[   16.540000] xt_time: kernel timezone is -0000
[   17.070000] nf_conntrack_rtsp v0.6.21 loading
[   17.090000] nf_nat_rtsp v0.6.21 loading
[   17.180000] Ebtables v2.0 registered
[   17.740000] fuse init (API version 7.18)
[   20.060000] osif_wrap_devt_detach:270 osif wrap dev table detached
[   20.060000] osif_wrap_detach:327 osif wrap detached
[   20.060000] band steering terminated  for direct attach hardware 
[   20.060000] ieee80211_bsteering_detach: Band steering terminated
[   20.060000] ieee80211_atf_detach: ATF terminated
[   20.070000] SPECTRAL : Module removed (spectral = 8788a000)
[   20.070000] Green-AP : Green-AP : Detached
[   20.070000] 
[   20.080000] Removing athdebug proc file
[   20.080000] ath_dev: driver unloaded
[   20.080000] ath_tx99: driver unloaded
[   20.090000] ath_spectral: driver unloaded
[   20.090000] ath_dfs: driver unloaded
[   20.110000] ath_rate_atheros: driver unloaded
[   20.110000] ath_hal: driver unloaded
[   21.370000] ADDRCONF(NETDEV_UP): eth1: link is not ready
[   22.610000] ADDRCONF(NETDEV_UP): eth1: link is not ready
[   22.610000] device eth1 entered promiscuous mode
[   22.610000] ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   22.610000] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   23.210000] eth1: link up (1000Mbps/Full duplex)
[   23.210000] br-lan: port 1(eth1) entered forwarding state
[   23.210000] br-lan: port 1(eth1) entered forwarding state
[   23.210000] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   23.210000] ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   25.210000] br-lan: port 1(eth1) entered forwarding state
[   27.370000] ****Address of trace_timer :86b265a0 
[   27.440000] ath_hal: 0.9.17.1 (AR5416, AR9380, REGOPS_FUNC, WRITE_EEPROM, TX_DATA_SWAP, RX_DATA_SWAP, 11D)
[   27.480000] ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
[   27.510000] ath_dfs: Version 2.0.0
[   27.510000] Copyright (c) 2005-2006 Atheros Communications, Inc. All Rights Reserved
[   27.540000] ath_spectral: Version 2.0.0
[   27.540000] Copyright (c) 2005-2009 Atheros Communications, Inc. All Rights Reserved
[   27.540000] SPECTRAL module built on May 17 2017 10:20:38
[   27.570000] ath_tx99: Version 2.0
[   27.570000] Copyright (c) 2010 Atheros Communications, Inc, All Rights Reserved
[   27.620000] ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
[   27.810000] __ath_attach: Set global_scn[0]
[   27.810000] *** All the minfree values should be <= ATH_TXBUF-32, otherwise default value will be used instead ***
[   27.810000] ACBKMinfree = 48
[   27.810000] ACBEMinfree = 32
[   27.810000] ACVIMinfree = 16
[   27.810000] ACVOMinfree = 0
[   27.810000] CABMinfree = 48
[   27.810000] UAPSDMinfree = 0
[   27.810000] ATH_TXBUF=540
[   27.820000] Enterprise mode: 0x00000000
[   27.820000] Restoring Cal data from DRAM
[   27.820000] 
[   27.820000] ART Version : -48.10.640
[   27.820000] SW Image Version : 9.50.2.1140.153
[   27.820000] Board Revision : 4 
[   27.820000] ar9300_attach: nf_2_nom -110 nf_2_max -60 nf_2_min -125 
[   27.830000] SPECTRAL : get_capability not registered
[   27.830000] HAL_CAP_PHYDIAG : Capable
[   27.830000] SPECTRAL : Need to fix the capablity check for RADAR (spectral_attach : 231)
[   27.830000] SPECTRAL : get_capability not registered
[   27.830000] HAL_CAP_RADAR   : Capable
[   27.830000] SPECTRAL : Need to fix the capablity check for SPECTRAL
[   27.830000]  (spectral_attach : 236)
[   27.830000] SPECTRAL : get_capability not registered
[   27.830000] HAL_CAP_SPECTRAL_SCAN : Capable
[   27.830000] SPECTRAL : get_tsf64 not registered
[   27.830000] spectral_init_netlink 63 NULL SKB
[   27.830000] SPECTRAL : No ADVANCED SPECTRAL SUPPORT
[   27.830000] SPECTRAL :----- module attached
[   27.830000] Green-AP : Green-AP : Attached
[   27.830000] 
[   27.830000] ath_get_caps[6166] rx chainmask mismatch actual 3 sc_chainmak 0
[   27.830000] ath_get_caps[6141] tx chainmask mismatch actual 3 sc_chainmak 0
[   27.840000] band steering initialized for direct attach hardware 
[   27.840000] ieee80211_bsteering_attach: Band steering initialized
[   27.840000] ath_attach_dfs[12684] dfsdomain 1
[   27.840000] SPECTRAL : module already attached
[   27.840000] osif_wrap_attach:295 osif wrap attached
[   27.840000] osif_wrap_devt_init:915 osif wrap dev table init done
[   27.840000] ath_tx_paprd_init sc 85d00000 PAPRD disabled in HAL
[   27.850000] wifi0: Atheros 9340: mem=0xb8100000, irq=47
[   27.850000] ath_pci: SmartAntenna-DRT-0.1 (Atheros/multi-bss)
[   27.850000] eth1: link down
[   27.850000] br-lan: port 1(eth1) entered disabled state
[   28.130000] sc nodebug 0 
[   28.150000] ath_attach_dfs[12684] dfsdomain 1
[   28.210000] wlan_vap_create : enter. devhandle=0x86870380, opmode=IEEE80211_M_HOSTAP, flags=0x1
[   28.210000] wlan_vap_create : exit. devhandle=0x86870380, opmode=IEEE80211_M_HOSTAP, flags=0x1.
[   28.210000] VAP device ath0 created osifp: (872fab80) os_if: (856f8000)
[   28.250000] Set freq vap stop send + 856f8000
[   28.250000] Set freq vap stop send -856f8000
[   28.380000] Set wait done --856f8000
[   28.460000]  
[   28.460000]  DES SSID SET= 
[   28.460000]  
[   28.460000]  DES SSID SET=Zeiss_AP 
[   28.730000] 8021q: adding VLAN 0 to HW filter on device ath0
[   29.180000] device ath0 entered promiscuous mode
[   29.180000] br-lan: port 2(ath0) entered forwarding state
[   29.180000] br-lan: port 2(ath0) entered forwarding state
[   29.570000]  ieee80211_ioctl_siwmode: imr.ifm_active=393856, new mode=3, valid=1 
[   29.570000] _ieee80211_scan_unregister_event_handler: Failed to unregister evhandler=85463814 arg=85e80000
[   29.570000]  Scan in progress.. Cancelling it 
[   29.620000] br-lan: port 2(ath0) entered disabled state
[   29.620000]  DEVICE IS DOWN ifname=ath0
[   29.620000]  DEVICE IS DOWN ifname=ath0
[   29.870000] eth1: link up (1000Mbps/Full duplex)
[   29.870000] br-lan: port 1(eth1) entered forwarding state
[   29.870000] br-lan: port 1(eth1) entered forwarding state
[   30.040000] br-lan: port 2(ath0) entered forwarding state
[   30.040000] br-lan: port 2(ath0) entered forwarding state
[   30.040000] 8021q: adding VLAN 0 to HW filter on device ath0
[   31.870000] br-lan: port 1(eth1) entered forwarding state
[   32.040000] br-lan: port 2(ath0) entered forwarding state
[   32.410000] eth1: link down
[   32.420000] br-lan: port 2(ath0) entered disabled state
[   32.420000] br-lan: port 1(eth1) entered disabled state
[   32.430000] osif_ioctl_delete_vap: deleting vap: (856f8000), osif: (872fab80)
[   32.430000] _ieee80211_scan_unregister_event_handler: Failed to unregister evhandler=854934bc arg=872fab80
[   32.440000] _ieee80211_scan_unregister_event_handler: Failed to unregister evhandler=854934bc arg=872fab80
[   32.440000] _ieee80211_scan_unregister_event_handler: Failed to unregister evhandler=8549400c arg=872fab80
[   32.440000] wlan_vap_delete : enter. vaphandle=0x856f8000
[   32.440000] wlan_vap_delete : exit. vaphandle=0x856f8000
[   32.440000] br-lan: port 2(ath0) entered disabled state
[   32.480000] osif_wrap_devt_detach:270 osif wrap dev table detached
[   32.480000] osif_wrap_detach:327 osif wrap detached
[   32.490000] band steering terminated  for direct attach hardware 
[   32.490000] ieee80211_bsteering_detach: Band steering terminated
[   32.490000] ieee80211_atf_detach: ATF terminated
[   32.490000] SPECTRAL : Module removed (spectral = 86b16000)
[   32.490000] Green-AP : Green-AP : Detached
[   32.490000] 
[   32.500000] Removing athdebug proc file
[   32.500000] ath_dev: driver unloaded
[   32.510000] ath_tx99: driver unloaded
[   32.510000] ath_spectral: driver unloaded
[   32.520000] ath_dfs: driver unloaded
[   32.520000] ath_rate_atheros: driver unloaded
[   32.530000] ath_hal: driver unloaded
[   33.910000] eth1: link up (1000Mbps/Full duplex)
[   33.910000] br-lan: port 1(eth1) entered forwarding state
[   33.910000] br-lan: port 1(eth1) entered forwarding state
[   34.290000] br-lan: port 1(eth1) entered disabled state
[   34.290000] device eth1 left promiscuous mode
[   34.290000] br-lan: port 1(eth1) entered disabled state
[   34.300000] eth1: link down
[   34.300000] ADDRCONF(NETDEV_UP): eth1: link is not ready
[   35.350000] ADDRCONF(NETDEV_UP): eth1: link is not ready
[   35.350000] device eth1 entered promiscuous mode
[   35.350000] ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   35.350000] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   35.950000] eth1: link up (1000Mbps/Full duplex)
[   35.950000] br-lan: port 1(eth1) entered forwarding state
[   35.950000] br-lan: port 1(eth1) entered forwarding state
[   35.950000] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   35.950000] ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   37.950000] br-lan: port 1(eth1) entered forwarding state
[   39.250000] ****Address of trace_timer :8686e5a0 
[   39.320000] ath_hal: 0.9.17.1 (AR5416, AR9380, REGOPS_FUNC, WRITE_EEPROM, TX_DATA_SWAP, RX_DATA_SWAP, 11D)
[   39.340000] ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
[   39.360000] ath_dfs: Version 2.0.0
[   39.360000] Copyright (c) 2005-2006 Atheros Communications, Inc. All Rights Reserved
[   39.380000] ath_spectral: Version 2.0.0
[   39.380000] Copyright (c) 2005-2009 Atheros Communications, Inc. All Rights Reserved
[   39.380000] SPECTRAL module built on May 17 2017 10:20:38
[   39.400000] ath_tx99: Version 2.0
[   39.400000] Copyright (c) 2010 Atheros Communications, Inc, All Rights Reserved
[   39.450000] ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
[   39.630000] __ath_attach: Set global_scn[0]
[   39.630000] *** All the minfree values should be <= ATH_TXBUF-32, otherwise default value will be used instead ***
[   39.630000] ACBKMinfree = 48
[   39.630000] ACBEMinfree = 32
[   39.630000] ACVIMinfree = 16
[   39.630000] ACVOMinfree = 0
[   39.630000] CABMinfree = 48
[   39.630000] UAPSDMinfree = 0
[   39.630000] ATH_TXBUF=540
[   39.640000] Enterprise mode: 0x00000000
[   39.640000] Restoring Cal data from DRAM
[   39.640000] 
[   39.640000] ART Version : -48.10.640
[   39.640000] SW Image Version : 9.50.2.1140.153
[   39.640000] Board Revision : 4 
[   39.640000] ar9300_attach: nf_2_nom -110 nf_2_max -60 nf_2_min -125 
[   39.640000] SPECTRAL : get_capability not registered
[   39.640000] HAL_CAP_PHYDIAG : Capable
[   39.640000] SPECTRAL : Need to fix the capablity check for RADAR (spectral_attach : 231)
[   39.640000] SPECTRAL : get_capability not registered
[   39.640000] HAL_CAP_RADAR   : Capable
[   39.640000] SPECTRAL : Need to fix the capablity check for SPECTRAL
[   39.640000]  (spectral_attach : 236)
[   39.640000] SPECTRAL : get_capability not registered
[   39.640000] HAL_CAP_SPECTRAL_SCAN : Capable
[   39.640000] SPECTRAL : get_tsf64 not registered
[   39.640000] spectral_init_netlink 63 NULL SKB
[   39.640000] SPECTRAL : No ADVANCED SPECTRAL SUPPORT
[   39.640000] SPECTRAL :----- module attached
[   39.640000] Green-AP : Green-AP : Attached
[   39.640000] 
[   39.650000] ath_get_caps[6166] rx chainmask mismatch actual 3 sc_chainmak 0
[   39.650000] ath_get_caps[6141] tx chainmask mismatch actual 3 sc_chainmak 0
[   39.650000] band steering initialized for direct attach hardware 
[   39.650000] ieee80211_bsteering_attach: Band steering initialized
[   39.650000] ath_attach_dfs[12684] dfsdomain 1
[   39.660000] SPECTRAL : module already attached
[   39.660000] osif_wrap_attach:295 osif wrap attached
[   39.660000] osif_wrap_devt_init:915 osif wrap dev table init done
[   39.660000] ath_tx_paprd_init sc 87348000 PAPRD disabled in HAL
[   39.660000] wifi0: Atheros 9340: mem=0xb8100000, irq=47
[   39.660000] ath_pci: SmartAntenna-DRT-0.1 (Atheros/multi-bss)
[   39.710000] sc nodebug 0 
[   39.730000] ath_attach_dfs[12684] dfsdomain 1
[   39.790000] wlan_vap_create : enter. devhandle=0x86bc0380, opmode=IEEE80211_M_HOSTAP, flags=0x1
[   39.790000] wlan_vap_create : exit. devhandle=0x86bc0380, opmode=IEEE80211_M_HOSTAP, flags=0x1.
[   39.790000] VAP device ath0 created osifp: (86b27380) os_if: (873dc000)
[   39.810000] Set freq vap stop send + 873dc000
[   39.820000] Set freq vap stop send -873dc000
[   39.950000] Set wait done --873dc000
[   39.990000]  
[   39.990000]  DES SSID SET= 
[   40.000000]  
[   40.000000]  DES SSID SET=Zeiss_AP 
[   40.190000] 8021q: adding VLAN 0 to HW filter on device ath0
[   40.670000] device ath0 entered promiscuous mode
[   40.670000] br-lan: port 2(ath0) entered forwarding state
[   40.670000] br-lan: port 2(ath0) entered forwarding state
[   40.760000]  ieee80211_ioctl_siwmode: imr.ifm_active=393856, new mode=3, valid=1 
[   40.760000] _ieee80211_scan_unregister_event_handler: Failed to unregister evhandler=84c63814 arg=86a80000
[   40.760000]  Scan in progress.. Cancelling it 
[   40.790000] br-lan: port 2(ath0) entered disabled state
[   40.790000]  DEVICE IS DOWN ifname=ath0
[   40.790000]  DEVICE IS DOWN ifname=ath0
[   41.110000] br-lan: port 2(ath0) entered forwarding state
[   41.110000] br-lan: port 2(ath0) entered forwarding state
[   41.110000] 8021q: adding VLAN 0 to HW filter on device ath0
[   43.110000] br-lan: port 2(ath0) entered forwarding state
[   99.340000] eth0: link up (100Mbps/Full duplex)
[   99.340000] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 1935.340000] eth0: link down
[ 2780.340000] eth0: link up (100Mbps/Full duplex)
[ 3438.340000] eth0: link down
[ 3460.340000] eth0: link up (100Mbps/Full duplex)
[ 3570.340000] eth0: link down

mtd

mtd0: 00040000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00b50000 00010000 "rootfs"
mtd3: 00460000 00010000 "rootfs_data"
mtd4: 00400000 00010000 "kernel"
mtd5: 00040000 00010000 "nvram"
mtd6: 00010000 00010000 "art"
mtd7: 00f50000 00010000 "firmware"

ps

  PID USER       VSZ STAT COMMAND
    1 root      1512 S    init
    2 root         0 SW   [kthreadd]
    3 root         0 SW   [ksoftirqd/0]
    5 root         0 SW   [kworker/u:0]
    6 root         0 SW<  [khelper]
    7 root         0 SW   [kworker/u:1]
   20 root         0 SW   [irq/10-ath79-gp]
   66 root         0 SW   [sync_supers]
   68 root         0 SW   [bdi-default]
   70 root         0 SW<  [kblockd]
  104 root         0 SW   [kswapd0]
  153 root         0 SW   [fsnotify_mark]
  158 root         0 SW<  [crypto]
  168 root         0 SW<  [ath79-spi]
  179 root         0 SW   [mtdblock0]
  184 root         0 SW   [mtdblock1]
  189 root         0 SW   [mtdblock2]
  194 root         0 SW   [mtdblock3]
  199 root         0 SW   [mtdblock4]
  204 root         0 SW   [mtdblock5]
  209 root         0 SW   [mtdblock6]
  214 root         0 SW   [mtdblock7]
  312 root         0 SW   [kworker/0:1]
  521 root         0 SWN  [jffs2_gcd_mtd3]
  550 root       784 S    /usr/sbin/oring-zeiss-gpio
  551 root      1512 S    init
  663 root         0 SW<  [bond0]
  801 root      1516 S    /sbin/syslogd -l 3 -C16
  803 root      1496 S    /sbin/klogd
  805 root       872 S    /sbin/hotplug2 --override --persistent --set-rules-f
  819 root       884 S    /sbin/ubusd
  884 root         0 SW   [kworker/0:2]
  920 root      1508 S    /sbin/watchdog -t 5 /dev/watchdog
 1457 root      1556 S    /sbin/netifd
 1506 root      1516 S    udhcpc -p /var/run/udhcpc-eth0.pid -s /lib/netifd/dh
 1762 root      1392 S    hostapd -P /var/run/wifi-ath0.pid -B /var/run/hostap
 2125 root      1164 S    /usr/sbin/dropbear -P /var/run/dropbear.1.pid -p 22
 2224 root      3508 S    /usr/sbin/snmpd -Lf /dev/null -p /var/run/snmpd.pid
 2227 root      1220 S    /usr/sbin/syslog-ng
 2278 root      1172 S    /usr/sbin/uhttpd -f -h /www/www_oring -r IAR-630-C -
 2332 nobody    1044 S    /usr/sbin/dnsmasq -C /var/etc/dnsmasq.conf
 2372 root      1508 S    /usr/sbin/ntpd -n -p tock.stdtime.gov.tw -p watch.st
 2744 root      1504 S    /bin/busybox telnetd -p23 -l/bin/sh
 2815 root      1516 S    /bin/sh
 3246 root      8684 S    /usr/sbin/mcproxy -f /etc/mcproxy.conf
 3457 network   2044 S    /usr/sbin/zebra -d -f /var/etc/quagga/zebra.conf
 3461 root      1660 S    /usr/sbin/watchquagga -d -z -T 60 -r /usr/sbin/quagg
 9945 root      1504 R    ps

mount

/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /dev type tmpfs (rw,noatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,noatime,mode=600)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlayfs (rw,noatime,lowerdir=/,upperdir=/overlay)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)

banner

   $MMMMM        MMMMM                MMMMMMMMMMM      MMM     MMM
  MMMMMMMM     MM MMMMM.              MMMMM:MMMMMM:   MMMM   MMMMM
MMMM= MMMMMM  MMM   MMMM       MMMMM   MMMM  MMMMMM   MMMM  MMMMM'
MMMM=  MMMMM MMMM    MM       MMMMM    MMMM    MMMM   MMMMNMMMMM
MMMM=   MMMM  MMMMM          MMMMM     MMMM    MMMM   MMMMMMMM
MMMM=   MMMM   MMMMMM       MMMMM      MMMM    MMMM   MMMMMMMMM
MMMM=   MMMM     MMMMM,    NMMMMMMMM   MMMM    MMMM   MMMMMMMMMMM
MMMM=   MMMM      MMMMMM   MMMMMMMM    MMMM    MMMM   MMMM  MMMMMM
MMMM=   MMMM   MM    MMMM    MMMM      MMMM    MMMM   MMMM    MMMM
MMMM$ ,MMMMM  MMMMM  MMMM    MMM       MMMM   MMMMM   MMMM    MMMM
  MMMMMMM:      MMMMMMM     M         MMMMMMMMMMMM  MMMMMMM MMMMMMM
    MMMMMM       MMMMN     M           MMMMMMMMM      MMMM    MMMM
     MMMM          M                    MMMMMMM        M       M
       M
 ---------------------------------------------------------------
   For those about to rock... (QCA9558.LN, r37758)
 ---------------------------------------------------------------

If it is a DTB-based kernel, it is possible that it is exposed on the running device at /proc/device-tree. It may also be possible to extract the "FDT" (flattened device tree) from the image. dtc (device-tree compiler) can be used to convert it to a more readable form.

There is no turn-key way to go from the output of dtc to a "sane" DTS, though it can provide quite a bit of insight about device-specific "tweaks" to the reference design. (Though it says "DB120", reference designs are often modified significantly from the chip-maker's often incomplete design when implementing as a production board.)

@jeff
thanks. i am out-of-luck and fdt cannot be found :frowning:

got some clues from this file.

/etc/config/system


config button
	option button 'reset'
	option action 'released'
	option handler '/etc/oring_reset_to_default; reboot'
	option min '5'
	option max '30'

config led 'led_usb'
	option name 'USB'
	option sysfs 'db120:green:usb'
	option trigger 'usbdev'
	option dev '1-1'
	option interval '50'

config led 'led_lan'
	option name 'LAN'
	option sysfs 'db120:green:lan'
	option trigger 'netdev'
	option dev 'eth0'
	option mode 'link tx rx'

config led 'led_wlan'
	option name 'WLAN'
	option sysfs 'db120:green:wlan'
	option trigger 'phy0tpt'

config rssid 'rssid_wlan0'
	option dev 'wlan0'
	option refresh '40000'
	option threshold '1'

config led 'led_rssilow'
	option name 'RSSILOW'
	option sysfs 'db120:green:rssi1'
	option trigger 'rssi'
	option iface 'rssid_wlan0'
	option minq '1'
	option maxq '100'
	option offset '0'
	option factor '13'

config led 'led_rssimedlow'
	option name 'RSSIMEDLOW'
	option sysfs 'db120:green:rssi2'
	option trigger 'rssi'
	option iface 'rssid_wlan0'
	option minq '26'
	option maxq '100'
	option offset '-25'
	option factor '13'

config led 'led_rssimedhigh'
	option name 'RSSIMEDHIGH'
	option sysfs 'db120:green:rssi3'
	option trigger 'rssi'
	option iface 'rssid_wlan0'
	option minq '51'
	option maxq '100'
	option offset '-50'
	option factor '13'

config led 'led_rssihigh'
	option name 'RSSIHIGH'
	option sysfs 'db120:green:rssi4'
	option trigger 'rssi'
	option iface 'rssid_wlan0'
	option minq '76'
	option maxq '100'
	option offset '-75'
	option factor '13'

A next-best source of information about how the GPIOs and other chips are set up would be the “mach” file from the GPL Corresponding Sources, if you can get your hands on it and it is complete.

A bit of luck with their board being “close” to a reference design or another board helps too.