Custom build AP143 to use with CF-WR752AC

I've made a custom build using the AP143 target and OpenWRT 18.06-4.
I know this is not the standard approach. I managed to boot the kernel images that I've flash using the bootloader but it seems that the device can't mount the file system.

uboot print env output

bootcmd=bootm 0x9f020000
bootdelay=1
baudrate=115200
ethaddr=0x00:0xaa:0xbb:0xcc:0xdd:0xee
ipaddr=192.168.1.1
serverip=192.168.1.10
bootfile="firmware.bin"
loadaddr=0x80800000
dir=
lu=tftp 0x80060000 ${dir}tuboot.bin&&erase 0x9f000000 +$filesize&&cp.b $fileaddr 0x9f000000 $filesize
lf=tftp 0x80060000 ${dir}ap143${bc}-jffs2&&erase 0x9f1A0000 +$filesize&&cp.b $fileaddr 0x9f1A0000 $filesize
lk=tftp 0x80060000 ${dir}vmlinux${bc}.lzma.uImage&&erase 0x9f020000 +$filesize&&cp.b $fileaddr 0x9f020000 $filesize
uboot_addr=0x9F000000
uboot_name=uboot.bin
uboot_size=0x10000
uboot_upg=if ping $serverip; then tftp $loadaddr $uboot_name && erase $uboot_addr +$filesize && cp.b $loadaddr $uboot_addr $filesize ; else ERROR! Server noti
firmware_addr=0x9F020000
firmware_name=firmware.bin
firmware_upg=if ping $serverip; then tftp $loadaddr $firmware_name && erase $firmware_addr +$filesize && cp.b $loadaddr $firmware_addr $filesize ;else ERROR!i
firmware_name_auto=firmware_auto.bin
firmware_upg_auto=if ping $serverip; then tftp $loadaddr $firmware_name_auto && erase $firmware_addr +$filesize && cp.b $loadaddr $firmware_addr $filesize ;ei
art=tftp $loadaddr art-calibration-953x.bin && bootm
stdin=serial
stdout=serial
stderr=serial
bootargs=console=ttyS0,115200 root=31:03 rootfstype=jffs2 init=/sbin/init mtdparts=ath-nor0:64k(u-boot),64k(ART),1536k(uImage),6464k(rootfs),64k(mib0)
ethact=eth0

Environment size: 1466/65532 bytes

bootlog

Starting kernel ...

[    0.000000] Linux version 4.14.132 (joao@joao-Elcomasv-01) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 unknown)) #0 Thu Jul 25 14:07:21 2019
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Qualcomm Atheros QCA9533 ver 2 rev 0
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    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-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] random: get_random_bytes called from start_kernel+0x90/0x478 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=AP143 console=ttyS0,115200 mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)rd
[    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] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 124624K/131072K available (3425K kernel code, 179K rwdata, 764K rodata, 296K init, 201K bss, 6448K 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] Clocks: CPU:650.000MHz, DDR:393.115MHz, AHB:216.666MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5880801374 ns
[    0.000009] sched_clock: 32 bits at 325MHz, resolution 3ns, wraps every 6607641598ns
[    0.008262] Calibrating delay loop... 432.53 BogoMIPS (lpj=2162688)
[    0.074907] pid_max: default: 32768 minimum: 301
[    0.080024] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.087002] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.097157] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.107602] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.114690] NET: Registered protocol family 16
[    0.121060] MIPS: machine is Qualcomm Atheros AP143 reference board
[    0.134062] ar71xx: invalid MDIO id 1
[    0.626716] clocksource: Switched to clocksource MIPS
[    0.633303] NET: Registered protocol family 2
[    0.638850] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.646224] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.653020] TCP: Hash tables configured (established 1024 bind 1024)
[    0.659946] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.666129] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.673154] NET: Registered protocol family 1
[    0.683364] Crashlog allocated RAM at address 0x3f00000
[    0.690780] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.703178] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.709393] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.730757] io scheduler noop registered
[    0.734901] io scheduler deadline registered (default)
[    0.740802] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.748005] console [ttyS0] disabled
[    0.771946] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    0.781064] console [ttyS0] enabled
[    0.781064] console [ttyS0] enabled
[    0.788628] bootconsole [early0] disabled
[    0.788628] bootconsole [early0] disabled
[    0.802163] m25p80 spi0.0: found w25q128, expected m25p80
[    0.817667] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.822574] 6 cmdlinepart partitions found on MTD device spi0.0
[    0.828714] Creating 6 MTD partitions on "spi0.0":
[    0.833676] 0x000000000000-0x000000040000 : "u-boot"
[    0.840858] 0x000000040000-0x000000050000 : "u-boot-env"
[    0.848172] 0x000000050000-0x000000e80000 : "rootfs"
[    0.854182] mtd: device 2 (rootfs) set to be root filesystem
[    0.860164] mtdsplit: no squashfs found in "rootfs"
[    0.867008] 0x000000e80000-0x000000ff0000 : "kernel"
[    0.873790] 0x000000ff0000-0x000001000000 : "art"
[    0.881163] 0x000000050000-0x000000ff0000 : "firmware"
[    0.889446] libphy: Fixed MDIO Bus: probed
[    0.924939] libphy: ag71xx_mdio: probed
[    1.559758] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd042, driver=Generic PHY]
[    1.569919] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    2.199294] ag71xx-mdio.1: Found an AR934X built-in switch
[    2.252584] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    2.259984] NET: Registered protocol family 17
[    2.267181] 8021q: 802.1Q VLAN Support v1.8
[    2.275190] List of all partitions:
[    2.278905] 1f00             256 mtdblock0 
[    2.278911]  (driver?)
[    2.285660] 1f01              64 mtdblock1 
[    2.285663]  (driver?)
[    2.292433] 1f02           14528 mtdblock2 
[    2.292438]  (driver?)
[    2.299209] 1f03            1472 mtdblock3 
[    2.299214]  (driver?)
[    2.305962] 1f04              64 mtdblock4 
[    2.305965]  (driver?)
[    2.312729] 1f05           16000 mtdblock5 
[    2.312734]  (driver?)
[    2.319497] No filesystem could mount root, tried: 
[    2.319501]  squashfs
[    2.324530] 
[    2.328430] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,2)
[    2.337830] Rebooting in 1 seconds..

