Netgear R7800 exploration (IPQ8065, QCA9984)

Ok so any news with these new commits?

If you're asking me, sadly I'm not a developer. If I were to backport your efforts from 5.15 to 5.10 I'd run into a wall of my own frustration since I would not know what to do on merge or patch conflicts. Sorry... I can test all right, that's the contribution I can make. I've learned (a few) tricks on how to compile a build and now also know how to cherry-pick commits from other repositories. But if I need to select a different kernel version with a diffconfig, than I'm already lost :sweat_smile: .

i just need feedback on stability :smiley:

1 Like

I know :smile:

I'm building a 5.10 image right now. When that's done I can build a 5.15 image without NSS and your patches. Can I "just" clone your ipq806x-cleanup branch, update feeds, install feeds, and then get a .config (either via a diffconfig or make menuconfig) to select 5.15 as kernel?

--EDIT--
do I need to add something like this to an existing diffconfig I have to get a 5.15 build?:

CONFIG_LINUX_5_15=y

you should enable the experimental kernel build option in the menuconfig

Also in theory you should be able to apply my patch on top of master

I'll try a make menuconfig then, see what that looks like.
Applying your patches (all of them in that PR), is that a matter of cherry-picking them one by one with git? I don't know how to apply the huge patch that hnyman linked.

I've learned my tricks from this post after cloning a repository/branch:

./scripts/feeds update -a && ./scripts/feeds install -a && cp diffconfig .config && make defconfig && ./scripts/getver.sh

make -j5

--EDIT--
I've started make menuconfig and it's a bit overwhelming. I see a lot of stuff that I think I should select/enable, but I don't see "experimental kernel build" somewhere. If someone can give the the line I need to add to my diffconfig so 5.15 is built, I'm happy to build and test.

I've been where @D43m0n is now - trying to build my own versions of @KONG and @ACwifidude nss enabled trees.

The issue is needing a config file (set of files? Process?) that forces 'make menuconfig' start with the exact openwrt+kernel configuration in the tree.

I'm sure the info is in each tree, but the focus is usually on enabling specific features and I've found this overall starting point hard to reach.

@ACwifidude 1st 2 posts in his thread describe taking his sample diffconfig, modifying it to suit, and 'make defconfig' -ing to get a full .config file.

For us who'd like to help, that basic info would get us started; and for describing specific features to enable or disable, a path to the feature - from outermost to the feature - would help, even if it seems pedantic to the more experienced.

Build was without any errors. I have applied the PR on latest master. download/upload/latency numbers are much similar to 5.10. i ll report back on stability after few weeks.

CONFIG_LINUX_5_15=y
CONFIG_EXPERIMENTAL=y
CONFIG_TESTING_KERNEL=y
1 Like

I guess you never looked at my download directory, each release comes with the exact config it was build with. But the file is not called config, but openwrt default naming config.buildinfo, it also contains the selected packages, thus you also need to setup the feeds.

Thus basically you just checkout my nss tree setup feeds and use the config.buildinfow hich you place as .config in your build root.

1 Like

Thanks for that explanation - I'd seen config.buildinfo but didn't know that was the actual .config, - not a template or subset ...

OK I think I got it so far. I'm writing this down to verify If I got it right :sweat_smile:
I added this to my existing diffconfig and removed any NSS related stuff:

I've cloned the openwrt repository. Then I fetched your PR in a new branch:

git fetch origin pull/10703/head:ipq806x-frequency-scaling

Checking the new branch:

openwrt@c5cb2435faff:~/openwrt$ git branch -a
  ipq806x-frequency-scaling
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/lede-17.01
  remotes/origin/master
  remotes/origin/openwrt-18.06
  remotes/origin/openwrt-19.07
  remotes/origin/openwrt-21.02
  remotes/origin/openwrt-22.03

Checkout the new branch:

git checkout ipq806x-frequency-scaling
Switched to branch 'ipq806x-frequency-scaling'

And there I see master (HEAD) and your patches from the PR applied:

openwrt@c5cb2435faff:~/openwrt$ git log --oneline
46d71180e5 (HEAD -> ipq806x-frequency-scaling) ipq806x: 5.15: add krait-cc modernization patch and fixup
99d156af39 ipq806x: 5.15: add rpm fixes for regulator
20ef51f5fb ipq806x: 5.15: add krait clock modernization patch
f94a558ca2 ipq806x: 5.15: backport qcom clk fixes for krait and hfpll
abf24558a8 ipq806x: 5.15: renumber tsens patch with new order
5537848f42 ipq806x: 5.15: enable new devfreq scaling driver in config
84970d845a ipq806x: 5.15: rework nand_pins for wg2600hp3 dts
adddf693b3 ipq806x: 5.15: add boot-partitions binding to fix block warning
4b4f98a4dd ipq806x: 5.15: remove useless spm patch
d2075a3cf9 ipq806x: 5.15: replace nandc patch with upstream version
6fc70599f0 ipq806x: 5.15: replace fab scaling patch with devfreq driver
18f10f5e88 ipq806x: 5.15: add new version of cache cpu scaling driver
7470123d1c ipq806x: 5.15: backport devfreq new cpufreq based PASSIVE governor
dbaeef8418 ipq806x: 5.15: replace stmmac pcs fix with upstream version
de61428d6d ipq806x: 5.15: replace gcc fixes with upstream version
36c328e181 ipq806x: 5.15: replace lcc patch with upstream version
e7c51d8f3e ipq806x: 5.15: replace dtsi patches with upstream version
3d5433a5c8 ipq806x: 5.15: remove PCI_DOMAINS patch not needed anymore
6a0d389da8 ipq806x: 5.15: remove qcom adm Documentation patch
fa30c54005 ipq806x: split files dir to 5.10 and 5.15
01e2184c49 realtek: add support for TP-Link SG2210P
ab2a4c1e01 realtek: rtl8380-tl-sg2xxx: use a single "firmware" partition
d55c087390 realtek: tl-sg2xxx: read MAC address from nvmem-cells
5f026f1272 realtek: rtl838x: label switch port dts nodes
bc9dcfb1ce realtek: split TP-Link SG2000 series devicetree
a575788b8f uboot-mediatek: fix extraneous right parens
50a48faa1b scripts/download.pl: fix downloads with wget
c836ca84e8 scripts/download.pl: silence can't exec curl warning
b21ddbfa18 toolchain: Include ./include/fortify for external musl toolchain
9403810c02 toolchain: Select USE_SSTRIP with external musl toolchain
31a6605de0 mac80211: rt2x00: experimental improvements for MT7620 wifi
d4feb66048 mac80211: add patch descriptions to rt2x00 patches

Then it's just a matter of:

./scripts/feeds update -a && ./scripts/feeds install -a && make defconfig && ./scripts/getver.sh
make -j5

And wait :roll_eyes:

-- EDIT --
OK, I've got a master build with kernel 5.15, but I'm apparently missing a lot of packages that I thought would get pulled in by using my diffconfig, but luci isn't installed and my USB-stick isn't detected as well. What do I need to add to my diffconfig to get the same packages installed on 5.15 like I had on my 5.10 builds?

Current diffconfig for kernel 5.15
# Use "make defconfig" to expand this to a full .config
CONFIG_TARGET_ipq806x=y
CONFIG_TARGET_ipq806x_generic=y
CONFIG_TARGET_MULTI_PROFILE=y
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_netgear_r7800=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_netgear_r7800="-kmod-ath10k-ct -ath10k-firmware-qca9984-ct kmod-ath10k ath10k-firmware-qca9984"
CONFIG_TARGET_DEVICE_ipq806x_generic_DEVICE_tplink_c2600=y
CONFIG_TARGET_DEVICE_PACKAGES_ipq806x_generic_DEVICE_tplink_c2600="-kmod-ath10k-ct -ath10k-firmware-qca99x0-ct kmod-ath10k ath10k-firmware-qca99x0"
# Uncomment the line below to get all kmod packages generated (about 920) instead of
# about 170 kmod packages.
#CONFIG_ALL_KMODS=y
CONFIG_TARGET_PER_DEVICE_ROOTFS=y

# This selects the experimental kernel version, specifically 5.15
CONFIG_LINUX_5_15=y
CONFIG_EXPERIMENTAL=y
CONFIG_TESTING_KERNEL=y

# exfat is patented
CONFIG_BUILD_PATENTED=y

