Adding OpenWrt support for Senao like Devices

w00t! https://github.com/openwrt/openwrt/pull/4072#issuecomment-1243032218

I see builds in snapshots. Faster than I managed to get a dev box setup. :roll_eyes:

Time to dust off those test devices....

Looks good so far:

2 Likes

Hey there, @mpratt14 ...
I have a similar board to the AP300 you have there, but it's mtdblocks is much less, only like 4 or 5 partitions.
I have successfully booted your AP300 image on my AP, and the radios seems to work...
I'm just concerned that mentioning the name will get me banned/legal team slap me with a lawsuit.
What I can say is, the mtdblocks looks like this:

Creating 5 MTD partitions on "ath-nor0":
0x000000000000-0x000000040000 : "u-boot"
0x000000040000-0x000001440000 : "rootfs"
0x000001440000-0x000001840000 : "uImage"
0x000001840000-0x000001ff0000 : "reserved"
0x000001ff0000-0x000002000000 : "caldata"

Is there any way that I can provide you with more info? I'd like to see some extra support added to this little awesome AP that I have. It has also been marked EOL.
Well, I have two, one being the sacrificial lamb of my flashrom dump.
I would argue that it is the same hardware as the AP300, just a different uboot, mtd block partition and another SPI 32MB flash.
I am not confident enough to add extra support on my own, so, it will probably take you a few mins to figure out?

Glad to see that OpenWRT is supporting old EOL devices.
EDIT:
I have appended the system log:

Sat Nov 27 02:39:16 2021 kern.notice kernel: [    0.000000] Linux version 5.4.159 (pi@SDDesk) (gcc version 11.2.0 (OpenWrt GCC 11.2.0 r18195+5-d1c7df9c4b)) #0 Sat Nov 27 02:39:06 2021
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] printk: bootconsole [early0] enabled
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] MIPS: machine is WatchGuard AP300
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] SoC: Qualcomm Atheros QCA9558 ver 1 rev 0
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] Initrd not found or empty - disabling initrd
Sat Nov 27 02:39:16 2021 kern.warn kernel: [    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Sat Nov 27 02:39:16 2021 kern.warn kernel: [    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] Zone ranges:
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] Movable zone start for each node
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] Early memory node ranges
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
Sat Nov 27 02:39:16 2021 kern.debug kernel: [    0.000000] On node 0 totalpages: 65536
Sat Nov 27 02:39:16 2021 kern.debug kernel: [    0.000000]   Normal zone: 576 pages used for memmap
Sat Nov 27 02:39:16 2021 kern.debug kernel: [    0.000000]   Normal zone: 0 pages reserved
Sat Nov 27 02:39:16 2021 kern.debug kernel: [    0.000000]   Normal zone: 65536 pages, LIFO batch:15
Sat Nov 27 02:39:16 2021 kern.debug kernel: [    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
Sat Nov 27 02:39:16 2021 kern.debug kernel: [    0.000000] pcpu-alloc: [0] 0
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    0.000000] Kernel command line: console=ttyS0,115200n8 rootfstype=squashfs,jffs2
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] Writing ErrCtl register=00000000
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] Readback ErrCtl register=00000000
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] Memory: 241516K/262144K available (4987K kernel code, 183K rwdata, 1100K rodata, 11576K init, 196K bss, 20628K reserved, 0K cma-reserved)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] NR_IRQS: 51
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    0.000000] random: get_random_bytes called from start_kernel+0x354/0x548 with crng_init=0
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] CPU clock: 720.000 MHz
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5309056796 ns
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.000007] sched_clock: 32 bits at 360MHz, resolution 2ns, wraps every 5965232126ns
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.092705] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.227650] pid_max: default: 32768 minimum: 301
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.283007] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.370456] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.467029] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.584615] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.665915] pinctrl core: initialized pinctrl subsystem
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.729223] NET: Registered protocol family 16
Sat Nov 27 02:39:16 2021 kern.warn kernel: [    0.806488] workqueue: max_active 576 requested for napi_workq is out of range, clamping between 1 and 512
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.925116] clocksource: Switched to clocksource MIPS
Sat Nov 27 02:39:16 2021 kern.info kernel: [    0.986499] NET: Registered protocol family 2
Sat Nov 27 02:39:16 2021 kern.info kernel: [    1.038752] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    1.125808] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    1.225807] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    1.317404] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    1.401740] TCP: Hash tables configured (established 2048 bind 2048)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    1.477854] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    1.555993] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
Sat Nov 27 02:39:16 2021 kern.info kernel: [    1.639508] NET: Registered protocol family 1
Sat Nov 27 02:39:16 2021 kern.info kernel: [    1.691604] PCI: CLS 0 bytes, default 32
Sat Nov 27 02:39:16 2021 kern.info kernel: [    1.921275] workingset: timestamp_bits=14 max_order=16 bucket_order=2
Sat Nov 27 02:39:16 2021 kern.info kernel: [    2.003900] squashfs: version 4.0 (2009/01/31) Phillip Lougher
Sat Nov 27 02:39:16 2021 kern.info kernel: [    2.073687] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
Sat Nov 27 02:39:16 2021 kern.info kernel: [    2.203912] pinctrl-single 1804002c.pinmux: 544 pins, size 68
Sat Nov 27 02:39:16 2021 kern.info kernel: [    2.273521] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
Sat Nov 27 02:39:16 2021 kern.info kernel: [    2.350080] printk: console [ttyS0] disabled
Sat Nov 27 02:39:16 2021 kern.info kernel: [    2.401228] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 2500000) is a 16550A
Sat Nov 27 02:39:16 2021 kern.info kernel: [    2.504243] printk: console [ttyS0] enabled
Sat Nov 27 02:39:16 2021 kern.info kernel: [    2.513146] printk: bootconsole [early0] disabled
Sat Nov 27 02:39:16 2021 kern.info kernel: [    2.538160] spi-nor spi0.0: w25q256 (32768 Kbytes)
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.543072] 9 fixed-partitions partitions found on MTD device spi0.0
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.549541] Creating 9 MTD partitions on "spi0.0":
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.554405] 0x000000000000-0x000000040000 : "u-boot"
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.560227] 0x000000040000-0x000000050000 : "u-boot-env"
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.566406] 0x000000050000-0x0000000a0000 : "custom"
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.572178] 0x0000000a0000-0x0000000b0000 : "loader"
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.577998] 0x0000000b0000-0x000000220000 : "fwconcat1"
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.584042] 0x000000220000-0x000000d70000 : "fwconcat0"
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.590120] 0x000000d70000-0x000000ff0000 : "failsafe"
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.596130] 0x000000ff0000-0x000001ff0000 : "fwconcat2"
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.602163] 0x000001ff0000-0x000002000000 : "art"
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.607959] Concatenating MTD devices:
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.611763] (0): "fwconcat0"
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.614684] (1): "fwconcat1"
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.617639] (2): "fwconcat2"
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.620554] into device "virtual_flash"
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.624465] 1 fixed-partitions partitions found on MTD device virtual_flash
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.631531] Creating 1 MTD partitions on "virtual_flash":
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    2.637019] 0x000000000000-0x000001cc0000 : "firmware"
Sat Nov 27 02:39:16 2021 kern.info kernel: [    2.681221] libphy: Fixed MDIO Bus: probed
Sat Nov 27 02:39:16 2021 kern.err kernel: [    2.699734] ag71xx 19000000.eth: invalid MAC address, using random address
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.046909] libphy: ag71xx_mdio: probed
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.072641] ag71xx 19000000.eth: connected to PHY at mdio.0:05 [uid=004dd072, driver=Atheros 8035 ethernet]
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.083064] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii-id
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.089807] i2c /dev entries driver
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.095002] NET: Registered protocol family 10
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.103658] Segment Routing with IPv6
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.107514] NET: Registered protocol family 17
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.112083] 8021q: 802.1Q VLAN Support v1.8
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.117105] PCI host bridge /ahb/pcie-controller@180c0000 ranges:
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.123309]  MEM 0x0000000010000000..0x0000000011ffffff
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.128650]   IO 0x0000000000000000..0x0000000000000000
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.134089] PCI host bridge to bus 0000:00
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.138280] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff]
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.145260] pci_bus 0000:00: root bus resource [io  0x0000]
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.150909] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.157800] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.165868] pci 0000:00:00.0: [168c:003c] type 00 class 0x028000
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.172004] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.178946] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.185822] pci 0000:00:00.0: supports D1
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.189892] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.196753] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.203476] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x101fffff 64bit]
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.210940] pci 0000:00:00.0: BAR 6: assigned [mem 0x10200000-0x1020ffff pref]
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.260926] Freeing unused kernel memory: 11576K
Sat Nov 27 02:39:16 2021 kern.warn kernel: [    3.265636] This architecture does not have kernel memory protection.
Sat Nov 27 02:39:16 2021 kern.info kernel: [    3.272159] Run /init as init process
Sat Nov 27 02:39:16 2021 user.info kernel: [    3.772957] init: Console is alive
Sat Nov 27 02:39:16 2021 user.info kernel: [    3.776864] init: - watchdog -
Sat Nov 27 02:39:16 2021 user.info kernel: [    3.801505] kmodloader: loading kernel modules from /etc/modules-boot.d/*
Sat Nov 27 02:39:16 2021 user.info kernel: [    3.839303] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
Sat Nov 27 02:39:16 2021 user.info kernel: [    3.857089] init: - preinit -
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    4.135904] random: jshn: uninitialized urandom read (4 bytes read)
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    4.270458] random: jshn: uninitialized urandom read (4 bytes read)
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    4.314727] random: jshn: uninitialized urandom read (4 bytes read)
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    6.575112] random: fast init done
Sat Nov 27 02:39:16 2021 user.info kernel: [    8.673072] procd: - early -
Sat Nov 27 02:39:16 2021 user.info kernel: [    8.676362] procd: - watchdog -
Sat Nov 27 02:39:16 2021 user.info kernel: [    9.262814] procd: - watchdog -
Sat Nov 27 02:39:16 2021 user.info kernel: [    9.266386] procd: - ubus -
Sat Nov 27 02:39:16 2021 kern.warn kernel: [    9.276959] urandom_read: 5 callbacks suppressed
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    9.276965] random: ubusd: uninitialized urandom read (4 bytes read)
Sat Nov 27 02:39:16 2021 kern.notice kernel: [    9.319989] random: ubusd: uninitialized urandom read (4 bytes read)
Sat Nov 27 02:39:16 2021 user.info kernel: [    9.330036] procd: - init -
Sat Nov 27 02:39:16 2021 user.info kernel: [    9.930317] kmodloader: loading kernel modules from /etc/modules.d/*
Sat Nov 27 02:39:16 2021 kern.info kernel: [   10.171125] Loading modules backported from Linux version v5.15-rc6-0-g519d81956ee2
Sat Nov 27 02:39:16 2021 kern.info kernel: [   10.178942] Backport generated by backports.git v5.15-rc6-1-0-gd44432d6
Sat Nov 27 02:39:16 2021 user.info kernel: [   10.231440] urngd: v1.0.2 started.
Sat Nov 27 02:39:16 2021 kern.info kernel: [   10.246015] xt_time: kernel timezone is -0000
Sat Nov 27 02:39:16 2021 kern.info kernel: [   10.361897] PPP generic driver version 2.4.2
Sat Nov 27 02:39:16 2021 kern.info kernel: [   10.376363] NET: Registered protocol family 24
Sat Nov 27 02:39:16 2021 kern.info kernel: [   10.451017] ath10k 5.10 driver, optimized for CT firmware, probing pci device: 0x3c.
Sat Nov 27 02:39:16 2021 kern.info kernel: [   10.475968] ath10k_pci 0000:00:00.0: enabling device (0000 -> 0002)
Sat Nov 27 02:39:16 2021 kern.info kernel: [   10.484575] ath10k_pci 0000:00:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0
Sat Nov 27 02:39:16 2021 kern.notice kernel: [   10.522393] random: crng init done
Sat Nov 27 02:39:16 2021 kern.info kernel: [   14.656960] ath10k_pci 0000:00:00.0: qca988x hw2.0 target 0x4100016c chip_id 0x043202ff sub 0000:0000
Sat Nov 27 02:39:16 2021 kern.info kernel: [   14.666370] ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0
Sat Nov 27 02:39:16 2021 kern.info kernel: [   14.678292] ath10k_pci 0000:00:00.0: firmware ver 10.1-ct-8x-__fW-022-ecad3248 api 2 features wmi-10.x,has-wmi-mgmt-tx,mfp,txstatus-noack,wmi-10.x-CT,ratemask-CT,txrate-CT,get-temp-CT,tx-rc-CT,cust-stats-CT,retry-gt2-CT,txrate2-CT,beacon-cb-CT,wmi-block-ack-CT crc32 3e4cf97f
Sat Nov 27 02:39:16 2021 kern.info kernel: [   15.091401] ath10k_pci 0000:00:00.0: board_file api 1 bmi_id N/A crc32 bebc7c08
Sat Nov 27 02:39:16 2021 kern.warn kernel: [   16.066790] ath10k_pci 0000:00:00.0: 10.1 wmi init: vdevs: 16  peers: 127  tid: 256
Sat Nov 27 02:39:16 2021 kern.info kernel: [   16.084055] ath10k_pci 0000:00:00.0: wmi print 'P 128 V 8 T 410'
Sat Nov 27 02:39:16 2021 kern.info kernel: [   16.090380] ath10k_pci 0000:00:00.0: wmi print 'msdu-desc: 1424  sw-crypt: 0 ct-sta: 0'
Sat Nov 27 02:39:16 2021 kern.info kernel: [   16.098528] ath10k_pci 0000:00:00.0: wmi print 'alloc rem: 24984 iram: 38672'
Sat Nov 27 02:39:16 2021 kern.info kernel: [   16.166584] ath10k_pci 0000:00:00.0: htt-ver 2.1 wmi-op 2 htt-op 2 cal file max-sta 128 raw 0 hwcrypto 1
Sat Nov 27 02:39:16 2021 kern.info kernel: [   16.176547] ath10k_pci 0000:00:00.0: NOTE:  Firmware DBGLOG output disabled in debug_mask: 0x10000000
Sat Nov 27 02:39:16 2021 kern.warn kernel: [   16.318359] ath10k_pci 0000:00:00.0: invalid MAC address; choosing random
Sat Nov 27 02:39:16 2021 kern.debug kernel: [   16.325295] ath: EEPROM regdomain sanitized
Sat Nov 27 02:39:16 2021 kern.debug kernel: [   16.325300] ath: EEPROM regdomain: 0x64
Sat Nov 27 02:39:16 2021 kern.debug kernel: [   16.325303] ath: EEPROM indicates we should expect a direct regpair map
Sat Nov 27 02:39:16 2021 kern.debug kernel: [   16.325321] ath: Country alpha2 being used: 00
Sat Nov 27 02:39:16 2021 kern.debug kernel: [   16.325325] ath: Regpair used: 0x64
Sat Nov 27 02:39:16 2021 kern.debug kernel: [   16.395910] ath: EEPROM regdomain sanitized
Sat Nov 27 02:39:16 2021 kern.debug kernel: [   16.395918] ath: EEPROM regdomain: 0x64
Sat Nov 27 02:39:16 2021 kern.debug kernel: [   16.395921] ath: EEPROM indicates we should expect a direct regpair map
Sat Nov 27 02:39:16 2021 kern.debug kernel: [   16.395939] ath: Country alpha2 being used: 00
Sat Nov 27 02:39:16 2021 kern.debug kernel: [   16.395942] ath: Regpair used: 0x64
Sat Nov 27 02:39:16 2021 kern.debug kernel: [   16.413446] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
Sat Nov 27 02:39:16 2021 kern.info kernel: [   16.415191] ieee80211 phy1: Atheros AR9550 Rev:0 mem=0xb8100000, irq=12
Sat Nov 27 02:39:16 2021 user.info kernel: [   16.465528] kmodloader: done loading kernel modules from /etc/modules.d/*
Sat Nov 27 02:39:17 2021 user.notice dnsmasq: DNS rebinding protection is active, will discard upstream RFC1918 responses!
Sat Nov 27 02:39:17 2021 user.notice dnsmasq: Allowing 127.0.0.0/8 responses
Sat Nov 27 02:39:18 2021 daemon.info dnsmasq[1]: started, version 2.86 cachesize 150
Sat Nov 27 02:39:18 2021 daemon.info dnsmasq[1]: DNS service limited to local subnets
Sat Nov 27 02:39:18 2021 daemon.info dnsmasq[1]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Sat Nov 27 02:39:18 2021 daemon.info dnsmasq[1]: UBus support enabled: connected to system bus
Sat Nov 27 02:39:18 2021 daemon.info dnsmasq[1]: using only locally-known addresses for test
Sat Nov 27 02:39:18 2021 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Sat Nov 27 02:39:18 2021 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Sat Nov 27 02:39:18 2021 daemon.info dnsmasq[1]: using only locally-known addresses for local
Sat Nov 27 02:39:18 2021 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Sat Nov 27 02:39:18 2021 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Sat Nov 27 02:39:18 2021 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Sat Nov 27 02:39:18 2021 daemon.warn dnsmasq[1]: no servers found in /tmp/resolv.conf.d/resolv.conf.auto, will retry
Sat Nov 27 02:39:18 2021 daemon.info dnsmasq[1]: read /etc/hosts - 4 addresses
Sat Nov 27 02:39:18 2021 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 0 addresses
Sat Nov 27 02:39:52 2021 authpriv.info dropbear[1682]: Not backgrounding
Sat Nov 27 02:39:53 2021 daemon.notice wpa_supplicant[1784]: Successfully initialized wpa_supplicant
Sat Nov 27 02:39:53 2021 user.notice : Added device handler type: bonding
Sat Nov 27 02:39:53 2021 user.notice : Added device handler type: 8021ad
Sat Nov 27 02:39:53 2021 user.notice : Added device handler type: 8021q
Sat Nov 27 02:39:53 2021 user.notice : Added device handler type: macvlan
Sat Nov 27 02:39:53 2021 user.notice : Added device handler type: veth
Sat Nov 27 02:39:53 2021 user.notice : Added device handler type: bridge
Sat Nov 27 02:39:53 2021 user.notice : Added device handler type: Network device
Sat Nov 27 02:39:53 2021 user.notice : Added device handler type: tunnel
Sat Nov 27 02:39:55 2021 daemon.notice procd: /etc/rc.d/S50uhttpd: 4+0 records in
Sat Nov 27 02:39:55 2021 daemon.notice procd: /etc/rc.d/S50uhttpd: 4+0 records out
Sat Nov 27 02:39:56 2021 user.notice ucitrack: Setting up /etc/config/network reload dependency on /etc/config/dhcp
Sat Nov 27 02:39:56 2021 user.notice ucitrack: Setting up /etc/config/wireless reload dependency on /etc/config/network
Sat Nov 27 02:39:56 2021 user.notice ucitrack: Setting up /etc/config/firewall reload dependency on /etc/config/luci-splash
Sat Nov 27 02:39:56 2021 user.notice ucitrack: Setting up /etc/config/firewall reload dependency on /etc/config/qos
Sat Nov 27 02:39:56 2021 user.notice ucitrack: Setting up /etc/config/firewall reload dependency on /etc/config/miniupnpd
Sat Nov 27 02:39:57 2021 user.notice ucitrack: Setting up /etc/config/dhcp reload dependency on /etc/config/odhcpd
Sat Nov 27 02:39:57 2021 user.notice ucitrack: Setting up non-init /etc/config/fstab reload handler: /sbin/block mount
Sat Nov 27 02:39:57 2021 user.notice ucitrack: Setting up /etc/config/system reload trigger for non-procd /etc/init.d/led
Sat Nov 27 02:39:57 2021 user.notice ucitrack: Setting up /etc/config/system reload dependency on /etc/config/luci_statistics
Sat Nov 27 02:39:58 2021 user.notice ucitrack: Setting up /etc/config/system reload dependency on /etc/config/dhcp
Sat Nov 27 02:39:59 2021 daemon.notice procd: /etc/rc.d/S96led: setting up led LAN_DATA
Sat Nov 27 02:39:59 2021 daemon.notice procd: /etc/rc.d/S96led: setting up led LAN_LINK
Sat Nov 27 02:39:59 2021 kern.info kernel: [   63.375598] br-lan: port 1(eth0) entered blocking state
Sat Nov 27 02:39:59 2021 kern.info kernel: [   63.380904] br-lan: port 1(eth0) entered disabled state
Sat Nov 27 02:39:59 2021 kern.info kernel: [   63.386495] device eth0 entered promiscuous mode
Sat Nov 27 02:39:59 2021 daemon.notice netifd: Interface 'lan' is enabled
Sat Nov 27 02:39:59 2021 daemon.notice netifd: Interface 'lan' is setting up now
Sat Nov 27 02:40:00 2021 daemon.notice netifd: Interface 'lan' is now up
Sat Nov 27 02:40:00 2021 daemon.notice netifd: Interface 'loopback' is enabled
Sat Nov 27 02:40:00 2021 daemon.notice netifd: Interface 'loopback' is setting up now
Sat Nov 27 02:40:00 2021 daemon.notice netifd: Interface 'loopback' is now up
Sat Nov 27 02:40:00 2021 daemon.notice netifd: Network device 'lo' link is up
Sat Nov 27 02:40:00 2021 daemon.notice netifd: Interface 'loopback' has link connectivity
Sat Nov 27 02:40:00 2021 user.notice firewall: Reloading firewall due to ifup of lan (br-lan)
Sat Nov 27 02:40:01 2021 daemon.err odhcpd[1901]: Failed to send to ff02::1%lan@br-lan (Address not available)
Sat Nov 27 02:40:01 2021 daemon.info procd: - init complete -
Sat Nov 27 02:40:01 2021 daemon.info urandom_seed[2470]: Seed saved (/etc/urandom.seed)
Sat Nov 27 02:40:03 2021 kern.info kernel: [   66.506487] eth0: link up (1000Mbps/Full duplex)
Sat Nov 27 02:40:03 2021 kern.info kernel: [   66.511211] br-lan: port 1(eth0) entered blocking state
Sat Nov 27 02:40:03 2021 kern.info kernel: [   66.516545] br-lan: port 1(eth0) entered forwarding state
Sat Nov 27 02:40:03 2021 daemon.notice netifd: Network device 'eth0' link is up
Sat Nov 27 02:40:03 2021 kern.info kernel: [   66.525059] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
Sat Nov 27 02:40:03 2021 daemon.notice netifd: bridge 'br-lan' link is up
Sat Nov 27 02:40:03 2021 daemon.notice netifd: Interface 'lan' has link connectivity
Sat Nov 27 02:40:04 2021 daemon.err odhcpd[1901]: Failed to send to ff02::1%lan@br-lan (Address not available)
Sat Nov 27 02:40:04 2021 daemon.err odhcpd[1901]: Failed to send to fe80::bde6:efb2:1b9:2676%lan@br-lan (Address not available)
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: exiting on receipt of SIGTERM
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: started, version 2.86 cachesize 150
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: DNS service limited to local subnets
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: compile time options: IPv6 GNU-getopt no-DBus UBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-cryptohash no-DNSSEC no-ID loop-detect inotify dumpfile
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: UBus support enabled: connected to system bus
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq-dhcp[1]: DHCP, IP range 192.168.1.100 -- 192.168.1.249, lease time 12h
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: using only locally-known addresses for test
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: using only locally-known addresses for onion
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: using only locally-known addresses for localhost
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: using only locally-known addresses for local
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: using only locally-known addresses for invalid
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: using only locally-known addresses for bind
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: using only locally-known addresses for lan
Sat Nov 27 02:40:05 2021 daemon.warn dnsmasq[1]: no servers found in /tmp/resolv.conf.d/resolv.conf.auto, will retry
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: read /etc/hosts - 4 addresses
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Sat Nov 27 02:40:05 2021 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Sat Nov 27 02:40:06 2021 daemon.info dnsmasq[1]: read /etc/hosts - 4 addresses
Sat Nov 27 02:40:06 2021 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Sat Nov 27 02:40:06 2021 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Sat Nov 27 02:40:08 2021 daemon.info dnsmasq[1]: read /etc/hosts - 4 addresses
Sat Nov 27 02:40:08 2021 daemon.info dnsmasq[1]: read /tmp/hosts/dhcp.cfg01411c - 2 addresses
Sat Nov 27 02:40:08 2021 daemon.info dnsmasq[1]: read /tmp/hosts/odhcpd - 1 addresses
Sat Nov 27 02:40:08 2021 daemon.info dnsmasq-dhcp[1]: read /etc/ethers - 0 addresses
Sat Nov 27 02:40:42 2021 user.info : luci: accepted login on / for root from 192.168.1.10
Sat Nov 27 02:41:46 2021 daemon.notice hostapd: Configuration file: /var/run/hostapd-phy0.conf (phy wlan0) --> new PHY

I hope this can help you in getting some extra support for another flash layout?

are you sure? if that hardware is your property there should be no problems...

the mtd partitions are very different...not using the same platform as Engenius, so it would take more info and more time.

anyway if you're really that worried, message me privately here or email mcpratt at pm dot me

I'd like to know the FCC ID of anything I work on, so I can look at the official pictures

also if you wanted to provide pictures of the board with all metal shields removed that would be nice

I'll let you know what else I need when I have time to start...

1 Like

OK, seems like I cannot PM you directly, but lets see here...
I even asked the manufacturer on their forums for the source. got a big no, which in terms, I think is a violation of the GPL, and not fair towards the public. I'm sure they have their reasons (don't want anyone to find bugs in the code and exploit it on their gateways.)

The device/brand in question is a Fortinet FortiAP321-C.
FCC-ID: TVE-26145033
There's a long number (starts with 7016A, ends with 008) silkscreened just under the ethernet port, leads to this link: https://wikidevi.wi-cat.ru/WatchGuard_AP300
Will you need the dumped flash?
Photos with shields removed: (Used a pencil on the DRAM chips, to make the text more legible)
Can only post one image here, had to use Imgur.
https://imgur.com/a/83gBiwf

yeah I have a similar Fortinet AP actually, havent been able to work on it yet, it would require a lot since their method of upgrade is a binary program instead of a script like Engenius

From what I do know, is that it is very simpler in terms of flash partitioning,
and I think we can get away of forcing u-boot to TFTP boot the minimal firmware, and you just upload the rest of the stuff for now.
The 321-C actually booted your AP300 firmware, so no apparent issues there from what I have observed.

I think the sysupgrade from stock should be placed on the bottom of the list, until we can get a firmware upgrade somehow.
But, I also have seen that u-boot has a set of commands writing some files to certain parts of the flash, using tftp to download it from the server.
I will have to power the AP on, and get the "printenv" output.

yeah please do as much testing as you like over a TFTP boot with the initramfs images available, you may also want to try the initramfs image for EAP1200 / EAP1750

anyway, the one I have is a 221-B and I've made pretty good progress with it. the info you provided helped but I'm still slightly stuck with making a good factory.bin. They use a binary that's part of busybox to verify and flash images, and it doesn't output much on failure...literally just this:

Image check failed, just reboot ...

but I have a fully working initramfs and sysupgrade and have more things to try for the factory.bin, also working on decompiling their busybox, not sure whether that would help...

If we're lucky, they are just checking the magic numbers for both rootfs and kernel, so I just need to put a fake rootfs at the top of the image instead of the kernel, and point the lzma-loader to a different offset

ethernet and both radios, reset button, and leds working so far, except the ethernet leds which require a new hotplug feature to be added to netifd for link state, in order for them to change color depending on the speed like OEM has it...

That's awesome to hear man.
I'm bogged down with work stuff for the next two days, but I'm having some well-deserved leave for the Christmas holidays after this two days.
I will take my AP, and try to test the initramfs images for the EAP1200 / EAP1750 and report back.
As for the busybox verification, I'm sure that they have some CRC-32 check or a key check that is compiled in statically.
I had modified and reverse-engineered some unrelated binaries not long ago, I'd recommend that you look at Ghidra, I think that they have MIPS processor support, and may help you in getting the last task done.

Could you find the calibration data offsets for the radio on the flash? or is that handled automatically by the driver?

calibration offsets should be the same as Engenius boards

by the way, you should take an initramfs of a stable branch so you have LuCI and then use that to back up all the mtdblocks the easy way. backing up the whole flash is an important first step before messing around. just keep in mind which image you used to back up because the mtd partitions would change

but if theres a difference in the size of the flash chip and what the image thinks it is, then you should wait until we have an initramfs specifically for that board.

Hello there.
I booted both recommended initramfs images, but unfortunately, it does not detect the radio hardware, as well as the offsets of the flash is wrong with the mtdblock backup, as well as too many partitions. (The Fortinet AP does not have a recovery partition, for example, it only has like 5 partitions)

I already previously made a backup of the mtdblocks a while ago, did both with a dump of the flashchip and over tftp with the normal Fortinet system shell.

I would believe that the hardware is not entirely like the EAP ones.
Also, could not find a EAP1750 initramfs, so I tried the ECP1750, both booted fine, but could not detect/control the hardware.

I would have argued that the AP300 is very close, if not the same as the FortiAP321C.
Would you like to get the kernel/system logs for those two above-mentioned imitramfs images, or not required?

BR

thats funny because AP300 and EAP1750 are almost the same

ethernet works on both right?

Yep, but not the wireless radios though.(EAP1750) as well as the LEDs, etc.

The 321C I have, only have three LEDs, one for power, one for ethernet and one for wlan hardware, not like the 2.4g and 5g leds on the EAP1750.
Ethernet came up, though.
Funny enough, when I looked up the FCC id and searched that silkscreened "hex" address, I saw that the AP300 has the same silkscreened "hex" value near the ethernet port in my searches. (Think it was that russian firmware/hardware site, can't remember exactly which), but it definitely pointed to the Watchguard AP300, just with another brand of flashchip.

Ah, found it.
WikiDevi.

Speaking of which, I could not find the EAP1750 initrd, do you have it, or was the ECB1750 initrd adaquate enough?
Here is the EAP1200 initrd kernel logs:

[    0.000000] Linux version 5.10.146 (builder@buildhost) (mips-openwrt-linux-musl-gcc (OpenWrt GCC 11.2.0 r19777-2853b6d652) 11.2.0, GNU ld (GNU Binutils) 2.37) #0 Fri Oct 7 23:34:56 2022
[    0.000000] printk: bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019750 (MIPS 74Kc)
[    0.000000] MIPS: machine is EnGenius EAP1200H
[    0.000000] SoC: Qualcomm Atheros QCA9558 ver 1 rev 0
[    0.000000] Initrd not found or empty - disabling initrd
[    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] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    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] On node 0 totalpages: 65536
[    0.000000]   Normal zone: 576 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 65536 pages, LIFO batch:15
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] Kernel command line: console=ttyS0,115200n8 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=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 240352K/262144K available (5850K kernel code, 611K rwdata, 744K rodata, 11792K init, 209K bss, 21792K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 51
[    0.000000] CPU clock: 720.000 MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5309056796 ns
[    0.000007] sched_clock: 32 bits at 360MHz, resolution 2ns, wraps every 5965232126ns
[    0.092763] Calibrating delay loop... 358.80 BogoMIPS (lpj=1794048)
[    0.227755] pid_max: default: 32768 minimum: 301
[    0.283125] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.370560] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.464990] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.559172] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.676759] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.758057] pinctrl core: initialized pinctrl subsystem
[    0.824282] NET: Registered protocol family 16
[    0.878104] thermal_sys: Registered thermal governor 'step_wise'
[    0.922418] clocksource: Switched to clocksource MIPS
[    1.055671] NET: Registered protocol family 2
[    1.107965] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    1.195171] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    1.295205] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    1.386889] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    1.471223] TCP: Hash tables configured (established 2048 bind 2048)
[    1.547340] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.625476] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    1.709007] NET: Registered protocol family 1
[    1.761091] PCI: CLS 0 bytes, default 32
[    1.984202] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    2.065023] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    2.134838] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    2.253070] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    2.344185] pinctrl-single 1804002c.pinmux: 544 pins, size 68
[    2.413866] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    2.491911] printk: console [ttyS0] disabled
[    2.543016] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 2500000) is a 16550A
[    2.646106] printk: console [ttyS0] enabled
[    2.655010] printk: bootconsole [early0] disabled
[    2.679685] spi-nor spi0.0: w25q256 (32768 Kbytes)
[    2.684660] 8 fixed-partitions partitions found on MTD device spi0.0
[    2.691146] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
[    2.697899] OF: Bad cell count for /ahb/spi@1f000000/flash@0/partitions
[    2.705210] Creating 8 MTD partitions on "spi0.0":
[    2.710087] 0x000000000000-0x000000040000 : "u-boot"
[    2.719222] 0x000000040000-0x000000050000 : "u-boot-env"
[    2.725506] 0x000000050000-0x0000000a0000 : "custom"
[    2.732810] 0x0000000a0000-0x0000000b0000 : "loader"
[    2.738671] 0x0000000b0000-0x000000220000 : "fwconcat1"
[    2.746156] 0x000000220000-0x000000d70000 : "fwconcat0"
[    2.752298] 0x000000d70000-0x000000ff0000 : "failsafe"
[    2.759744] 0x000000ff0000-0x000001000000 : "art"
[    2.768188] Concatenating MTD devices:
[    2.771996] (0): "fwconcat0"
[    2.774973] (1): "fwconcat1"
[    2.777889] into device "virtual_flash"
[    2.781803] 1 fixed-partitions partitions found on MTD device virtual_flash
[    2.789146] Creating 1 MTD partitions on "virtual_flash":
[    2.794677] 0x000000000000-0x000000cc0000 : "firmware"
[    2.860401] ag71xx 19000000.eth: invalid MAC address, using random address
[    3.302931] ag71xx 19000000.eth: connected to PHY at mdio.0:05 [uid=004dd072, driver=Qualcomm Atheros AR8035]
[    3.313537] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode: rgmii-id
[    3.320477] i2c /dev entries driver
[    3.325819] NET: Registered protocol family 10
[    3.337206] Segment Routing with IPv6
[    3.341028] NET: Registered protocol family 17
[    3.345653] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    3.358821] 8021q: 802.1Q VLAN Support v1.8
[    3.363886] PCI host bridge /ahb/pcie-controller@180c0000 ranges:
[    3.370095]  MEM 0x0000000010000000..0x0000000011ffffff
[    3.375441]   IO 0x0000000000000000..0x0000000000000000
[    3.380904] PCI host bridge to bus 0000:00
[    3.385102] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff]
[    3.392072] pci_bus 0000:00: root bus resource [io  0x0000]
[    3.397737] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]
[    3.404634] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    3.412725] pci 0000:00:00.0: [168c:003c] type 00 class 0x028000
[    3.418848] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]
[    3.425798] pci 0000:00:00.0: reg 0x30: [mem 0x00000000-0x0000ffff pref]
[    3.432687] pci 0000:00:00.0: supports D1
[    3.436758] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
[    3.443648] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    3.450379] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x101fffff 64bit]
[    3.457847] pci 0000:00:00.0: BAR 6: assigned [mem 0x10200000-0x1020ffff pref]
[    3.508922] Freeing unused kernel memory: 11792K
[    3.513630] This architecture does not have kernel memory protection.
[    3.520173] Run /init as init process
[    3.523894]   with arguments:
[    3.523898]     /init
[    3.523902]   with environment:
[    3.523906]     HOME=/
[    3.523910]     TERM=linux
[    4.046168] init: Console is alive
[    4.050001] init: - watchdog -
[    4.072978] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.085420] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.103184] init: - preinit -
[    4.378242] random: jshn: uninitialized urandom read (4 bytes read)
[    4.525982] random: jshn: uninitialized urandom read (4 bytes read)
[    4.558909] random: jshn: uninitialized urandom read (4 bytes read)
[    7.843838] eth0: link up (1000Mbps/Full duplex)
[    7.848557] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    8.885708] eth0: link down
[    8.899491] procd: - early -
[    8.902780] procd: - watchdog -
[    9.515530] procd: - watchdog -
[    9.519052] procd: - ubus -
[    9.529740] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.572831] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.579743] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.589631] procd: - init -
[   10.240773] kmodloader: loading kernel modules from /etc/modules.d/*
[   10.608659] urngd: v1.0.2 started.
[   10.734976] Loading modules backported from Linux version v5.15.58-0-g7d8048d4e064
[   10.742708] Backport generated by backports.git v5.15.58-1-0-g42a95ce7
[   10.814587] random: crng init done
[   10.818049] random: 28 urandom warning(s) missed due to ratelimiting
[   10.901775] PPP generic driver version 2.4.2
[   10.909164] NET: Registered protocol family 24
[   10.959578] ath: phy0: Unable to initialize hardware; initialization status: -5
[   10.967042] ath9k 18100000.wmac: failed to initialize device
[   10.972855] ath9k: probe of 18100000.wmac failed with error -5
[   10.980939] kmodloader: done loading kernel modules from /etc/modules.d/*
[   53.942864] br-lan: port 1(eth0) entered blocking state
[   53.948178] br-lan: port 1(eth0) entered disabled state
[   53.953789] device eth0 entered promiscuous mode
[   57.043903] eth0: link up (1000Mbps/Full duplex)
[   57.048631] br-lan: port 1(eth0) entered blocking state
[   57.053973] br-lan: port 1(eth0) entered forwarding state
[   57.082486] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  417.922556] eth0: link down
[  417.925676] br-lan: port 1(eth0) entered disabled state
[  426.243808] eth0: link up (1000Mbps/Full duplex)
[  426.248531] br-lan: port 1(eth0) entered blocking state
[  426.253862] br-lan: port 1(eth0) entered forwarding state

I forgot, the difference is flash size, which is why it didnt find the calibration data...

1 Like

PR is up for my Fortinet model, with all the 9's and everything

1 Like

Hi there.

I also bought in support for my AP, the 321-C.
Have no idea what I'm doing to the dts, but hey, at least it boots and shows my MAC addresses just fine.
It may change in the future, as soon as yours and another guy's PR's is merged.

This is a WIP branch, so feel free to make some modifications/fix my mistakes.
I based most of the DTS off the FP221-C PR and WG AP300's dts file.
The AP I have, have a large flash, 128MB to be precise.

I left comments, everything else looks ok so far

do you have a backup of flash partitions with the openwrt partitioning? if so you can write them back to flash easily to test a factory.bin, just double check your sizes and partition numbers before writing. I have done it several times, loading a mtdX.bin file over TFTP to /tmp and mtd write <file> <device> and delete it from /tmp to free ram, and repeat

I have noticed that if the factory.bin recipe is not perfectly sized, it will not write the last part to flash.