I'm not sure how to fix this and any feedback on how to proceed would be super appreciated. I've other samples of the CF-WR752AC laying around so I can make a backup of some data from the original firmware partitions and make a backup of them through the bootloader.

your kernel command line is missing rootfs type

This mtd layout is totally different to the one in your kernel bootlog...
You should fix that first!

How did you boot or flash the resulting openwrt image?

Does everything work with the initram image?
If not, then concentrate first on making everything work apart the rootfs with a initram openwrt image.

Edit: And why not porting your device to the ath79 target instead of the deprecated ar71xx target?

1 Like

:+1: on ath79. Once you get a hang of DTS, it’s a lot easier to configure.

(Also, no new ports are being accepted on ar71xx.)

Appreciate the feedback I'll look into ath79 and DTS to proceed with the port. I guess there's a guide here on forum on the website.

How did you boot or flash the resulting openwrt image?

I've managed to access the device boot loader and load the binaries through tftp commands. Then I've used bootm to boot the kernel at the address I uploaded the files.

I've decided to give a try as the AP143 has a target ready. It worked with a couple of different boards that I've tried before. I know this was a lazy approach but decided to give a try anyway.

This means you dont have anything in your flash memory and your kernel does search for the rootfs magic bytes on flash memory.
In almost every device the default loadaddr is in ram and not in flash, so there was no rootfs on your flash memory.
As i said before, use the initram openwrt image to boot your kernel and rootfs directly from ram with tftpboot and make all apart from rootfs in flash working before.

I think if you are at the point of all hw is working as it should, the step with the rootfs in flash will be almost clear to you, as you need to access the flash for ath9k firmware and device specific mac addresses.

A brief update to this topic, after adjusting the memory layout I've managed to boot the OS properly. The 5GHz radio is not working though.
I will look into porting DTS after getting both radios working on ar71xx as a starting guideline.

Also I'm attaching the OEM firmware bootlog

U-Boot 1.1.4-g9e952007-dirty (Dec 20 2015 - 08:47:17)

ap143 - Honey Bee 2.0

DRAM:  128 MB
Flash: 16 MB

eth0 link down
FAIL
eth1 link down
FAIL
Using eth0 device
Tx Timed out                                                                    
ping failed; host 192.168.1.10 is not alive                                     
Unknown command 'ERROR!' - try 'help'                                           
Hit any key to stop autoboot:  0                                                
## Booting image at 9f020000 ...                                                
   Image Name:   MIPS OpenWrt Linux-3.10.44                                     
   Created:      2018-01-05   8:59:30 UTC                                       
   Image Type:   MIPS Linux Kernel Image (lzma compressed)                      
   Data Size:    1124162 Bytes =  1.1 MB                                        
   Load Address: 80060000                                                       
   Entry Point:  80060000                                                       
   Verifying Checksum at 0x9f020040 ...OK                                       
   Uncompressing Kernel Image ... OK                                            
No initrd                                                                       
## Transferring control to Linux (at address 80060000) ...                      
## Giving linux memsize in bytes, 134217728                                     
                                                                                
Starting kernel ...                                                             
                                                                                
