Ipq806x NSS build (Netgear R7800 / TP-Link C2600 / Linksys EA8500)

Vanilla 23.05.0 build with NSS including all modules.

Builds for generic and chromium in bin folder.

Packages can be installed directly from this repo as long as:

  • etc.opkg.keys.4d45cfc5892d56b4 file in the build-fixes folder file needs to be copied to /etc/opkg/keys/4d45cfc5892d56b4
  • the etc.opkg.distfeeds.conf file also in the build-fixes folder file is to be copied to /etc/opkg/distfeeds.conf

after that opkg operations should install any package from the official repository and kmods from this repo. Of course packages can be manually installed without these changes.

Cursory testing shows it to work as expected. NSS is, well, NSSing.

Terminal Output
BusyBox v1.36.1 (2023-10-09 21:45:35 UTC) built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 23.05.0, r23497-6637af95aa
 -----------------------------------------------------
root@AP4:~# dmesg | grep NSS
[    6.140192] * Driver    :NSS GMAC Driver - RTL v(3.72a)
[    6.236185] (unnamed net_device) (uninitialized): nss_gmac_clk_ctl_dev_init: ctx->clk_ctl_base(0xde894000) + CLK_HALT_NSSFAB0_NSSFAB1_STATEA(0x3c20): 0x5b00
[    6.263645] (unnamed net_device) (uninitialized): nss_gmac_dev_init: nss_base(0xde880000) + NSS_GMACn_CTL(1)(0x34): 0x90c0c
[    6.276549] (unnamed net_device) (uninitialized): nss_gmac_dev_init: nss_base(0xde880000) + NSS_ETH_CLK_DIV0(0xc): 0x100
[    6.316813] ipq8064-mdio 37000000.mdio eth0: Initialized NSS GMAC1 interface eth0: (base = 0x37200000, irq = 38, PhyId = 4, PollLink = 0)
[    6.406411] (unnamed net_device) (uninitialized): nss_gmac_clk_ctl_dev_init: ctx->clk_ctl_base(0xde894000) + CLK_HALT_NSSFAB0_NSSFAB1_STATEA(0x3c20): 0x5b00
[    6.433841] (unnamed net_device) (uninitialized): nss_gmac_dev_init: nss_base(0xde880000) + NSS_GMACn_CTL(2)(0x38): 0x80c0c
[    6.446777] (unnamed net_device) (uninitialized): nss_gmac_dev_init: nss_base(0xde880000) + NSS_ETH_CLK_DIV0(0xc): 0x100
[    6.468740] (unnamed net_device) (uninitialized): nss_gmac_qsgmii_dev_init: NSS_QSGMII_CLK_CTL(0x2c) - 0x0
[    6.515076] ipq8064-mdio 37000000.mdio eth1: Initialized NSS GMAC2 interface eth1: (base = 0x37400000, irq = 39, PhyId = 0, PollLink = 0)
...
[    6.741018] nss_driver - fw of size 544712  bytes copied to load addr: 40000000, nss_id : 0
[    6.741702] nss_driver - Turbo Support 1
[    6.795032] bf071880: nss core 0 booted successfully
[    6.860605] nss_driver - fw of size 218860  bytes copied to load addr: 40800000, nss_id : 1
[    6.892607] bf075fc0: nss core 1 booted successfully
...
[ 2568.699670] Created a NSS virtual interface for dev [nssifb]
[ 2568.817336] Nexthop successfully set for [eth0] to [nssifb]
...

I am using it on an AP. AP bufferbloat on WiFi scores an A or a B on close proximity with throughput around 500MBits and CPU usage in 25%-50% range. Pretty much in line with previous builds.

CPU usage during test


YMMV as a router.

If there's interest I'll post the ImageBuilder to Mega.

BEWARE: traffic shaping doesn't seem to work -- but I think I know why
root@AP4:~# tc qdisc add dev nssifb root handle 1: nsstbl rate 500Mbit burst 1Mb
Unknown qdisc "nsstbl", hence option "rate" is unparsable

Seems I'm not alone but I have not found a fix.
IPQ807X NSS Build - #178 by zek-cmd
The qdisc module is loaded but nothing is using it, at least on my device (TP-Link C2600). Maybe on the Netgears it will work. If anyone is adventurous enough to try it please share the results.

Don't like -ct?

Connect via Ethernet (WiFi will die during this operation)

  1. Ensure software indexes are OK. opkg update
  2. Figure out which radio chip you have. opkg list-installed | grep ath10k-firmware
  3. Remove the -ct firmware installed. eg, opkg remove ath10k-firmware-qca99x0-ct
  4. Install non -ct firmware. eg, opkg install ath10k-firmware-qca99x0
  5. Remove the kernel module. opkg remove kmod-ath10k-ct
  6. Install non -ct kernel module. opkg install kmod-ath10k (smallbuffers an option)
  7. Reboot

ImageBuiler and howto

Generic ImageBuilder: https://mega.nz/file/Mz502DTA#sqMaBek3Owm4wqI9YwnSqLYsgv6hh964LUj_tJm4t40
Chromium InageBuilder: https://mega.nz/file/UyQRHbha#avURe9_Ejx-OjQSH4ZQFYlOI5kodVGzaLuhLwYQbY18

