Adding OpenWrt support for Xiaomi AX3600 (Part 1)

No, please use download links in my original post with installation instructions:

1 Like

Thanks for sharing!

BTW: Do you have a clue what I could do to recover my router (see above)?

Please follow all steps in instruction (be sure cable is connected directly to 1st lan port and firmware is stock ax3600):

1 Like

Thank you @dimfish !

I had tried the instruction already - but without success.

It says "hold down the Reset button and power on the router then release it after 8 sec and wait for the router to flash the firmware."

Are the 8 seconds correct, or do I have to wait until the system LED starts flashing quickly?

On my router the system LED flashes quickly only for a couple of seconds and then turns to steady orange again.

I have followed all the steps. I have set the IP address to static 192.168.31.100 and referred to the original Xiaomi R6000 firmware.

When I reach this window ...

grafik

... then I am pressing the reset button for approximately 8 seconds until the system LED is flashing quickly.

After a couple of seconds the flashing stops and the LED is steady orange.

But nothing happens on the screen.

When I press the button on the lower right corner the MiWiFiRepairTool just closes.

Any clue what I could have done wrong?

There is special thread

Thanks!
I had read through it and had also tried TFTP with renamed binary-files.
But also that did not work.

EXCELLENT NEWS!!!

My router is working fine again!

The problem was that I did not deactivate the firewall :smile:

I am still laughing about this :smile:

And thank you very much for helping me patiently!

Now it is time for my router to test your latest build.

Hi all. I had compiled my owm firmware for redmi ax6 using @bitthief 's repo. And I also made some tweaks to get NSS things build and boot without error. and it works about 2 days without error.
But how can I figure out that the NSS core is working.
bootlog:

root@OpenWrt:/# dmesg 
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 5.15.79 (jackie@debian) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 12.2.0 r21296-284d446373) 12.2.0, GNU ld (GNU Binutils) 2.39) #0 SMP PREEMPT Fri Nov 18 15:46:40 2022
[    0.000000] Machine model: Redmi AX6
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000040ffffff]
[    0.000000]   node   0: [mem 0x0000000041000000-0x000000004a3fffff]
[    0.000000]   node   0: [mem 0x000000004a400000-0x000000004a4fffff]
[    0.000000]   node   0: [mem 0x000000004a500000-0x000000004a5fffff]
[    0.000000]   node   0: [mem 0x000000004a600000-0x000000004e8fffff]
[    0.000000]   node   0: [mem 0x000000004e900000-0x000000005fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000005fffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] psci: OSI mode supported.
[    0.000000] percpu: Embedded 17 pages/cpu s31768 r8192 d29672 u69632
[    0.000000] pcpu-alloc: s31768 r8192 d29672 u69632 alloc=17*4096
[    0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129024
[    0.000000] Kernel command line: console=ttyMSM0,115200n8 ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait root=/dev/ubiblock0_1
[    0.000000] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 415488K/524288K available (7616K kernel code, 888K rwdata, 2244K rodata, 1152K init, 318K bss, 108800K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] 	Trampoline variant of Tasks RCU enabled.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv2m: range[mem 0x0b00a000-0x0b00affc], SPI[448:479]
[    0.000000] arch_timer: cp15 and mmio timer(s) running at 19.20MHz (virt/virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000000] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000117] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=19200)
[    0.000135] pid_max: default: 32768 minimum: 301
[    0.000289] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.000306] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes, linear)
[    0.002087] rcu: Hierarchical SRCU implementation.
[    0.002268] dyndbg: Ignore empty _ddebug table in a CONFIG_DYNAMIC_DEBUG_CORE build
[    0.002794] smp: Bringing up secondary CPUs ...
[    0.003443] Detected VIPT I-cache on CPU1
[    0.003510] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.004151] Detected VIPT I-cache on CPU2
[    0.004194] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.004800] Detected VIPT I-cache on CPU3
[    0.004838] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.004908] smp: Brought up 1 node, 4 CPUs
[    0.004935] SMP: Total of 4 processors activated.
[    0.004944] CPU features: detected: 32-bit EL0 Support
[    0.004951] CPU features: detected: CRC32 instructions
[    0.005002] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.005190] CPU: All CPU(s) started at EL1
[    0.005214] alternatives: patching kernel code
[    0.012905] KASLR disabled due to lack of seed
[    0.013045] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    0.013068] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.013229] pinctrl core: initialized pinctrl subsystem
[    0.014346] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.014828] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.014870] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.014912] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.015247] thermal_sys: Registered thermal governor 'step_wise'
[    0.016685] cpuidle: using governor menu
[    0.016900] ASID allocator initialised with 65536 entries
[    0.078803] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    0.090201] cryptd: max_cpu_qlen set to 1000
[    0.093890] CPUidle PSCI: failed to enable OSI mode: -95
[    0.094117] qcom_scm: convention: smc arm 64
[    0.095528] clocksource: Switched to clocksource arch_sys_counter
[    0.096216] NET: Registered PF_INET protocol family
[    0.096384] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.097022] tcp_listen_portaddr_hash hash table entries: 256 (order: 0, 4096 bytes, linear)
[    0.097079] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.097096] TCP established hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.097148] TCP bind hash table entries: 4096 (order: 4, 65536 bytes, linear)
[    0.097229] TCP: Hash tables configured (established 4096 bind 4096)
[    0.097313] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.097342] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    0.097506] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.097941] RPC: Registered named UNIX socket transport module.
[    0.097951] RPC: Registered udp transport module.
[    0.097958] RPC: Registered tcp transport module.
[    0.097965] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.097976] PCI: CLS 0 bytes, default 64
[    0.104675] workingset: timestamp_bits=46 max_order=17 bucket_order=0
[    0.108454] zbud: loaded
[    0.108878] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.109399] NFS: Registering the id_resolver key type
[    0.109436] Key type id_resolver registered
[    0.109444] Key type id_legacy registered
[    0.109515] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.165107] Key type asymmetric registered
[    0.171186] bam-dma-engine 704000.dma-controller: num-channels unspecified in dt
[    0.171213] bam-dma-engine 704000.dma-controller: num-ees unspecified in dt
[    0.176615] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.177295] msm_serial 78b3000.serial: msm_serial: detected port #0
[    0.177339] msm_serial 78b3000.serial: uartclk = 3686400
[    0.177387] 78b3000.serial: ttyMSM0 at MMIO 0x78b3000 (irq = 22, base_baud = 230400) is a MSM
[    0.177420] msm_serial: console setup on port #0
[    0.819307] printk: console [ttyMSM0] enabled
[    0.824514] msm_serial: driver initialized
[    0.830190] nand: device found, Manufacturer ID: 0xc8, Chip ID: 0x61
[    0.832234] nand: ESMT PSR1GA30DT
[    0.838735] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.842643] spmi spmi-0: PMIC arbiter version v2 (0x20010000)
[    0.852543] s1: supplied by regulator-dummy
[    0.855409] s2: supplied by regulator-dummy
[    0.859392] vdd_s3: supplied by regulator-dummy
[    0.863729] vdd_s4: supplied by regulator-dummy
[    0.868214] s5: supplied by regulator-dummy
[    0.872634] l1: supplied by regulator-dummy
[    0.876758] l2: supplied by regulator-dummy
[    0.880926] l3: supplied by regulator-dummy
[    0.885100] l4: supplied by regulator-dummy
[    0.889254] l5: supplied by regulator-dummy
[    0.893420] l6: supplied by regulator-dummy
[    0.897628] l7: supplied by regulator-dummy
[    0.901756] l8: supplied by regulator-dummy
[    0.905935] l9: supplied by regulator-dummy
[    0.910226] l11: supplied by regulator-dummy
[    0.914259] l12: supplied by regulator-dummy
[    0.918772] l13: supplied by regulator-dummy
[    0.936910] i2c_dev: i2c /dev entries driver
[    0.944839] remoteproc remoteproc0: releasing cd00000.q6v5_wcss
[    0.946724] NET: Registered PF_INET6 protocol family
[    0.950495] Segment Routing with IPv6
[    0.954830] In-situ OAM (IOAM) with IPv6
[    0.958402] NET: Registered PF_PACKET protocol family
[    0.962405] Bridge firewalling registered
[    0.967568] 8021q: 802.1Q VLAN Support v1.8
[    0.971343] Key type dns_resolver registered
[    0.993106] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    0.993425] cpr4_ipq807x_apss_read_fuse_data: apc_corner: speed bin = 0
[    0.999249] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR fusing revision = 1
[    1.005865] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR misc fuse value = 0
[    1.013510] cpr4_ipq807x_apss_read_fuse_data: apc_corner: Voltage boost fuse config = 0 boost = disable
[    1.021045] cpr3_mem_acc_init: apc: not using memory accelerator regulator
[    1.030148] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      SVS: open-loop= 704000 uV
[    1.037093] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      NOM: open-loop= 808000 uV
[    1.047077] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused    TURBO: open-loop= 864000 uV
[    1.056884] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused   STURBO: open-loop= 944000 uV
[    1.066743] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      SVS: quot[ 7]= 706, quot_offset[ 7]=   0
[    1.076511] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      NOM: quot[ 7]= 908, quot_offset[ 7]= 200
[    1.087363] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused    TURBO: quot[ 7]=1005, quot_offset[ 7]=  95
[    1.098294] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused   STURBO: quot[ 7]=1156, quot_offset[ 7]= 150
[    1.109368] cpr3_regulator_init_ctrl: apc: Default CPR mode = closed-loop
[    1.111922] nand: device found, Manufacturer ID: 0xc8, Chip ID: 0x61
[    1.126942] nand: ESMT PSR1GA30DT
[    1.133345] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    1.136871] 14 qcomsmem partitions found on MTD device qcom_nand.0
[    1.144047] Creating 14 MTD partitions on "qcom_nand.0":
[    1.150194] 0x000000000000-0x000000100000 : "0:sbl1"
[    1.156997] 0x000000100000-0x000000200000 : "0:mibib"
[    1.161859] 0x000000200000-0x000000500000 : "0:qsee"
[    1.168806] 0x000000500000-0x000000580000 : "0:devcfg"
[    1.171373] 0x000000580000-0x000000600000 : "0:rpm"
[    1.176318] 0x000000600000-0x000000680000 : "0:cdt"
[    1.181090] 0x000000680000-0x000000700000 : "0:appsblenv"
[    1.185948] 0x000000700000-0x000000800000 : "0:appsbl"
[    1.191997] 0x000000800000-0x000000880000 : "0:art"
[    1.196574] 0x000000880000-0x000000900000 : "bdata"
[    1.201314] 0x000000900000-0x000000980000 : "crash"
[    1.206204] 0x000000980000-0x000000a00000 : "crash_syslog"
[    1.211044] 0x000000a00000-0x000007040000 : "rootfs"
[    1.316345] mtd: setting mtd12 (rootfs) as root device
[    1.316716] mtdsplit: no squashfs found in "rootfs"
[    1.320426] 0x000007040000-0x0000070c0000 : "rsvd0"
[    1.327041] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 19200 KHz, changing to: 1017600 KHz
[    1.331058] remoteproc remoteproc0: cd00000.q6v5_wcss is available
[    1.341437] ubi0: attaching mtd12
[    1.931904] ubi0: scanning is finished
[    1.939635] ubi0: attached mtd12 (name "rootfs", size 102 MiB)
[    1.939676] ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 126976 bytes
[    1.944380] ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 2048
[    1.951232] ubi0: VID header offset: 2048 (aligned 2048), data offset: 4096
[    1.958103] ubi0: good PEBs: 818, bad PEBs: 0, corrupted PEBs: 0
[    1.964861] ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128
[    1.971110] ubi0: max/mean erase counter: 4/2, WL threshold: 4096, image sequence number: 1668629774
[    1.978145] ubi0: available PEBs: 0, total reserved PEBs: 818, PEBs reserved for bad PEB handling: 20
[    1.987442] ubi0: background thread "ubi_bgt0d" started, PID 460
[    1.988290] block ubiblock0_1: created from ubi0:1(rootfs)
[    2.010708] VFS: Mounted root (squashfs filesystem) readonly on device 254:0.
[    2.011303] Freeing unused kernel memory: 1152K
[    2.026586] Run /sbin/init as init process
[    2.026605]   with arguments:
[    2.026607]     /sbin/init
[    2.026610]   with environment:
[    2.026612]     HOME=/
[    2.026615]     TERM=linux
[    2.149559] init: Console is alive
[    2.149722] init: - watchdog -
[    2.398553] random: crng init done
[    2.546991] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.696968] ssdk_switch_device_num_init[1335]:INFO:ess-switch dts node number: 1
[    2.697089] ssdk_dt_get_switch_node[1124]:INFO:ess-switch DT exist!
[    2.703457] ssdk_dt_parse_access_mode[999]:INFO:switch_access_mode: local bus
[    2.709440] ssdk_dt_parse_access_mode[1012]:INFO:switchreg_base_addr: 0x3a000000
[    2.716731] ssdk_dt_parse_access_mode[1013]:INFO:switchreg_size: 0x1000000
[    2.724225] ssdk_dt_parse_mac_mode[327]:INFO:mac mode = 0x0
[    2.730877] ssdk_dt_parse_mac_mode[336]:INFO:mac mode1 = 0xff
[    2.736345] ssdk_dt_parse_mac_mode[345]:INFO:mac mode2 = 0xff
[    2.742304] ssdk_dt_parse_uniphy[364]:INFO:ess-uniphy DT exist!
[    2.748156] ssdk_dt_parse_intf_mac[942]:INFO:dp2 MAC 28:d1:27:f5:a9:09
[    2.753750] ssdk_dt_parse_intf_mac[942]:INFO:dp3 MAC 9c:9d:7e:1c:08:e0
[    2.760353] ssdk_dt_parse_intf_mac[942]:INFO:dp4 MAC 9c:9d:7e:1c:08:e0
[    2.766857] ssdk_dt_parse_intf_mac[942]:INFO:dp5 MAC 9c:9d:7e:1c:08:e0
[    2.773380] ssdk_plat_init[1692]:INFO:ssdk_plat_init start
[    2.793616] ssdk_gcc_clock_init[1275]:INFO:SSDK gcc clock init successfully!
[    2.795009] malibu_phy_api_ops_init[2846]:INFO:qca probe malibu phy driver succeeded!
[    2.799903] hsl_phy_phydev_get[773]:ERROR:phy_addr 0 phydev is NULL
[    2.812620] regi_init[3953]:INFO:Initializing HPPE!!
[    3.023538] ssdk_ppe_reset_init[1535]:INFO:ppe reset successfully!
[    3.027147] qca_hppe_portctrl_hw_init[126]:INFO:Hawkeye PPE port initializing
[    3.028671] hsl_phy_phydev_get[773]:ERROR:phy_addr 0 phydev is NULL
[    3.035936] hsl_phy_phydev_get[773]:ERROR:phy_addr 0 phydev is NULL
[    3.257652] adpt_hppe_port_mux_mac_type_set[2787]:WARN:port 6 need not to configure mux and mac type
[    3.257716] ssdk_switch_register[2017]:INFO:Chip version 0x1500
[    3.265857] qca_link_polling_select[1487]:INFO:link-polling-required node does not exist
[    3.271492] ssdk_switch_register[2043]:INFO:polling is selected
[    3.279830] regi_init[3957]:INFO:Initializing HPPE Done!!
[    3.285555] ssdk_genl_init[211]:INFO:ssdk genl family register success.
[    3.291027] regi_init[4020]:INFO:qca-ssdk module init succeeded!
[    3.300119] EDMA ver 1 hw init
[    3.303912] EDMA HW Reset completed succesfully
[    3.306587] Num rings - TxDesc:1 (23-23) TxCmpl:1 (7-7)
[    3.310982] RxDesc:1 (15-15) RxFill:1 (7-7)
[    3.316809] Generic PHY 90000.mdio-1:01: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:01, irq=POLL)
[    3.321271] nss-dp 3a001200.dp2 eth0: Registered netdev eth0(qcom-id:2)
[    3.330406] Generic PHY 90000.mdio-1:02: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:02, irq=POLL)
[    3.337171] nss-dp 3a001400.dp3 eth1: Registered netdev eth1(qcom-id:3)
[    3.346539] Generic PHY 90000.mdio-1:03: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:03, irq=POLL)
[    3.353368] nss-dp 3a001600.dp4 eth2: Registered netdev eth2(qcom-id:4)
[    3.362722] Generic PHY 90000.mdio-1:04: attached PHY driver (mii_bus:phy_addr=90000.mdio-1:04, irq=POLL)
[    3.369563] nss-dp 3a001800.dp5 eth3: Registered netdev eth3(qcom-id:5)
[    3.378636] **********************************************************
[    3.384945] * NSS Data Plane driver
[    3.391533] **********************************************************
[    3.396733] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    3.402843] init: - preinit -
[    5.855690] nss-dp 3a001400.dp3 eth1: PHY Link up speed: 1000
[    5.855788] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[    5.873916] mount_root: loading kmods from internal overlay
[    5.884076] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[    5.884543] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[    5.974807] block: attempting to load /etc/config/fstab
[    5.980228] block: unable to load configuration (fstab: Entry not found)
[    5.980312] block: no usable configuration
[    5.987556] UBIFS (ubi0:2): Mounting in unauthenticated mode
[    5.989981] UBIFS (ubi0:2): background thread "ubifs_bgt0_2" started, PID 627
[    6.035127] UBIFS (ubi0:2): recovery needed
[    6.133789] UBIFS (ubi0:2): recovery completed
[    6.133909] UBIFS (ubi0:2): UBIFS: mounted UBI device 0, volume 2, name "rootfs_data"
[    6.137152] UBIFS (ubi0:2): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[    6.145202] UBIFS (ubi0:2): FS size: 76439552 bytes (72 MiB, 602 LEBs), max 612 LEBs, journal size 3809280 bytes (3 MiB, 30 LEBs)
[    6.154939] UBIFS (ubi0:2): reserved for root: 3610428 bytes (3525 KiB)
[    6.166569] UBIFS (ubi0:2): media format: w5/r0 (latest is w5/r0), UUID 7CDA5C66-4385-43DD-ACDF-4FE70A52A1EE, small LPT model
[    6.176760] mount_root: loading kmods from internal overlay
[    6.192269] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[    6.193658] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[    6.224253] block: attempting to load /etc/config/fstab
[    6.224363] block: unable to load configuration (fstab: Entry not found)
[    6.228484] block: no usable configuration
[    6.236606] mount_root: switching to ubifs overlay
[    6.246571] overlayfs: null uuid detected in lower fs '/', falling back to xino=off,index=off,nfs_export=off.
[    6.250006] urandom-seed: Seeding with /etc/urandom.seed
[    6.278685] nss-dp 3a001400.dp3 eth1: PHY Link is down
[    6.282484] procd: - early -
[    6.282801] procd: - watchdog -
[    6.807073] procd: - watchdog -
[    6.808734] procd: - ubus -
[    6.866134] procd: - init -
[    7.057307] kmodloader: loading kernel modules from /etc/modules.d/*
[    7.197898] nss_driver - fw of size 827556  bytes copied to load addr: 40000000, nss_id : 0
[    7.200240] Supported Frequencies - 
[    7.200254] 187.2 MHz 
[    7.205083] 748.8 MHz 
[    7.209049] 1.6896 GHz 
[    7.211060] 
[    7.215807] ffffffc000a3b3c0: set sdma ffffff80030c3d00
[    7.217590] ffffffc000a3b3c0: meminfo init succeed
[    7.256797] node size 2 # items 4
[    7.256837] memory: 40000000 536870912 (avl 440614912) items 4 active_cores 2
[    7.259131] addr/size storage words 2 2 # words 4 in DTS, ddr size 1000000
[    7.266237] ffffffc000a3b3c0: nss core 0 booted successfully
[    7.280574] nss_driver - fw of size 295040  bytes copied to load addr: 40800000, nss_id : 1
[    7.281435] Supported Frequencies - 
[    7.281440] 187.2 MHz 
[    7.287796] 748.8 MHz 
[    7.291562] 1.6896 GHz 
[    7.293727] 
[    7.298493] ffffffc000a42c00: set sdma ffffff8002336500
[    7.300235] ffffffc000a42c00: meminfo init succeed
[    7.305275] debugfs: Directory 'dynamic_if' with parent 'stats' already present!
[    7.309995] debugfs: File 'n2h' in directory 'strings' already present!
[    7.317525] debugfs: File 'drv' in directory 'strings' already present!
[    7.323873] debugfs: File 'c2c_tx' in directory 'strings' already present!
[    7.330459] debugfs: File 'c2c_rx' in directory 'strings' already present!
[    7.341736] node size 2 # items 4
[    7.344268] memory: 40000000 536870912 (avl 440614912) items 4 active_cores 2
[    7.347670] addr/size storage words 2 2 # words 4 in DTS, ddr size 1000000
[    7.354781] ffffffc000a42c00: nss core 1 booted successfully
[    7.383760] cryptodev: driver 1.12 loaded.
[    7.388610] PPP generic driver version 2.4.2
[    7.389493] NET: Registered PF_PPPOX protocol family
[    7.395282] <NSS-CRYPTO>:module loaded Build_ID - 11/18/22, 16:26:32 SoC=ipq807x_64
[    7.399397] Loading modules backported from Linux version v6.1-rc4-0-gf0c4d9fc9cc9
[    7.404367] Backport generated by backports.git v5.15.74-1-41-g5e5eac766e07
[    7.421147] PPP MPPE Compression module registered
[    7.422904] NET: Registered PF_QIPCRTR protocol family
[    7.434305] xt_time: kernel timezone is -0000
[    7.552598] ath11k c000000.wifi: ipq8074 hw2.0
[    7.552905] remoteproc remoteproc0: powering up cd00000.q6v5_wcss
[    7.556145] remoteproc remoteproc0: Booting fw image IPQ8074/q6_fw.mdt, size 668
[    8.474399] remoteproc remoteproc0: remote processor cd00000.q6v5_wcss is now up
[    8.476082] ath11k c000000.wifi: qmi ignore invalid mem req type 3
[    8.481499] ath11k c000000.wifi: chip_id 0x0 chip_family 0x0 board_id 0xff soc_id 0xffffffff
[    8.486899] ath11k c000000.wifi: fw_version 0x250a04a5 fw_build_timestamp 2021-12-20 07:09 fw_build_id WLAN.HK.2.5.0.1-01208-QCAHKSWPL_SILICONZ-1
[    8.497114] kmodloader: done loading kernel modules from /etc/modules.d/*
[    9.884069] xt_FULLCONENAT: RFC3489 Full Cone NAT module
[    9.884069] xt_FULLCONENAT: Copyright (C) 2018 Chion Tang <tech@chionlab.moe>
[   11.176193] br-lan: port 1(eth1) entered blocking state
[   11.176258] br-lan: port 1(eth1) entered disabled state
[   11.180947] device eth1 entered promiscuous mode
[   11.192898] br-lan: port 2(eth2) entered blocking state
[   11.192964] br-lan: port 2(eth2) entered disabled state
[   11.198248] device eth2 entered promiscuous mode
[   11.207199] br-lan: port 3(eth3) entered blocking state
[   11.207266] br-lan: port 3(eth3) entered disabled state
[   11.214791] device eth3 entered promiscuous mode
[   14.239702] nss-dp 3a001400.dp3 eth1: PHY Link up speed: 1000
[   14.239817] br-lan: port 1(eth1) entered blocking state
[   14.244460] br-lan: port 1(eth1) entered forwarding state
[   14.249778] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   20.597502] ECM init
[   20.597587] ECM database jhash random seed: 0xf244fa59
[   20.600036] ECM init complete
[   32.223590] l11: disabling

As it seems the drivers are loaded properly you could simply fire up iperf3. There are a lot of threads about the usage (what to test) and you should find some values for reference here within this thread also. You could also enable SQM and test before/after.

you should see a kernel message like this nss core 0 booted successfully followed by a similar one for the core 1.

as you have ECM enabled ...you should also see on /proc/interrupts nss_queues

i don't see the nss core booted on your kernel log

2 Likes
[    7.266237] ffffffc000a3b3c0: nss core 0 booted successfully
...
[    7.354781] ffffffc000a42c00: nss core 1 booted successfully
1 Like

Hi @dimfish

I have tested your build for some hours and it works fine and I like it.

The only weak point I see is the WiFi quality compared to stock.

I am using my router in repeater mode.

And when I configure the client and the access point on the same interface this leads to troubles after a while (throughput is very low ... and sometimes it even stops completely).

I am not sure if this is solely related to the WiFi drivers - or to the OpenWrt framework.

I have taken a look into your repository and see several branches (with comments of mine what I think they are):

ipq807x-5.15-pr --> Pull Request version (robimarko)
IPQ807x-5.10-backports --> Former version
ipq807x-5.15-ecm --> No clue
ipq807x-5.15-pr-increase --> With extended disk space and different partition layout
ipq807x-5.15-pr-regdb --> No clue
ipq807x-5.15 --> No clue

Could you please explain me what the differences are?

Is there any OpenWrt repository which uses the MiWiFi stock blobs?

lsmod | grep qca
bonding               118784  3 qca_nss_pppoe,qca_nss_bridge_mgr,qca_nss_vlan
ppp_generic            45056 10 ecm,ppp_mppe,ppp_async,qca_nss_pppoe,pppoe,pppox
pppoe                  28672  4 ecm,qca_nss_pppoe
qca_nss_bridge_mgr     20480  0 
qca_nss_crypto         40960  0 
qca_nss_dp             45056  1 qca_nss_drv
qca_nss_drv          1052672  5 ecm,qca_nss_crypto,qca_nss_pppoe,qca_nss_bridge_mgr,qca_nss_vlan
qca_nss_pppoe          16384  0 
qca_nss_vlan           24576  1 qca_nss_bridge_mgr
qca_ssdk             1724416  4 qca_nss_bridge_mgr,qca_nss_vlan,qca_nss_drv,qca_nss_dp

iperf:

------------------------------------------------------------
Server listening on TCP port 12345
TCP window size:  128 KByte (default)
------------------------------------------------------------
[  1] local 192.168.1.1 port 12345 connected with 192.168.1.172 port 41988
[ ID] Interval       Transfer     Bandwidth
[  1] 0.0000-1.0000 sec   111 MBytes   931 Mbits/sec
[  1] 1.0000-2.0000 sec   111 MBytes   934 Mbits/sec
[  1] 2.0000-3.0000 sec   111 MBytes   934 Mbits/sec
[  1] 3.0000-4.0000 sec   111 MBytes   934 Mbits/sec
[  1] 4.0000-5.0000 sec   111 MBytes   934 Mbits/sec
[  1] 5.0000-6.0000 sec   111 MBytes   934 Mbits/sec
[  1] 6.0000-7.0000 sec   111 MBytes   934 Mbits/sec
[  1] 7.0000-8.0000 sec   111 MBytes   934 Mbits/sec
[  1] 8.0000-9.0000 sec   111 MBytes   934 Mbits/sec
[  1] 9.0000-10.0000 sec   111 MBytes   934 Mbits/sec
[  1] 0.0000-10.0184 sec  1.09 GBytes   934 Mbits/sec
 cat /proc/interrupts | grep nss
 82:     163877          0          0          0     GIC-0 409 Edge      nss_empty_buf_sos
 83:    1301256          0          0          0     GIC-0 410 Edge      nss_empty_buf_queue
 84:          0          0          0          0     GIC-0 411 Edge      nss-tx-unblock
 85:    1908573          0          0          0     GIC-0 412 Edge      nss_queue0
 86:          0       7131          0          0     GIC-0 413 Edge      nss_queue1
 87:          0          0     154514          0     GIC-0 414 Edge      nss_queue2
 88:          0          0          0    1217048     GIC-0 415 Edge      nss_queue3
 89:          0          0          0          0     GIC-0 416 Edge      nss_coredump_complete
 90:          0          0          0          0     GIC-0 417 Edge      nss_paged_empty_buf_sos
 91:          0          0          0          0     GIC-0 418 Edge      nss_profile_dma
 92:      14354          0          0          0     GIC-0 422 Edge      nss_empty_buf_sos
 93:          0          0          0          0     GIC-0 423 Edge      nss_empty_buf_queue
 94:          0          0          0          0     GIC-0 424 Edge      nss-tx-unblock
 95:    1478621          0          0          0     GIC-0 425 Edge      nss_queue0
 96:          0          0          0          0     GIC-0 426 Edge      nss_queue1
 97:          0          0          0          0     GIC-0 427 Edge      nss_queue2
 98:          0          0          0          0     GIC-0 428 Edge      nss_queue3
 99:          0          0          0          0     GIC-0 429 Edge      nss_coredump_complete
100:          0          0          0          0     GIC-0 430 Edge      nss_paged_empty_buf_sos

cat /sys/ssdk/packet_counter
The output will display on serial console, can got it via dmesg.

cat /sys/ssdk/packet_counter

[ 1841.155887] PRX_DROP_CNT RX:                   
[ 1841.155939] PRX_DROP_PKT_STAT RX:              
[ 1841.159272] IPR_PKT_NUM RX:                    
[ 1841.163768] VLAN_CNT_TBL RX:                            104327(vsi=0001)              1(vsi=0003)              2(vsi=0004)
[ 1841.168296]                                            8385498(vsi=0007)
[ 1841.179396] PRE_L2_CNT_TBL RX:                          104323(vsi=0001)              1(vsi=0003)              2(vsi=0004)
[ 1841.186261]                                            8385497(vsi=0007)
[ 1841.197105] PRE_L2_CNT_TBL RX_DROP:            
[ 1841.203958] PORT_TX_DROP_CNT_TBL TX_DROP:      
[ 1841.208209] EG_VSI_COUNTER_TBL TX:             
[ 1841.212731] PORT_TX_COUNTER_TBL TX:            
[ 1841.217238] VP_TX_COUNTER_TBL TX:              
[ 1841.221749] QUEUE_TX_COUNTER_TBL TX:                   8484853(queue=0000)          47856(queue=0160)             92(queue=0162)
[ 1841.226313]                                                  6(queue=0164)             28(queue=0166)             17(queue=0167)
[ 1841.238100]                                            1315357(queue=0192)              2(queue=0194)            973(queue=0198)
[ 1841.249641]                                                 21(queue=0199)           2520(queue=0208)             21(queue=0215)
[ 1841.261189] VP_TX_DROP_CNT_TBL TX_DROP:        
[ 1841.272718] CPU_CODE_CNT_TBL:                  
[ 1841.276958]                                               1911(TCP flags VALUE/MASK group 0 exception redirect/copy to CPU),cpucode:47
[ 1841.281488]                                               1620(TCP flags VALUE/MASK group 1 exception redirect/copy to CPU),cpucode:48
[ 1841.293641]                                                472(TCP flags VALUE/MASK group 2 exception redirect/copy to CPU),cpucode:49
[ 1841.305706]                                                  4(PPPoE multicast redirect/copy to CPU),cpucode:92
[ 1841.317781]                                            8472526(L3 no route action redirect/copy to CPU),cpucode:162
[ 1841.327755]                                                106(L3 no route next hop invalid action redirect/copy to CPU),cpucode:163
[ 1841.338174] DROP_CPU_CNT_TBL:                  
[ 1841.350310]                                            1361915(port=0:None),dropcode:0
[ 1841.354569]                                             104332(port=2:None),dropcode:0
[ 1841.362560]                                            8385459(port=4:None),dropcode:0
[ 1841.370455]                                                 41(port=5:None),dropcode:0
[ 1841.378358]                                                  1(port=4:STG ingress filtering drop),dropcode:115

Ideally you want to bring iperf3 in connection with (h)top and not using the router as a iperf server.

Setup:

iperf server: wired pc connected to your router.
iperf client: either another wired pc or a wireless client connected to your router.
router: run htop to watch cpu usage. with nss in play there should be almost no cpu usage if offloading is working/enabled.

I do not have any reference. I just compared stock fw vs. openwrt in the past. But that was more then a year ago. Cannot even remember any values.

1 Like

Can you share your repo with those patches ?

https://github.com/bitthief/openwrt branch ipq807x-5.15-pr.

Thanks. But yes I know bitthief repo, just asked him for patches because I stuck at compile err :frowning:

out of curiosity can you tell me what /sys/kernel/debug/ecm/ecm_nss_ipv4/accelerated_count shows?

I did not upload it.

git status

On branch ipq807x-5.15-pr
Your branch is up to date with 'origin/ipq807x-5.15-pr'.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   feeds.conf.default (gitthub faster than openwrt.org)
	deleted:    package/kernel/qca-nss-dp/patches/0014-nss-dp-edma-v1-use-NAPI-GRO-by-default.patch
	deleted:    package/kernel/qca-ssdk/Makefile
	deleted:    package/kernel/qca-ssdk/files/qca-ssdk
	deleted:    package/kernel/qca-ssdk/patches/0001-SSDK-config-add-kernel-5.10.patch
	deleted:    package/kernel/qca-ssdk/patches/0002-SSDK-replace-ioremap_nocache-with-ioremap.patch
	deleted:    package/kernel/qca-ssdk/patches/0003-SSDK-platform-use-of_mdio_find_bus-to-get-MDIO-bus.patch
	deleted:    package/kernel/qca-ssdk/patches/0004-SSDK-dts-fix-of_get_mac_address.patch
	deleted:    package/kernel/qca-ssdk/patches/0005-SSDK-config-add-kernel-5.15.patch
	deleted:    package/kernel/qca-ssdk/patches/0006-qca8081-convert-to-5.11-IRQ-model.patch
	deleted:    package/kernel/qca-ssdk/patches/0007-qca807x-add-a-LED-quirk-for-Xiaomi-AX9000.patch
	deleted:    package/kernel/qca-ssdk/patches/0008-qca807x-add-a-LED-quirk-for-Xiaomi-AX3600.patch
	deleted:    package/kernel/qca-ssdk/patches/0009-include-fix-compilation-error-for-parse_uci_option.patch
	deleted:    package/kernel/qca-ssdk/patches/0010-QSDK-config-Avoid-Werror-heroics.patch
	deleted:    package/kernel/qca-ssdk/patches/0011-Revert-qca-ssdk-remove-bridge-fdb-entry-for-the-auth.patch
	modified:   package/network/config/firewall/patches/fullconenat.patch (another edition to make it work with luci, can be ignore.)
	modified:   package/network/utils/fullconenat/Makefile (same as above)
	deleted:    target/linux/generic/hack-5.15/402-mtd-blktrans-call-add-disks-after-mtd-device.patch  (remove warning about using ubifs. cause squashfs and ubifs does not need mtdbock.)
	modified:   target/linux/ipq807x/base-files/etc/init.d/bootcount (my AX6 has a custom u-boot with single rootfs)
	modified:   target/linux/ipq807x/base-files/lib/upgrade/platform.sh (same as above)
	modified:   target/linux/ipq807x/config-5.15
	modified:   target/linux/ipq807x/patches-5.15/905-5.15-netfilter-nf_conntrack_ecache-Fix-NSS-ECM-BRK-kernel-panic.patch 

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	package/GFW
	target/linux/generic/hack-5.15/952-add-net-conntrack-events-support-multiple-registrant.patch
	target/linux/generic/hack-5.15/953-net-patch-linux-kernel-to-support-shortcut-fe.patch ( there is a relationship with fullconenat,can be ignore.)
	target/linux/ipq807x/patches-5.15/0605-5.15-qca-add-add-nss-bridge-mgr-support.patch

952/953/0605patches are from coolsnowwolf's lede repo.

nss_packages diff

git diff
diff --git a/qca/qca-nss-drv/Makefile b/qca/qca-nss-drv/Makefile
index a0b979e..323c8f4 100644
--- a/qca/qca-nss-drv/Makefile
+++ b/qca/qca-nss-drv/Makefile
@@ -57,7 +57,7 @@ EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-gmac \
 
 ifneq (, $(findstring $(CONFIG_TARGET_BOARD), "ipq807x" "ipq60xx"))
 EXTRA_CFLAGS+= -DNSS_MEM_PROFILE_MEDIUM
-LOW_MEM_PROFILE_MAKE_OPTS=y
+#LOW_MEM_PROFILE_MAKE_OPTS=y
 endif
 
 ifeq ($(CONFIG_KERNEL_SKB_FIXED_SIZE_2K),y)
diff --git a/qca/qca-nss-ecm/files/qca-nss-ecm.init b/qca/qca-nss-ecm/files/qca-nss-ecm.init
index e893898..e3f4550 100644
--- a/qca/qca-nss-ecm/files/qca-nss-ecm.init
+++ b/qca/qca-nss-ecm/files/qca-nss-ecm.init
@@ -18,7 +18,7 @@
 # openwrt build scripts automatically enable this package starting
 # at boot.
 
-START=75
+START=99
 
 get_front_end_mode() {
        config_load "ecm"
@@ -107,4 +107,4 @@ stop() {
        fi

if apply 953-net-patch-linux-kernel-to-support-shortcut-fe.patch, must also apply following patch,
or your router will bootl loop.

--- a/target/linux/ipq807x/patches-5.15/905-5.15-netfilter-nf_conntrack_ecache-Fix-NSS-ECM-BRK-kernel-panic.patch
+++ b/target/linux/ipq807x/patches-5.15/905-5.15-netfilter-nf_conntrack_ecache-Fix-NSS-ECM-BRK-kernel-panic.patch
@@ -1,10 +1,13 @@
 --- a/net/netfilter/nf_conntrack_ecache.c
 +++ b/net/netfilter/nf_conntrack_ecache.c
-@@ -272,7 +272,6 @@ void nf_conntrack_register_notifier(stru
+--- nf_conntrack_ecache.c.orig 2022-11-18 13:02:23.115188967 +0800
++++ nf_conntrack_ecache.c      2022-11-18 13:08:37.234068240 +0800
+@@ -371,7 +371,7 @@ int nf_conntrack_register_notifier(struc
        mutex_lock(&nf_ct_ecache_mutex);
        notify = rcu_dereference_protected(net->ct.nf_conntrack_event_cb,
                                           lockdep_is_held(&nf_ct_ecache_mutex));
 -      WARN_ON_ONCE(notify);
-       rcu_assign_pointer(net->ct.nf_conntrack_event_cb, new);
-       mutex_unlock(&nf_ct_ecache_mutex);
- }
\ No newline at end of file
++//    WARN_ON_ONCE(notify);
+       if (notify != NULL) {
+               ret = -EBUSY;
+               goto out_unlock;
1 Like