# Longer waiting for failsafe button push
CONFIG_IMAGEOPT=y
CONFIG_PREINITOPT=y
CONFIG_TARGET_PREINIT_TIMEOUT=5

# Busybox tweaks
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVEHISTORY=y
CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_SAVE_ON_EXIT=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_FLAGS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_REGEXP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_WINCH=y

# Add-on programs
CONFIG_DROPBEAR_ECC=y
CONFIG_PACKAGE_htop=y
CONFIG_PACKAGE_kmod-cryptodev=y
CONFIG_PACKAGE_libopenssl-devcrypto=y
CONFIG_PACKAGE_iptables-mod-physdev=y
CONFIG_PACKAGE_kmod-ipt-physdev=y
CONFIG_PACKAGE_igmpproxy=y
CONFIG_PACKAGE_curl=y
CONFIG_PACKAGE_wget=y

# USB device mount & file systems support
CONFIG_PACKAGE_block-mount=y
CONFIG_PACKAGE_cryptsetup=y
CONFIG_PACKAGE_e2fsprogs=y
CONFIG_PACKAGE_f2fs-tools=y
CONFIG_PACKAGE_kmod-crypto-ecb=y
CONFIG_PACKAGE_kmod-crypto-xts=y
CONFIG_PACKAGE_kmod-crypto-iv=y
CONFIG_PACKAGE_kmod-crypto-misc=y
CONFIG_PACKAGE_kmod-crypto-user=y 
CONFIG_PACKAGE_kmod-dnsresolver=y
CONFIG_PACKAGE_kmod-fs-cifs=y
CONFIG_PACKAGE_kmod-fs-exfat=y
CONFIG_PACKAGE_kmod-fs-ext4=y
CONFIG_PACKAGE_kmod-fs-f2fs=y
CONFIG_PACKAGE_kmod-fs-hfs=y
CONFIG_PACKAGE_kmod-fs-hfsplus=y
CONFIG_PACKAGE_kmod-fs-msdos=y
CONFIG_PACKAGE_kmod-fs-nfs=y
CONFIG_PACKAGE_kmod-fs-nfs-common=y
CONFIG_PACKAGE_kmod-fs-nfs-v3=y
CONFIG_PACKAGE_kmod-fs-nfs-v4=y
CONFIG_PACKAGE_kmod-fs-vfat=y
CONFIG_PACKAGE_kmod-nls-base=y
CONFIG_PACKAGE_kmod-nls-cp1250=y
CONFIG_PACKAGE_kmod-nls-cp437=y
CONFIG_PACKAGE_kmod-nls-cp850=y
CONFIG_PACKAGE_kmod-nls-iso8859-1=y
CONFIG_PACKAGE_kmod-nls-iso8859-15=y
CONFIG_PACKAGE_kmod-nls-utf8=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_kmod-usb-storage-uas=y
CONFIG_PACKAGE_kmod-fs-xfs=y
CONFIG_PACKAGE_libblkid=y
CONFIG_PACKAGE_ntfs-3g=y
CONFIG_PACKAGE_nfs-utils=y

# IPv6 support
CONFIG_PACKAGE_6in4=y
CONFIG_PACKAGE_6to4=y
CONFIG_PACKAGE_6rd=y

# IPv6 NAT support (ip6tables NAT extensions, ipt-nat6 and nf-nat6 kmods)
CONFIG_PACKAGE_ip6tables-mod-nat=y

# WLAN/WPS support
CONFIG_PACKAGE_hostapd-utils=y
CONFIG_WPA_MSG_MIN_PRIORITY=4
CONFIG_PACKAGE_wpad-openssl=y
# CONFIG_PACKAGE_wpad-basic-wolfssl is not set
# CONFIG_PACKAGE_libustream-wolfssl is not set

# SSL certificates
CONFIG_PACKAGE_ca-certificates=y

# Luci (SSL from OpenSSL)
CONFIG_PACKAGE_luci-ssl-openssl=y
CONFIG_PACKAGE_luci-app-commands=y
CONFIG_PACKAGE_luci-app-sqm=y
CONFIG_PACKAGE_luci-app-wireguard=y
CONFIG_PACKAGE_luci-theme-openwrt-2020=y