What to do with that?

  1. Download it
  2. Unarchive it (eg, tar -xvf <file.xz> and cd into it
  3. Get the etc.opkg.keys.4d45cfc5892d56b4 file in the build-fixes folder and store it in the keys directory as 4d45cfc5892d56b4
  4. Get the etc.opkg.distfeeds.conf file also in the build-fixes folder. Modify the repositories.conf file starting line 6 so that it uses those repo entries instead (do not delete the config lines after repo list, those stay). Should look like this:
## Place your custom repositories here, they must match the architecture and version.
# src/gz %n https://downloads.openwrt.org/releases/23.05.0-rc2
# src custom file:///usr/src/openwrt/bin/ipq806x/packages

## Remote package repositories
#src/gz openwrt_core https://downloads.openwrt.org/releases/23.05.0/targets/ipq806x/generic/packages
src/gz openwrt_nss https://github.com/APCCV/OpenWRT-23.05.0-NSS/raw/23.05.0-nss/bin/targets/ipq806x/generic/packages
src/gz openwrt_base https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a15_neon-vfpv4/base
src/gz openwrt_luci https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a15_neon-vfpv4/luci
#src/gz openwrt_nss https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a15_neon-vfpv4/nss
src/gz openwrt_packages https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a15_neon-vfpv4/packages
src/gz openwrt_routing https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a15_neon-vfpv4/routing
#src/gz openwrt_sqm_scripts_nss https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a15_neon-vfpv4/sqm_scripts_nss
src/gz openwrt_telephony https://downloads.openwrt.org/releases/23.05.0/packages/arm_cortex-a15_neon-vfpv4/telephony

## This is the local package repository, do not remove!
src imagebuilder file:packages

option check_signature
  1. make info will list the profiles available. Identify the one needed.
  2. make image will do what it says. Requires parameters and such. For example:
    PROFILE="tplink_c2600" PACKAGES="luci" make image
  3. In addition, make manifest will list the packages that will be included. Requires parameters too. Good for comparing with a running router after a opkg list-installed to make sure everything needed made it in. For example:
    PROFILE="tplink_c2600" PACKAGES="luci" make manifest
  4. Image will be in bin directory
  5. other files can be added... ImageBuilder documentation here: https://openwrt.org/docs/guide-user/additional-software/imagebuilder

How to Build (although honestly save yourself the pain and just use the repo and maybe the ImageBuilder)
  • git clone https://git.openwrt.org/openwrt/openwrt.git && cd openwrt

  • git checkout v23.05.0

  • git remote add other https://github.com/ACwifidude/openwrt.git

  • git fetch other

  • git cherry-pick 14a9e74463e59f97a469a4226e95e379833cb842

  • git cherry-pick db80ce5e1d6d58632431f5d18924dd982df16ed5

  • git cherry-pick ad0915613dc47d30c43a5aa1325237c9c2b37a0c

  • git cherry-pick 2aafd3e050287c374601d1c1e7bf8c3e5f1caabe

  • git cherry-pick d31598618aec1658ac7010b0a58a1b32839771eb

  • git cherry-pick 31f4c9bbfbe26a46e477f976acb75f2567c0df41

  • git cherry-pick 468f2939af7a6a75c57aac4d1920c5f7b985aaa5

  • git cherry-pick 004578b74db32319040fa048b846c6e1fb31a9a5

  • git cherry-pick bb6b7919f8e011d90270cae29fb52721a740a193

  • git cherry-pick 54960e199007b513d1b0159e803f06c64dd6d6c4

  • git cherry-pick 5837453cd19968a496542e46114ab54042da3ea2

  • git cherry-pick 361d02afba5a5ebfb3056f8b730a2b331a91ec4c

  • git cherry-pick f826c6f09035a94d92d34fb02212c2d49c6ac6c5

  • git cherry-pick 3092a9569fb9771e219bbeaa1488ad95e51a64ef

  • git cherry-pick 75a06e063ca94384741970da6b76504fd4b5ec90

  • git cherry-pick 32b108cc22496c80dbf0da49366bcc4d7882fde4

  • git cherry-pick 5008148c7ce9f253a8a8d4283311b125cedd4ee7

  • git cherry-pick cbcb45924e9599fb7ece4bf88fdc4d33557344c3

  • git cherry-pick 6fc098316410d2aaac9cb82f463f5914c5e46723
    NOTE: cherry pick commit sha2s might change once ACwifidude rebases

  • git branch 23.05.0-NSS

  • git checkout 23.05.0-NSS

  • git remote remove other

  • ./scripts/feeds update -a && ./scripts/feeds install -a

  • cp build-fixes/feeds.nss.qca-nss-clients.Makefile feeds/nss/qca-nss-clients/Makefile

  • cp build-fixes/feeds.nss.qca-nss-ecm.Makefile feeds/nss/qca-nss-ecm/Makefile

  • ./scripts/feeds install -a

  • cp config.nss .config

  • make defconfig

  • make menuconfig

  • make V=s -j9 (adjust CPU cores if different from 8)

3 Likes