IPQ807X NSS Build

Wouldn't it be better to just change the target from menuconfig?

Guys, I have the following warnings when building from the bitthief repository:

WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist                                                                                                                                         │  60091 www-data   20   0 59120  6712  4560 S  0.0  0.0  0:00.06 │  ├─ nginx: worker process
WARNING: Makefile 'package/utils/busybox/Makefile' has a dependency on 'libpam', which does not exist                                                                                                                                         │  60092 www-data   20   0 59120  6772  4624 S  0.0  0.0  0:00.02 │  ├─ nginx: worker process
WARNING: Makefile 'package/utils/busybox/Makefile' has a build dependency on 'libpam', which does not exist                                                                                                                                   │  60093 www-data   20   0 59120  3464  1488 S  0.0  0.0  0:00.00 │  ├─ nginx: worker process
WARNING: Makefile 'package/boot/kexec-tools/Makefile' has a dependency on 'liblzma', which does not exist                                                                                                                                     │  60094 www-data   20   0 59120  3464  1488 S  0.0  0.0  0:00.00 │  ├─ nginx: worker process
WARNING: Makefile 'package/network/services/lldpd/Makefile' has a dependency on 'libnetsnmp', which does not exist                                                                                                                            │  60095 www-data   20   0 59120  3468  1488 S  0.0  0.0  0:00.00 │  ├─ nginx: worker process
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist                                                                                                                                 │  60096 www-data   20   0 59120  3468  1488 S  0.0  0.0  0:00.00 │  └─ nginx: worker process
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a dependency on 'libpam', which does not exist                                                                                                                                 │  60156 pufferpan  20   0 1672M 68640 34064 S  0.0  0.1 10:20.03 ├─ /usr/sbin/pufferpanel run
WARNING: Makefile 'package/utils/policycoreutils/Makefile' has a build dependency on 'libpam', which does not exist                                                                                                                           │  60157 pufferpan  20   0 1672M 68640 34064 S  0.0  0.1  1:57.20 │  ├─ /usr/sbin/pufferpanel run
WARNING: Makefile 'package/kernel/qca-nss-crypto/Makefile' has a dependency on 'kmod-qca-nss-drv', which does not exist

Am I missing something?

EDIT: nevermind, I updated/installed the feeds again with -f and the warnings are gone but it is not compiling for QNAP 301W target:

ERROR: package/feeds/nss_packages/qca-nss-drv failed to build.

EDIT2: make -j1 V=s

make[4]: Entering directory '/home/alessandro/openwrt/bitthief/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/linux-5.15.106'
  CC [M]  /home/alessandro/openwrt/bitthief/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/qca-nss-drv-2023-01-20-87ab6000/nss_rps.o
/home/alessandro/openwrt/bitthief/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/qca-nss-drv-2023-01-20-87ab6000/nss_rps.c:289:24: error: 'nss_rps_ipv4_hash_bitmap_cfg' defined but not used [-Werror=unused-function]
  289 | static nss_tx_status_t nss_rps_ipv4_hash_bitmap_cfg(struct nss_ctx_instance *nss_ctx, int hash_bitmap)
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[5]: *** [scripts/Makefile.build:289: /home/alessandro/openwrt/bitthief/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/qca-nss-drv-2023-01-20-87ab6000/nss_rps.o] Error 1
make[4]: *** [Makefile:1912: /home/alessandro/openwrt/bitthief/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/qca-nss-drv-2023-01-20-87ab6000] Error 2
make[4]: Leaving directory '/home/alessandro/openwrt/bitthief/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/linux-5.15.106'
make[3]: *** [Makefile:278: /home/alessandro/openwrt/bitthief/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/qca-nss-drv-2023-01-20-87ab6000/.built] Error 2
make[3]: Leaving directory '/home/alessandro/openwrt/bitthief/feeds/nss_packages/qca/qca-nss-drv'
time: package/feeds/nss_packages/qca-nss-drv/compile#1.13#0.15#1.27
    ERROR: package/feeds/nss_packages/qca-nss-drv failed to build.
make[2]: *** [package/Makefile:116: package/feeds/nss_packages/qca-nss-drv/compile] Error 1
make[2]: Leaving directory '/home/alessandro/openwrt/bitthief'
make[1]: *** [package/Makefile:110: /home/alessandro/openwrt/bitthief/staging_dir/target-aarch64_cortex-a53_musl/stamp/.package_compile] Error 2
make[1]: Leaving directory '/home/alessandro/openwrt/bitthief'
make: *** [/home/alessandro/openwrt/bitthief/include/toplevel.mk:231: world] Error 2