# Luci statistics
CONFIG_PACKAGE_luci-app-statistics=y
CONFIG_PACKAGE_collectd-mod-conntrack=y
CONFIG_PACKAGE_collectd-mod-cpufreq=y
CONFIG_PACKAGE_collectd-mod-dhcpleases=y
CONFIG_PACKAGE_collectd-mod-entropy=y
CONFIG_PACKAGE_collectd-mod-exec=y
CONFIG_PACKAGE_collectd-mod-interface=y
CONFIG_PACKAGE_collectd-mod-iwinfo=y
CONFIG_PACKAGE_collectd-mod-load=y
CONFIG_PACKAGE_collectd-mod-memory=y
CONFIG_PACKAGE_collectd-mod-network=y
CONFIG_PACKAGE_collectd-mod-ping=y
CONFIG_PACKAGE_collectd-mod-sqm=y
CONFIG_PACKAGE_collectd-mod-thermal=y
CONFIG_PACKAGE_collectd-mod-wireless=y
CONFIG_PACKAGE_collectd-mod-uptime=y

# DAWN
CONFIG_PACKAGE_luci-app-dawn=y

# node-exporter
CONFIG_PACKAGE_prometheus-node-exporter-lua=y
CONFIG_PACKAGE_prometheus-node-exporter-lua-nat_traffic=y
CONFIG_PACKAGE_prometheus-node-exporter-lua-netstat=y
CONFIG_PACKAGE_prometheus-node-exporter-lua-openwrt=y
CONFIG_PACKAGE_prometheus-node-exporter-lua-wifi=y
CONFIG_PACKAGE_prometheus-node-exporter-lua-wifi_stations=y

CONFIG_PACKAGE_kmod-ath10k-ct=m
CONFIG_PACKAGE_kmod-ath10k=m
CONFIG_PACKAGE_ath10k-firmware-qca988x-ct=m
CONFIG_PACKAGE_ath10k-firmware-qca99x0-ct=m
CONFIG_PACKAGE_ath10k-firmware-qca9984-ct=m
CONFIG_PACKAGE_ath10k-firmware-qca988x=m
CONFIG_PACKAGE_ath10k-firmware-qca99x0=m
CONFIG_PACKAGE_ath10k-firmware-qca9984=m

# store crashes from RAM
CONFIG_PACKAGE_kmod-ramoops=y
CONFIG_PACKAGE_kmod-pstore=y
CONFIG_PSTORE_CONSOLE=y

# Tune C2600                                                                                                                                                                    
CONFIG_PACKAGE_ethtool=y

If you haven't done so - cp your diffconfig to .config then: make defconfig

the diffconfig is the basics of what you want, make defconfig adds all the other - default - stuff. hope this helps.

EDIT - otoh, I don't know if make defconfig will step / clobber the work you've already done ...

For reasons not clear to me, my .config sometimes gets replaced with an older version during my build process. Until I figure out how that happens, I do a quick check of .config just before starting a build to make sure it's the one I want.

HTH

@D43m0n
You forgot to copy your diffconfig to the temporary .config file for use as a template by "make defconfig" to generate the finalized .config file.

./scripts/feeds update -a && ./scripts/feeds install -a && make defconfig && ./scripts/getver.sh

@anon98444528
Did you check out a branch in which you had previously added and committed the old ".config" file? If you did, then your current .config file will be replaced by the old .config file whenever you check out that branch.

1 Like

nah, its not that

$ git ls-files --error-unmatch .config
error: pathspec '.config' did not match any file(s) known to git
Did you forget to 'git add'?

also changing branches leave .config untouched.

It's likely an annoyance of my own making as I use a DIY build script. It might have something to do with the sequence of running make defconfig (perhaps after not running a make menuconfig?). I figure it out one of these days.

You should not run "make defconfig" after "make menuconfig".

"make defconfig" generates a finalized .config that can be directly used by the build process, while "make menuconfig" takes that finalized .config and allows you to make additional tweaks and regenerate a new finalized ".config".

what if I don't run make menuconfig?

You do not need to run make menuconfig if you have no need to make any tweak to the finalized .config file generated by "make defconfig".

The .config file that is generated by "make defconfig" is enough for the build process to proceed.

The build instructions "typical build steps" here, shows running make defconfig after running make menuconfig. Is that wrong? Or am I misinterpreting the example?