[    0.000000] Linux version 3.10.44 (wangqiuqiang@oracle.tecmint.com) (gcc ver8
[    0.000000] bootconsole [early0] enabled                                     
[    0.000000] CPU revision is: 00019374 (MIPS 24Kc)                            
[    0.000000] SoC: Qualcomm Atheros QCA9531 ver 2 rev 0                        
[    0.000000] Clocks: CPU:650.000MHz, DDR:391.650MHz, AHB:216.666MHz, Ref:25.0z
[    0.000000] Determined physical RAM map:                                     
[    0.000000]  memory: 08000000 @ 00000000 (usable)                            
[    0.000000] Initrd not found or empty - disabling initrd                     
[    0.000000] Zone ranges:                                                     
[    0.000000]   Normal   [mem 0x00000000-0x07ffffff]                           
[    0.000000] Movable zone start for each node                                 
[    0.000000] Early memory node ranges                                         
[    0.000000]   node   0: [mem 0x00000000-0x07ffffff]                          
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.  
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32s
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pa2
[    0.000000] Kernel command line:  board=COMFAST-CF-WR752AC console=ttyS0,115d
[    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] Writing ErrCtl register=00000000                                 
[    0.000000] Readback ErrCtl register=00000000                                
[    0.000000] Memory: 125796k/131072k available (2425k kernel code, 5276k rese)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1       
[    0.000000] NR_IRQS:51                                                       
[    0.000000] Calibrating delay loop... 432.53 BogoMIPS (lpj=2162688)          
[    0.050000] pid_max: default: 32768 minimum: 301                             
[    0.050000] Mount-cache hash table entries: 512                              
[    0.060000] NET: Registered protocol family 16                               
[    0.070000] MIPS: machine is COMFAST CF-WR752AC                              
[    0.510000] registering PCI controller with io_map_base unset                
[    0.520000] bio: create slab <bio-0> at 0                                    
[    0.530000] PCI host bridge to bus 0000:00                                   
[    0.530000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x11ffffff]   
[    0.540000] pci_bus 0000:00: root bus resource [io  0x0000]                  
[    0.540000] pci_bus 0000:00: No busn resource found for root bus, will use []
[    0.550000] pci 0000:00:00.0: invalid calibration data                       
[    0.550000] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x101fffff 64b]
[    0.560000] pci 0000:00:00.0: using irq 40 for pin 1                         
[    0.560000] Switching to clocksource MIPS                                    
[    0.570000] NET: Registered protocol family 2                                
[    0.570000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)  
[    0.580000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)         
[    0.580000] TCP: Hash tables configured (established 1024 bind 1024)         
[    0.590000] TCP: reno registered                                             
[    0.590000] UDP hash table entries: 256 (order: 0, 4096 bytes)               
[    0.600000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)          
[    0.600000] NET: Registered protocol family 1                                
[    0.620000] squashfs: version 4.0 (2009/01/31) Phillip Lougher               
[    0.630000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORI.
[    0.640000] msgmni has been set to 245                                       
[    0.650000] io scheduler noop registered                                     
[    0.650000] io scheduler deadline registered (default)                       
[    0.650000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled         
[    0.680000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11) is a 16550A    
[    0.690000] console [ttyS0] enabled, bootconsole disabled                    
[    0.690000] console [ttyS0] enabled, bootconsole disabled                    
[    0.700000] ath79-spi ath79-spi: master is unqueued, this is deprecated      
[    0.710000] m25p80 spi0.0: found w25q128, expected m25p80                    
[    0.720000] m25p80 spi0.0: w25q128 (16384 Kbytes)                            
[    0.720000] 7 cmdlinepart partitions found on MTD device spi0.0              
[    0.730000] Creating 7 MTD partitions on "spi0.0":                           
[    0.730000] 0x000000000000-0x000000010000 : "u-boot"                         
[    0.740000] 0x000000010000-0x000000020000 : "art"                            
[    0.750000] 0x000000020000-0x0000001a0000 : "kernel"                         
[    0.750000] 0x0000001a0000-0x000000fe0000 : "rootfs"                         
[    0.760000] mtd: device 3 (rootfs) set to be root filesystem                 
[    0.770000] 1 squashfs-split partitions found on MTD device rootfs           
[    0.770000] 0x000000780000-0x000000fe0000 : "rootfs_data"                    
[    0.780000] 0x000000fe0000-0x000000ff0000 : "configs"                        
[    0.790000] 0x000000ff0000-0x000001000000 : "nvram"                          
[    0.800000] 0x000000020000-0x000000fe0000 : "firmware"                       
[    0.820000] libphy: ag71xx_mdio: probed                                      
[    0.830000] eth0: Atheros AG71xx at 0xba000000, irq 5                        
[    1.390000] ag71xx-mdio.1: Found an AR934X built-in switch                   
[    1.430000] eth1: Atheros AG71xx at 0xb9000000, irq 4                        
[    1.990000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd]
[    2.000000] TCP: cubic registered                                            
[    2.000000] NET: Registered protocol family 17                               
[    2.010000] Bridge firewalling registered                                    
[    2.010000] 8021q: 802.1Q VLAN Support v1.8                                  
[    2.020000] VFS: Mounted root (squashfs filesystem) readonly on device 31:3. 
[    2.030000] Freeing unused kernel memory: 276K (8036b000 - 803b0000)         
[    2.990000] init: Console is alive                                           
[    2.990000] init: - watchdog -                                               
[    5.000000] init: - preinit -                                                
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    
[    9.660000] jffs2: notice: (372) jffs2_build_xattr_subsystem: complete build.
[    9.680000] mount_root: switching to jffs2 overlay                           
2116+0 records in                                                               
2116+0 records out                                                              
12064+0 records in                                                              
12064+0 records out                                                             
[   10.220000] procd: - early -                                                 
[   10.230000] procd: - watchdog -                                              
[   10.920000] procd: - ubus -                                                  
[   11.930000] procd: - init -                                                  
Please press Enter to activate this console.                                    
[   13.850000] natsemi dp8381x driver, version 2.1, Sept 11, 2006               
[   13.850000]   originally by Donald Becker <becker@scyld.com>                 
[   13.850000]   2.4.x kernel port by Jeff Garzik, Tjeerd Mulder                
[   13.880000] gre: GRE over IPv4 demultiplexor driver                          
[   13.900000] ip_gre: GRE over IPv4 tunneling driver                           
[   13.910000] i2c /dev entries driver                                          
[   13.920000] Loading modules backported from Linux version master-2014-05-22-a
[   13.930000] Backport generated by backports.git backports-20140320-37-g5c33d0
[   14.170000] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)                 
[   14.180000] ath10k_pci 0000:00:00.0: pci irq legacy oper_irq_mode 1 irq_mode0
[   15.090000] ath10k_pci 0000:00:00.0: qca9888 hw2.0 target 0x01000000 chip_id0
[   15.100000] ath10k_pci 0000:00:00.0: kconfig debug 1 debugfs 1 tracing 1 dfs1
[   15.130000] ath10k_pci 0000:00:00.0: firmware ver 10.4-3.5.1-00014 api 5 feaa
[   15.520000] ath10k_pci 0000:00:00.0: board_file api 1 bmi_id 0:0 crc32 9cddb9
[   17.310000] ath10k_pci 0000:00:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal otp m1
[   17.460000] u32 classifier                                                   
[   17.460000]     input device check on                                        
[   17.460000]     Actions configured                                           
[   17.480000] Mirror/redirect action on                                        
[   17.510000] nf_conntrack version 0.5.0 (1969 buckets, 7876 max)              
[   17.590000] Ebtables v2.0 registered                                         
[   17.600000] ip_tables: (C) 2000-2006 Netfilter Core Team                     
[   17.660000] Netfilter messages via NETLINK v0.30.                            
[   17.720000] xt_time: kernel timezone is -0000                                
[   17.750000] ctnetlink v0.93: registering with nfnetlink.                     
[   17.760000] PPP generic driver version 2.4.2                                 
[   17.770000] PPP MPPE Compression module registered                           
[   17.780000] NET: Registered protocol family 24                               
[   17.840000] ieee80211 phy1: Atheros AR9531 Rev:2 mem=0xb8100000, irq=47      
configs:do check configs                                                        
[   28.130000] device eth0 entered promiscuous mode                             
[   28.180000] device eth1 entered promiscuous mode                             
[   28.210000] br-wan: port 1(eth1) entered forwarding state                    
[   28.220000] br-wan: port 1(eth1) entered forwarding state                    
[   29.070000] br-wan: port 1(eth1) entered disabled state                      
[   32.160000] device wlan8 entered promiscuous mode                            
[   35.780000] device wlan0 entered promiscuous mode                            
[   41.530000] br-lan: port 2(wlan8) entered forwarding state                   
[   41.530000] br-lan: port 2(wlan8) entered forwarding state                   
[   43.530000] br-lan: port 2(wlan8) entered forwarding state                   
[   46.240000] br-lan: port 3(wlan0) entered forwarding state                   
[   46.240000] br-lan: port 3(wlan0) entered forwarding state                   
[   48.240000] br-lan: port 3(wlan0) entered forwarding state                   

this is my current bootlog with only 2.4GHz radio working.


Starting kernel ...

[    0.000000] Linux version 4.9.120 (joao@joao-box) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7258-5eb055306f) ) #0 Thu Aug 16 07:51:15 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Qualcomm Atheros QCA9533 ver 2 rev 0
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    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-0x0000000007ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=AP143 console=ttyS0,115200 mtdparts=spi0.0:64k(u-boot)ro,64k(art)ro,1536k(kernel),14592k(rootfs),64k(configs),64k(nvram),16128k@0x20000(firmware) rootfstype=squashfs 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] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 125144K/131072K available (3026K kernel code, 165K rwdata, 700K rodata, 260K init, 215K bss, 5928K 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] Clocks: CPU:650.000MHz, DDR:392.602MHz, AHB:216.666MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5880801374 ns
[    0.000009] sched_clock: 32 bits at 325MHz, resolution 3ns, wraps every 6607641598ns
[    0.008278] Calibrating delay loop... 432.53 BogoMIPS (lpj=2162688)
[    0.071115] pid_max: default: 32768 minimum: 301
[    0.076119] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.083099] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.093935] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.104370] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.111518] NET: Registered protocol family 16
[    0.118017] MIPS: machine is Qualcomm Atheros AP143 reference board
[    0.131056] ar71xx: invalid MDIO id 1
[    0.625238] clocksource: Switched to clocksource MIPS
[    0.631884] NET: Registered protocol family 2
[    0.637586] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.644957] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.651738] TCP: Hash tables configured (established 1024 bind 1024)
[    0.658578] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.664758] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.671729] NET: Registered protocol family 1
[    0.683103] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    0.697431] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.703579] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.730123] io scheduler noop registered
[    0.734262] io scheduler deadline registered (default)
[    0.740085] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.749677] console [ttyS0] disabled
[    0.773620] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    0.782731] console [ttyS0] enabled
[    0.782731] console [ttyS0] enabled
[    0.790287] bootconsole [early0] disabled
[    0.790287] bootconsole [early0] disabled
[    0.805743] m25p80 spi0.0: found w25q128, expected m25p80
[    0.820978] m25p80 spi0.0: w25q128 (16384 Kbytes)
[    0.825919] 7 cmdlinepart partitions found on MTD device spi0.0
[    0.832028] Creating 7 MTD partitions on "spi0.0":
[    0.837001] 0x000000000000-0x000000010000 : "u-boot"
[    0.844493] 0x000000010000-0x000000020000 : "art"
[    0.851870] 0x000000020000-0x0000001a0000 : "kernel"
[    0.859495] 0x0000001a0000-0x000000fe0000 : "rootfs"
[    0.866565] mtd: device 3 (rootfs) set to be root filesystem
[    0.872477] 1 squashfs-split partitions found on MTD device rootfs
[    0.878944] 0x0000009d0000-0x000000fe0000 : "rootfs_data"
[    0.887191] 0x000000fe0000-0x000000ff0000 : "configs"
[    0.894858] 0x000000ff0000-0x000001000000 : "nvram"
[    0.902453] 0x000000020000-0x000000fe0000 : "firmware"
[    0.911529] libphy: Fixed MDIO Bus: probed
[    0.941989] libphy: ag71xx_mdio: probed
[    1.578205] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd042, driver=Generic PHY]
[    1.588451] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    2.217791] ag71xx-mdio.1: Found an AR934X built-in switch
[    2.271196] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    2.278533] NET: Registered protocol family 17
[    2.283225] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    2.296784] 8021q: 802.1Q VLAN Support v1.8
[    2.310609] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    2.320100] Freeing unused kernel memory: 260K
[    2.324692] This architecture does not have kernel memory protection.
[    2.545252] random: fast init done
[    2.993990] init: Console is alive
[    2.997906] init: - watchdog -
[    4.431111] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.575390] usbcore: registered new interface driver usbfs
[    4.581169] usbcore: registered new interface driver hub
[    4.586810] usbcore: registered new device driver usb
[    4.598319] Button Hotplug driver version 0.4.1
[    4.608693] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.626790] init: - preinit -
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    6.739966] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[    6.812479] urandom-seed: Seed file not found (/etc/urandom.seed)
[    6.920952] procd: - early -
[    6.924059] procd: - watchdog -
[    7.569057] procd: - watchdog -
[    7.572631] procd: - ubus -
[    7.727345] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.739381] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.746625] random: ubusd: uninitialized urandom read (4 bytes read)
[    7.754273] procd: - init -
Please press Enter to activate this console.
[    8.346836] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.360364] mpls_gso: MPLS GSO support
[    8.367823] tun: Universal TUN/TAP device driver, 1.6
[    8.373052] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    8.467716] gre: GRE over IPv4 demultiplexor driver
[    8.475497] ip_gre: GRE over IPv4 tunneling driver
[    8.492453] Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
[    8.509254] Netfilter messages via NETLINK v0.30.
[    8.517476] ip_set: protocol 6
[    8.628417] u32 classifier
[    8.631234]     input device check on
[    8.635012]     Actions configured
[    8.751297] Mirror/redirect action on
[    8.766555] nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
[    8.784731] arp_tables: arp_tables: (C) 2002 David S. Miller
[    8.795914] Bridge firewalling registered
[    8.802778] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[    8.811131] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[    8.822415] ip_tables: (C) 2000-2006 Netfilter Core Team
[    8.991862] ctnetlink v0.93: registering with nfnetlink.
[    9.406601] xt_time: kernel timezone is -0000
[    9.640810] PPP generic driver version 2.4.2
[    9.667108] NET: Registered protocol family 24
[    9.898674] ieee80211 phy0: Atheros AR9531 Rev:2 mem=0xb8100000, irq=47
[   10.004059] kmodloader: done loading kernel modules from /etc/modules.d/*
[   11.404961] urandom_read: 5 callbacks suppressed
[   11.404971] random: jshn: uninitialized urandom read (4 bytes read)
[   11.485861] random: jshn: uninitialized urandom read (4 bytes read)
[   25.914566] br-lan: port 1(eth1.1) entered blocking state
[   25.920235] br-lan: port 1(eth1.1) entered disabled state
[   25.926224] device eth1.1 entered promiscuous mode
[   25.931175] device eth1 entered promiscuous mode
[   28.178858] eth0: link up (100Mbps/Full duplex)

I've installed the ath10k kmod and QCA9888 firmware on menu config. I've also tried with the ct versions and got the same results. Should I look into the PCI first?

1 Like

definitely

adding the ath79_register_pci() and the pci.h on the match file did the trick

I'll check some led definitions and start to work with the DTS port for this device. I've some ar71xx devices that I would like to port myself. This could be a nice starting point.

new bootlog messages

[    9.836017] ath10k_pci 0000:00:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0                                                                                                                                                                                                                         
[   10.029144] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/pre-cal-pci-0000:00:00.0.bin failed with error -2                                                                                                                                                                                              
[   10.040250] ath10k_pci 0000:00:00.0: Falling back to user helper                                                                                                                                                                                                                                                    
[   10.326154] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/firmware-6.bin failed with error -2                                                                                                                                                                                              
[   10.337291] ath10k_pci 0000:00:00.0: Falling back to user helper                                                                                                                                                                                                                                                    
[   10.454140] firmware ath10k!QCA9888!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed                                                                                                                                                                                                                  
[   11.044582] ath10k_pci 0000:00:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000                                                                                                                                                                                                               
[   11.054170] ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1                                                                                                                                                                                                                           
[   11.077558] ath10k_pci 0000:00:00.0: firmware ver 10.4-3.5.1-00014 api 5 features no-p2p,mfp,peer-flow-ctrl,allows-mesh-bcast crc32 983b7b7a                                                                                                                                                                        
[   11.389967] ath10k_pci 0000:00:00.0: Direct firmware load for ath10k/QCA9888/hw2.0/board-2.bin failed with error -2                                                                                                                                                                                                 
[   11.400796] ath10k_pci 0000:00:00.0: Falling back to user helper                                                                                                                                                                                                                                                    
[   11.487673] firmware ath10k!QCA9888!hw2.0!board-2.bin: firmware_loading_store: map pages failed                                                                                                                                                                                                                     
[   11.497577] ath10k_pci 0000:00:00.0: board_file api 1 bmi_id 0:24 crc32 6c80cb23                                                                                                                                                                                                                                    
[   13.671794] ath10k_pci 0000:00:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 512 raw 0 hwcrypto 1                                                                                                                                                                                                    
[   13.984062] ieee80211 phy1: Atheros AR9531 Rev:2 mem=0xb8100000, irq=47                                                                                                                                                                                                                                             
[   14.095261] kmodloader: done loading kernel modules from /etc/modules.d/*  

Another brief update I've made a fork from master and started to work on the port fir ath79 target. If you interested in this device you can check my commits at my fork.

I'm open to more feedback on how to proceed, also thank's for the earlier feeback it help me quite a lot at the beginning.

current bootlog indicates I've messup the partition definitions I'm looking into this before proceeding.

Some notes on your ath79 port:

Firstly:
As you define linux,default-trigger = "xxx" in dts, drop ucidef_set_led_netdev ... from the file 01_leds.
The definition in the dts deprecates the 01_leds handling.

Secondly:
poll_interval in gpio-keys is not used as this was only for the compatible type gpio-keys-polled.
So drop this also...

Thirdly:
In your flash definition drop kernel and rootfs and replace it with only firmware...
The splitting in kernel and rootfs should be handled by the firmware splitter...
Check other commits or devices for examples.

Lastly:
There are many style issues and probably other stuff that i've overseen on first sight, but keep your work going and good luck to fix up everything.
Feel free to ask for help.

Appreciate the feedback, I've added most of the suggestions already.

After testing the device boots properly and both radios are able provide ssids. The mac address on the 5GHz is 12:34:56:78:90 although I've used the same ath10k cal_data from my ar71xx target. After checking the backup on my art partition I can see that I didn't overwrite anything I shouldn't.

Are there any good readings or books I could read to improve on my own? A better theoretical background could probably help me in my current, and future, ports.

root@OpenWrt:~# hexdump art.bin
0000000 40a5 ef33 dcf8 40a5 ef33 dcfa ffff ffff
0000010 ffff ffff ffff ffff ffff ffff ffff ffff
*
0000100 3130 3138 3138 3031 3235 3033 4130 3030
0000110 3338 3500 ffff ffff ffff ffff ffff ffff
0000120 ffff ffff ffff ffff ffff ffff ffff ffff
*
0000200 3132 3334 3536 3738 00ff ffff ffff ffff
0000210 ffff ffff ffff ffff ffff ffff ffff ffff
*
0000300 925c 8ef5 ffff ffff ffff ffff ffff ffff
0000310 ffff ffff ffff ffff ffff ffff ffff ffff
*
0001000 0202 40a5 ef33 dcf9 0000 0000 0000 0000
0001010 0000 0000 0000 0000 0000 0000 0000 1f00
0001020 3302 0000 0000 0400 3000 4d04 0300 08ff
0001030 1100 0000 0010 0110 0022 2202 0050 0150
0001040 0150 0100 0000 0000 0014 0064 7da4 af00
0001050 ff00 0000 0000 0000 0000 0000 0000 000e
0001060 0e0e 0300 2ce2 0002 0e1c 80c0 800c 80c0
0001070 8000 0000 0000 0000 0000 0000 0000 0000
0001080 0000 0000 0000 0000 0000 7089 a2f7 009d
0001090 0000 00f9 009b 0000 00fa 0098 0000 00f4
00010a0 0098 0000 00f6 0097 0000 00f7 0095 0000
00010b0 0000 0000 0000 0000 0000 0000 0000 0000
00010c0 0000 0070 a270 89a2 7089 a270 89a2 2626
00010d0 2626 2626 2626 2020 201c 2020 201c 2020
00010e0 201c 2020 201c 1c1a 201c 1c1c 2020 1c14
00010f0 2020 201c 1c1a 201c 1c1c 2020 1c14 2020
0001100 201c 1c1a 201c 1c1c 2020 1c14 2020 201c
0001110 1c1a 201c 1c1c 2020 1c14 2020 201c 1c1a
0001120 201c 1c1c 2020 1c14 2020 201c 1c1a 201c
0001130 1c1c 2020 1c14 1112 1517 4142 4547 3132
0001140 3537 7075 9da2 7075 a2ff 7075 a2ff 7a7f
0001150 9398 7075 acb8 7075 ac00 7075 ac00 7a7f
0001160 93a2 7075 ac00 7075 ac00 7075 ac00 7a7f
root@OpenWrt:~# iw dev
phy#1
        Interface wlan1
                ifindex 8
                wdev 0x100000003
                addr 40:a5:ef:33:dc:f9
                ssid OpenWrt
                type AP
                channel 11 (2462 MHz), width: 20 MHz, center1: 2462 MHz
                txpower 22.00 dBm
                multicast TXQ:
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets
                        0       0       0       0       0       0       0       0               0
phy#0
        Interface wlan0
                ifindex 9
                wdev 0x3
                addr 12:34:56:78:90:12
                ssid OpenWrt
                type AP
                channel 36 (5180 MHz), width: 80 MHz, center1: 5210 MHz
                txpower 23.00 dBm
                multicast TXQ:                                                                                    
                        qsz-byt qsz-pkt flows   drops   marks   overlmt hashcol tx-bytes        tx-packets        
                        0       0       0       0       0       0       0       0               0                 
root@OpenWrt:~# 

root@OpenWrt:~# dmesg                                                                                             
[    0.000000] Linux version 4.19.71 (joao@joao-Elcomasv-01) (gcc version 7.4.0 (OpenWrt GCC 7.4.0 r10992-9021f989
[    0.000000] bootconsole [early0] enabled                                                                       
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)                                                             
[    0.000000] MIPS: machine is COMFAST CF-WR752AC                                                                
[    0.000000] SoC: Qualcomm Atheros QCA9533 ver 2 rev 0                                                          
[    0.000000] Determined physical RAM map:                                                                       
[    0.000000]  memory: 08000000 @ 00000000 (usable)                                                              
[    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-0x0000000007ffffff]                                             
[    0.000000] Movable zone start for each node                                                                   
[    0.000000] Early memory node ranges                                                                           
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]                                            
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]                                   
[    0.000000] On node 0 totalpages: 32768                                                                        
[    0.000000]   Normal zone: 288 pages used for memmap                                                           
[    0.000000]   Normal zone: 0 pages reserved                                                                    
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7                                                           
[    0.000000] random: get_random_bytes called from start_kernel+0x98/0x4a8 with crng_init=0                      
[    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: 32480                                       
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2                                
[    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] Writing ErrCtl register=00000000                                                                   
[    0.000000] Readback ErrCtl register=00000000                                                                  
[    0.000000] Memory: 122496K/131072K available (4271K kernel code, 173K rwdata, 1008K rodata, 1196K init, 207K )
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1                                         
[    0.000000] NR_IRQS: 51                                                                                        
[    0.000000] CPU clock: 650.000 MHz                                                                             
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5880801374 ns             
[    0.000010] sched_clock: 32 bits at 325MHz, resolution 3ns, wraps every 6607641598ns                           
[    0.008268] Calibrating delay loop... 432.53 BogoMIPS (lpj=2162688)                                            
[    0.074882] pid_max: default: 32768 minimum: 301                                                               
[    0.080022] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)                                        
[    0.086996] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)                                   
[    0.099875] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns   
[    0.110329] futex hash table entries: 256 (order: -1, 3072 bytes)                                              
[    0.116949] pinctrl core: initialized pinctrl subsystem                                                        
[    0.123713] NET: Registered protocol family 16                                                                 
[    0.136676] PCI host bridge /ahb/pcie-controller@180c0000 ranges:                                              
[    0.143204]  MEM 0x0000000010000000..0x0000000013ffffff                                                        
[    0.148708]   IO 0x0000000000000000..0x0000000000000000                                                        
[    0.180643] PCI host bridge to bus 0000:00                                                                     
[    0.185079] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]                                     
[    0.192322] pci_bus 0000:00: root bus resource [io  0x0000]                                                    
[    0.198208] pci_bus 0000:00: root bus resource [??? 0x00000000 flags 0x0]                                      
[    0.205363] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]                         
[    0.213772] pci 0000:00:00.0: [168c:0056] type 00 class 0x028000                                               
[    0.213842] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x001fffff 64bit]                                      
[    0.213980] pci 0000:00:00.0: PME# supported from D0 D3hot                                                     
[    0.215038] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00                                        
[    0.215072] pci 0000:00:00.0: BAR 0: assigned [mem 0x10000000-0x101fffff 64bit]                                
[    0.227399] clocksource: Switched to clocksource MIPS                                                          
[    0.234272] NET: Registered protocol family 2                                                                  
[    0.239900] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)                            
[    0.248153] TCP established hash table entries: 1024 (order: 0, 4096 bytes)                                    
[    0.255515] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)                                           
[    0.262255] TCP: Hash tables configured (established 1024 bind 1024)                                           
[    0.269177] UDP hash table entries: 256 (order: 0, 4096 bytes)                                                 
[    0.275365] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)                                            
[    0.282547] NET: Registered protocol family 1                                                                  
[    0.287206] PCI: CLS 0 bytes, default 32                                                                       
[    0.291502] Crashlog allocated RAM at address 0x3f00000                                                        
[    0.299291] workingset: timestamp_bits=14 max_order=15 bucket_order=1                                          
[    0.314074] squashfs: version 4.0 (2009/01/31) Phillip Lougher                                                 
[    0.320302] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.    
[    0.348312] io scheduler noop registered                                                                       
[    0.352456] io scheduler deadline registered (default)                                                         
[    0.360417] pinctrl-single 1804002c.pinmux: 576 pins, size 72                                                  
[    0.367753] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled                                           
[    0.375283] console [ttyS0] disabled                                                                           
[    0.379190] 18020000.uart: ttyS0 at MMIO 0x18020000 (irq = 9, base_baud = 1562500) is a 16550A                 
[    0.388328] console [ttyS0] enabled                                                                            
[    0.395875] bootconsole [early0] disabled                                                                      
[    0.422977] m25p80 spi0.0: w25q128 (16384 Kbytes)                                                              
[    0.427944] 5 fixed-partitions partitions found on MTD device spi0.0                                           
[    0.434501] Creating 5 MTD partitions on "spi0.0":                                                             
[    0.439509] 0x000000000000-0x000000010000 : "u-boot"                                                           
[    0.445648] 0x000000010000-0x000000020000 : "art"                                                              
[    0.451611] 0x000000020000-0x000000fe0000 : "firmware"                                                         
[    0.461186] 2 uimage-fw partitions found on MTD device firmware                                                
[    0.467317] Creating 2 MTD partitions on "firmware":                                                           
[    0.472534] 0x000000000000-0x0000001c0000 : "kernel"                                                           
[    0.478633] 0x0000001c0000-0x000000fc0000 : "rootfs"                                                           
[    0.484590] mtd: device 4 (rootfs) set to be root filesystem                                                   
[    0.492630] 1 squashfs-split partitions found on MTD device rootfs                                             
[    0.499122] 0x000000590000-0x000000fc0000 : "rootfs_data"                                                      
[    0.505724] 0x000000fe0000-0x000000ff0000 : "configs"                                                          
[    0.511982] 0x000000ff0000-0x000001000000 : "nvram"                                                            
[    0.519397] libphy: Fixed MDIO Bus: probed                                                                     
[    0.878489] ag71xx 19000000.eth: Could not find valid phy node                                                 
[    0.884863] ag71xx 1a000000.eth: invalid MAC address, using random address                                     
[    1.567870] libphy: ag71xx_mdio: probed                                                                        
[    1.573334] libphy: ar8xxx-mdio: probed                                                                        
[    1.586863] switch0: Atheros AR8229 rev. 1 switch registered on mdio-bus.0                                     
[    1.639299] ag71xx 1a000000.eth: connected to PHY at fixed-0:00 [uid=00000000, driver=Generic PHY]             
[    1.649433] eth0: Atheros AG71xx at 0xba000000, irq 5, mode: gmii                                              
[    1.657979] NET: Registered protocol family 10                                                                 
[    1.668717] Segment Routing with IPv6                                                                          
[    1.672635] NET: Registered protocol family 17                                                                 
[    1.677311] 8021q: 802.1Q VLAN Support v1.8                                                                    
[    1.695488] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.                                   
[    1.712687] Freeing unused kernel memory: 1196K                                                                
[    1.717368] This architecture does not have kernel memory protection.                                          
[    1.724061] Run /sbin/init as init process                                                                     
[    2.547462] random: fast init done                                                                             
[    2.867885] init: Console is alive                                                                             
[    2.871731] init: - watchdog -                                                                                 
[    4.565687] kmodloader: loading kernel modules from /etc/modules-boot.d/*                                      
[    4.616152] kmodloader: done loading kernel modules from /etc/modules-boot.d/*                                 
[    4.634308] init: - preinit -                                                                                  
[    5.683811] random: jshn: uninitialized urandom read (4 bytes read)                                            
[    5.818106] random: jshn: uninitialized urandom read (4 bytes read)                                            
[    5.872813] random: jshn: uninitialized urandom read (4 bytes read)                                            
[    9.321545] mount_root: jffs2 not ready yet, using temporary tmpfs overlay                                     
[    9.359541] urandom-seed: Seed file not found (/etc/urandom.seed)                                              
[    9.522335] procd: - early -                                                                                   
[    9.525467] procd: - watchdog -                                                                                
[   10.160541] procd: - watchdog -                                                                                
[   10.164200] procd: - ubus -                                                                                    
[   10.239717] urandom_read: 4 callbacks suppressed                                                               
[   10.239728] random: ubusd: uninitialized urandom read (4 bytes read)                                           
[   10.291330] random: ubusd: uninitialized urandom read (4 bytes read)                                           
[   10.298572] random: ubusd: uninitialized urandom read (4 bytes read)                                           
[   10.306313] procd: - init -                                                                                    
[   11.026103] kmodloader: loading kernel modules from /etc/modules.d/*                                           
[   11.157705] Loading modules backported from Linux version v5.3-rc4-0-gd45331b00ddb                             
[   11.165536] Backport generated by backports.git v5.3-rc4-1-0-g4ec72687                                         
[   11.185247] urngd: v1.0.0 started.                                                                             
[   11.248586] xt_time: kernel timezone is -0000                                                                  
[   11.423085] PPP generic driver version 2.4.2                                                                   
[   11.438765] NET: Registered protocol family 24                                                                 
[   11.532248] ath10k 4.19 driver, optimized for CT firmware, probing pci device: 0x56.                           
[   11.558626] ath10k_pci 0000:00:00.0: enabling device (0000 -> 0002)                                            
[   11.565422] ath10k_pci 0000:00:00.0: pci irq legacy oper_irq_mode 1 irq_mode 0 reset_mode 0                    
[   11.580563] random: crng init done                                                                             
[   12.018118] firmware ath10k!fwcfg-pci-0000:00:00.0.txt: firmware_loading_store: map pages failed               
[   12.495513] firmware ath10k!QCA9888!hw2.0!ct-firmware-5.bin: firmware_loading_store: map pages failed          
[   12.736844] firmware ath10k!QCA9888!hw2.0!ct-firmware-2.bin: firmware_loading_store: map pages failed          
[   12.981468] firmware ath10k!QCA9888!hw2.0!firmware-6.bin: firmware_loading_store: map pages failed             
[   13.941083] ath10k_pci 0000:00:00.0: qca9888 hw2.0 target 0x01000000 chip_id 0x00000000 sub 0000:0000          
[   13.950684] ath10k_pci 0000:00:00.0: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 0                      
[   13.974452] ath10k_pci 0000:00:00.0: firmware ver 10.4b-ct-9888-fW-012-c7b0f3f9 api 5 features mfp,peer-flow-c5
[   14.314196] ath10k_pci 0000:00:00.0: board_file api 2 bmi_id 0:24 crc32 f228337a                               
[   16.362365] ath10k_pci 0000:00:00.0: 10.4 wmi init: vdevs: 16  peers: 48  tid: 96                              
[   16.370177] ath10k_pci 0000:00:00.0: msdu-desc: 2500  skid: 32                                                 
[   16.421522] ath10k_pci 0000:00:00.0: wmi print 'P 48/48 V 16 K 144 PH 176 T 186  msdu-desc: 2500  sw-crypt: 0 '
[   16.432871] ath10k_pci 0000:00:00.0: wmi print 'free: 117872 iram: 22772 sram: 26020'                          
[   16.648249] ath10k_pci 0000:00:00.0: htt-ver 2.2 wmi-op 6 htt-op 4 cal pre-cal-file max-sta 32 raw 0 hwcrypto 1
[   16.761680] ath: EEPROM regdomain: 0x0                                                                         
[   16.761691] ath: EEPROM indicates default country code should be used                                          
[   16.761694] ath: doing EEPROM country->regdmn map search                                                       
[   16.761710] ath: country maps to regdmn code: 0x3a                                                             
[   16.761717] ath: Country alpha2 being used: US                                                                 
[   16.761720] ath: Regpair used: 0x3a                                                                            
[   16.942603] ath: EEPROM regdomain: 0x0                                                                         
[   16.942616] ath: EEPROM indicates default country code should be used                                          
[   16.942620] ath: doing EEPROM country->regdmn map search                                                       
[   16.942638] ath: country maps to regdmn code: 0x3a                                                             
[   16.942644] ath: Country alpha2 being used: US                                                                 
[   16.942647] ath: Regpair used: 0x3a                                                                            
[   16.957662] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'                                      
[   16.959711] ieee80211 phy1: Atheros AR9531 Rev:2 mem=0xb8100000, irq=13                                        
[   16.970609] kmodloader: done loading kernel modules from /etc/modules.d/*                                      
[   45.796228] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready                                                 
[   46.828654] eth0: link up (1000Mbps/Full duplex)                                                               
[   46.833480] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready                                            
[   59.155722] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0                                     
[   59.169941] jffs2_build_filesystem(): unlocking the mtd device...                                              
[   59.170037] done.                                                                                              
[   59.178509] jffs2_build_filesystem(): erasing all blocks after the end marker...                               
[   96.203650] done.                                                                                              
[   96.213455] jffs2: notice: (1427) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum .
[   96.601064] overlayfs: upper fs does not support tmpfile.

Here are another suggestions...

Your firmware node should look like:

partition@20000 {
	label = "firmware";
	reg = <0x20000 0xfc0000>;
	compatible = "denx,uimage"; 
};

If you can not find your real mac in your flash, you can send me a pm with your real mac on your device label and a dump of your flash partitions...
Use this scripts for doing a full backup: https://openwrt.org/docs/guide-user/installation/generic.backup#create_full_mtd_backup

Congratulations regarding the progress you have made so far!

2 Likes

Will definitely make a pull request once the 5GHz radio has the correct mac address. Just not really sure how to fix it.

The hardware specs of the CF-WR752AC are currently not listed at wikidevi. Would be nice if you could create a page at wikidevi for this device (you will need the hardware info anyways for the PR, see below).

I've created the wikidevi page. I'll try to improve it though.

Cheers

1 Like

I've added this one on my last commit

Your firmware node should look like:

partition@20000 {
	label = "firmware";
	reg = <0x20000 0xfc0000>;
	compatible = "denx,uimage"; 
};

I've sent you the MTD backups I made. Let me know if you need more information.

Hey lads once again thanks with the help for porting this device for openwrt.
I have made the Pull request, it probably needs some changing as the leds are not fully operational (only got the blue one working).

Will probably continue the discussion on github from now on.

Cheers