Adding OpenWrt support for Xiaomi AX3600 (Part 1)

Hi guys, to enable changes, you need to upload bin files to the router? BIN-NSS.FW.12.0.r1-002-HK.R.tar.bz2, or is it necessary to rebuild the OpenWRT assembly?

I just copied the two new files, and it seems to work with Robi's latest build.

1 Like

Tell me in which directory to copy the files ?, I have an Xiomi AX3600 router with the latest firmware Openwrt from robimarko.

In the directory /lib/firmware/ I have files qca-nss0-retail.bin qca-nss1-retail.bin, should they be replaced ?

Yes. The name needs to be the same though. Based on the size you can tell which one is which. Both files are needed.

But we don't have a working nss-drv (for the 5.15 kernel), so just copying the nss bins at the right place doesn't lead to working nss acceleration.

That is clear to me :+1: I am already happy that it wont crash anything, as I believe even without the nss-drv the firmware is loaded non the less.

1 Like

Nope, without NSS-DRV NSS fw is not used at all, not even loaded

1 Like

Good to know. So surprises can emerge when you re-add it... :slight_smile:

Well yesterday I tried to OC ax3600.
I added the missing clock steps to ipq8074-ac-cpu.dtsi build it and my joy only lasted 30 seconds.
htop shows the OC cpu steps, it looks like it's working, but wen I ran coremak, the bench show there is no increase in speed.
It doesn't work. :slight_smile:

You didnt really think that it would work at 2.2 GHz

1 Like

First I only tried 1.6 and it looked good, so I went for 2.2 and was thinking Robi code is so good it's even using the correct voltage, but then I thought it couldn't be right and ran the bench. :slight_smile:

Use this tool to actually calculate the clock and verify whats actual frequency.
2.2GHz works fine on the Hawkeye models and there is a noticable memory throughput for example

include $(TOPDIR)/rules.mk

PKG_NAME:=mhz
PKG_RELEASE:=$(AUTORELEASE)

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=https://github.com/wtarreau/mhz.git
PKG_SOURCE_DATE:=2020-05-12
PKG_SOURCE_VERSION:=d1ed90e3523ab0300d6e7960eaaa49ef8c41845d
PKG_MIRROR_HASH:=0bbe8656ce35e0d675e63402c0687e5b1bd874710bfaec20045aa870073b1c63

include $(INCLUDE_DIR)/package.mk

define Package/mhz
  SECTION:=utils
  CATEGORY:=Utilities
  TITLE:=CPU frequency measurement utility
endef

define Package/mhz/install
	$(INSTALL_DIR) $(1)/usr/sbin
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/mhz $(1)/usr/sbin/
endef

$(eval $(call BuildPackage,mhz))
2 Likes

Thanks, I'll try it.

@bitthief repo have a nss-drv that compiles and works + ecm compiles however it crashes the kernel with "Unable to handle kernel paging request at virtual address"

1 Like

I was trying it, the new SPF 11.5 NSS FW loads like it was said:

[    8.270615] nss_driver - fw of size 827556  bytes copied to load addr: 40000000, nss_id : 0
[    8.272912] Supported Frequencies - 
[    8.272927] 187.2 MHz 
[    8.277778] 748.8 MHz 
[    8.281595] 1.6896 GHz 
[    8.283784] 
[    8.288514] ffffffc000a7cf00: set sdma ffffff800369a200
[    8.290287] ffffffc000a7cf00: meminfo init succeed
[    8.329353] node size 2 # items 4
[    8.329390] memory: 40000000 536870912 (avl 436776960) items 4 active_cores 2
[    8.331674] addr/size storage words 2 2 # words 4 in DTS, ddr size 1000000
[    8.338784] ffffffc000a7cf00: nss core 0 booted successfully
[    8.351389] nss_driver - fw of size 295040  bytes copied to load addr: 40800000, nss_id : 1
[    8.352451] Supported Frequencies - 
[    8.352457] 187.2 MHz 
[    8.359429] 748.8 MHz 
[    8.363268] 1.6896 GHz

nobody cared to update the package to 11.5 am i wrong?
@robimarko if you want i can waste some time on it and push the changes... (ideally on a separate branch?)

3 Likes

I updated to 11.5, can say it loads, but didn't had time for much more.
The new file size can be seen in the logs I posted.

He is talking about the nss-drv and ssdk, not the binary blob of the firmware...

you need ecm ... not just the nss-drv

also note that I noticed a memory leak ... had to increase the drop of caches from every 3h to 30m ... and just 10 clients connecting... this is perhaps because I have the nss-drv loaded