Try this:

Any pre-made builds for Dynalink DL-WRX36?

1 Like

Ok, I fixed the build issue by disabling the "unused function warning as an error" GCC flag in the qca-nss-drv package:

diff --git a/qca/qca-nss-drv/Makefile b/qca/qca-nss-drv/Makefile
index 650f082..1e82b9c 100644
--- a/qca/qca-nss-drv/Makefile
+++ b/qca/qca-nss-drv/Makefile
@@ -117,7 +117,8 @@ endef
 EXTRA_CFLAGS+= -I$(STAGING_DIR)/usr/include/qca-nss-gmac \
                           -I$(STAGING_DIR)/usr/include/qca-nss-dp \
                           -I$(STAGING_DIR)/usr/include/qca-ssdk \
-                          -Wno-unused-variable
+                          -Wno-unused-variable \
+                          -Wno-error=unused-function

 ifneq (, $(findstring $(CONFIG_TARGET_BOARD), "ipq807x" "ipq60xx"))
 EXTRA_CFLAGS+= -DNSS_MEM_PROFILE_MEDIUM

Of course it would be better to toss the unused function from the source code but this was the quickest way...

@bitthief would you accept this as a PR on the nss-packages repository? I don't really think it's harmful to allow unused functions (although it's indicative of bad code quality).

1 Like

Sorry I don't have wrx36. You have to build by yourself, Here is my source code:

1 Like

don't trust just by changing the target you will get everything changed ... one needs to check the right device modules are selected and previous device are deselected.

and make sure you do a distclean ...

1 Like

not getting any of your issues this is a first and i don't think anyone has raised it before

This is a working configuration if you want to compile it for your Dynalink. (there are several other things included, like samba4, adblock, etc ..., remove them in case you don't want them.)

For the dynalink you have to to delete the following patches as otherwise the device will go into a boot loop as soon as you connect the lan-port.

files are located in "target/linux/ipq807x/patches-5.15"
0100-0-clk-qcom-common-add-qcom_find_freq_exact.patch
0100-1-clk-qcom-clk-rcg2-don-t-re-search-config-on-rcg2_set.patch
0100-2-clk-qcom-clk-rcg2-introduce-support-for-multiple-con.patch
0100-3-clk-qcom-gcc-ipq8074-rework-nss_port5-6-clock-to-mul.patch

I made a small script for the overall build process:

#!/bin/bash

#remove old folder 
rm -rf openwrt

#get the sources
git clone https://github.com/bitthief/openwrt.git

#copy the config 
cp config_dynalink_dl-wrx36 openwrt/.config

cd openwrt 
# delete the patches that cause the boot loop on the dynalink
rm target/linux/ipq807x/patches-5.15/0100-*

#update and install the feeds
./scripts/feeds update -a
./scripts/feeds install -a

#build
make defconfig
make download
make -j5

4 Likes

definitely latest build got some problems over ethernet (it's ok when using wifi) can't download files or can't clone large repos I will continue with the previous build for a while

I guess it is caused by the Werror=unused-function flag being globally defined in Debian but I am not sure about it.

Guys, did anyone manage to build in IPSec offloading? My builds fail with the following error:

ERROR: module '/home/alessandro/openwrt/bitthief/build_dir/target-aarch64_cortex-a53_musl/linux-ipq807x_generic/qca-nss-clients-2022-03-18-a93764b6/ipsecmgr/v2.0/plugins/klips/qca-nss-ipsec-klips.ko' is missing.

I was not able to find the missing module in the configuration.

I rebuilt from @bitthief repository today for the QNAP QHora 301w. The 10G ports are completely dead after booting: they seems to work but no communication with the router is possible from those ports. 1G ports and Wifi work fine.

i think it is still broken ... i am not using it on my build

Is there anything I can try/test to help figuring out a solution? I've already tried removing the same patches @thorsten97 pointed at but it makes no difference.

just rebuilt with the latest from bitthief ... no issues

i can ping using the 10g-1 google.com (ping -I 10g-1 google.com)

try to ask on the ipq806x forum if they have the module working ... and if so reengineer their fixes/patches

Someone had time to test those?

also my ax3600 lan ports won't work nicely qca-nss-ecm causes the problem
you could find out if qca-nss-ecm made any trouble

/etc/init.d/qca-nss-ecm stop

than test again 10g port

1 Like

The 10G-2 port cannot work in 1G mode. Use it to connect devices above 2.5G at least, and ensure that the correct rate is negotiated. Make sure that the connection rate is higher than 1G, and you will get a normal 10g-2 port!