Large flash and qtnfmac driver for R7500v1

hi there

I use the current situation just to deal with the R7500v1, too.

After a lot of research I came to 2 results:

  1. increase UBI partition
    for the larger UBI partition I need to customize the *.dts file. this can only be done with the full BUILD environment.

  2. 5 Ghz wifi
    since the end of 2018, the Driver for the 5 Ghz quantenna NIC should be included in the Linux kernel.


to 1:
From a previous operation to the R7800 I was able to see how it works and could apply it successfully.
(Netgear R7800 - only 19MB Flash available?)
With the R7500v1, however, the factory partitioning is different, so that only deleting the "netgear" partition does not bring much memory. The reserve partition is much larger here.
ubi: 22 MB - netgear: 12 MB - reserve: 70 MB
I would like to use both.

git diff for target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
(and target/linux/ipq806x/files-4.19/arch/arm/boot/dts/qcom-ipq8064-r7500.dts)

                        ubi@1740000 {
                                label = "ubi";
-                               reg = <0x1740000 0x1600000>;
-                       };
-
-                       netgear@2d40000 {
-                               label = "netgear";
-                               reg = <0x2d40000 0x0c00000>;
-                               read-only;
-                       };
-
-                       reserve@3940000 {
-                               label = "reserve";
-                               reg = <0x3940000 0x46c0000>;
-                               read-only;
+                               reg = <0x1740000 0x68C0000>;
                        };
                };
        };

The post said that openwrt always wants to keep the way back open. With the R7800 everything was probably restored from the Stock ROM. I don't have the skills to verify the r7500v1, but I created an mtd block backup with the backup script from the docu before I first used the entire memory in the *.dts. After many attempts and also a fully written flash I replayed to stock and made a backup again.

=> could someone with the skills check that? (link to onedrive below - look in R7500v1/Backup - Netgear and Reserve Partition)
==> maybe i destroyed something? ^^
===> the default wlan passwort from stickers on the back was still alive after

If everything were restored here, could partitioning be included in the global *.dts? Would be the only way I could work with the official openwrt and full flash size.


to 2:
I am unfortunately absolutely not a professional in the linux world ... this is my first attempt ever to build something ... :smile:
first I wanted to create the driver as an extra package, which I couldn't do. I don't really understand that thing with the make command ^^
but then I found in the openwrt doku the hint that i could add missing kernel packages via the modules/*.mk files.
(https://openwrt.org/docs/guide-developer/packages in topic "Creating packages for kernel modules")
I tried that but I don't think it's working properly yet. I can't find a *.ko file, so I think there's no more on the router later ...

I think the additions in wireless.mk are not yet correct or something in the ipq806x specific kernel config?

Test 1 (wireless.mk):

define KernelPackage/qtnfmac_pcie
  SUBMENU:=$(WIRELESS_MENU)
  TITLE:=Quantenna QSR1000/QSR2000/QSR10g PCIe support (PCIE)
  DEPENDS:=@PCI_SUPPORT +@FW_LOADER @kmod-cfg80211 +@kmod-lib-crc32c
  KCONFIG:=\
	WLAN_VENDOR_QUANTENNA \
	CONFIG_QTNFMAC_PCIE
  FILES:= \
	$(LINUX_DIR)/drivers/net/wireless/quantenna/qtnfmac/qtnfmac_pcie.ko
  AUTOLOAD:=$(call AutoProbe,qtnfmac_pcie)
endef

define KernelPackage/qtnfmac_pcie/description
This option adds support for wireless adapters based on Quantenna 802.11ac QSR10g (aka Pearl) and QSR1000/QSR2000 (aka Topaz) FullMAC chipsets running over PCIe.
endef

$(eval $(call KernelPackage,qtnfmac_pcie))



define KernelPackage/qtnfmac
  SUBMENU:=$(WIRELESS_MENU)
  TITLE:=Quantenna QSR1000/QSR2000/QSR10g PCIe support
  DEPENDS:=@kmod-qtnfmac_pcie
  KCONFIG:=\
	CONFIG_QTNFMAC
  FILES:= \
	$(LINUX_DIR)/drivers/net/wireless/quantenna/qtnfmac/qtnfmac.ko
  AUTOLOAD:=$(call AutoProbe,qtnfmac)
endef

define KernelPackage/qtnfmac/description
This option adds support for wireless adapters based on Quantenna 802.11ac QSR10g (aka Pearl) and QSR1000/QSR2000 (aka Topaz) FullMAC chipsets running over PCIe.
endef

$(eval $(call KernelPackage,qtnfmac))

Test 2 (wireless.mk):

define KernelPackage/qtnfmac
  SUBMENU:=$(WIRELESS_MENU)
  TITLE:=Quantenna QSR1000/QSR2000/QSR10g PCIe support
  DEPENDS:=@PCI_SUPPORT +@FW_LOADER @kmod-cfg80211 +@kmod-lib-crc32c
  KCONFIG:=\
	CONFIG_WLAN_VENDOR_QUANTENNA=y \
	CONFIG_QTNFMAC_PCIE \
	CONFIG_QTNFMAC
  FILES:= \
	$(LINUX_DIR)/drivers/net/wireless/quantenna/qtnfmac/qtnfmac_pcie.ko \
	$(LINUX_DIR)/drivers/net/wireless/quantenna/qtnfmac/qtnfmac.ko
  AUTOLOAD:=$(call AutoProbe, qtnfmac)
endef

define KernelPackage/qtnfmac/description
This option adds support for wireless adapters based on Quantenna 802.11ac QSR10g (aka Pearl) and QSR1000/QSR2000 (aka Topaz) FullMAC chipsets running over PCIe.
endef

$(eval $(call KernelPackage,qtnfmac))

Test 3 (tryed to add in target/linux/ipq806x/config-5.4):

CONFIG_WLAN_VENDOR_QUANTENNA=y
CONFIG_QTNFMAC_PCIE=y
CONFIG_QTNFMAC=y

Collected error while different trys:

modules/wireless.mk:61: recipe for target '/home/user/pp-mod-openwrt/bin/targets/ipq806x/generic/packages/kmod-qtnfmac_5.4.34-1_arm_cortex-a15_neon-vfpv4.ipk' failed
Collecting package info: doneERROR: module '/home/user/pp-mod-openwrt/build_dir/target-arm_cortex-a15+neon-vfpv4_musl_eabi/linux-ipq806x_generic/linux-5.4.34/drivers/net/wireless/quantenna/qtnfmac/qtnfmac_pcie.ko' is missing.

for testing I have activated the other 2 packages from the wireless.mk in menuconfig. ... same..

WARNING: kmod-net-prism54 is not available in the kernel config - generating empty package
WARNING: kmod-net-rtl8192su is not available in the kernel config - generating empty package
WARNING: kmod-qtnfmac is not available in the kernel config - generating empty package

OneDrive Link to files:
https://1drv.ms/u/s!ApgFWNTXIXFBjLxKlNZFakncKFvQrw?e=ihmxV7
Only that I said, DO NOT use the firmware or other packages from the folders from my share to flash your router! The files should only help able people to see where I stand.


@slh Can you do something with this informations and give a few tips on how to keep going? what do I overlook?

... without understanding it better, I am unfortunately no longer able to make any progress at this point ...

stay healthy