Skip to content

Commit

Permalink
Merge qos
Browse files Browse the repository at this point in the history
  • Loading branch information
breeze303 committed Oct 21, 2024
2 parents b648362 + 7bee99d commit bbebc5d
Show file tree
Hide file tree
Showing 678 changed files with 16,283 additions and 25,037 deletions.
Binary file added cashapp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion feeds.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ src-git packages https://github.com/immortalwrt/packages.git
src-git luci https://github.com/immortalwrt/luci.git
src-git routing https://git.openwrt.org/feed/routing.git
src-git telephony https://git.openwrt.org/feed/telephony.git
src-git nss_packages https://github.com/breeze303/nss-packages.git;NSS-12.5-K6.x
src-git nss_packages https://github.com/qosmio/nss-packages.git;NSS-12.5-K6.x
src-git sqm_scripts_nss https://github.com/qosmio/sqm-scripts-nss.git
#src-git video https://github.com/openwrt/video.git
#src-git targets https://github.com/openwrt/targets.git
Expand Down
1 change: 1 addition & 0 deletions include/cmake.mk
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ define Host/Configure/Default
-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=TRUE \
-DCMAKE_FIND_USE_SYSTEM_PACKAGE_REGISTRY=FALSE \
-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=TRUE \
-DBUILD_SHARED_LIBS=OFF \
$(CMAKE_HOST_OPTIONS) \
$(HOST_CMAKE_SOURCE_DIR) \
)
Expand Down
4 changes: 2 additions & 2 deletions include/kernel-6.6
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
LINUX_VERSION-6.6 = .53
LINUX_KERNEL_HASH-6.6.53 = 285d181d1b252b0bf905f040d094215cf183ac98c31a17f9cce9f3537ef4d779
LINUX_VERSION-6.6 = .57
LINUX_KERNEL_HASH-6.6.57 = 66ce426ef96f99b8e1ef7ac72e780c730ef8b970f7aa5708501c4274d7abb7b3
2 changes: 1 addition & 1 deletion include/kernel-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ define BuildKernel
download: $(if $(LINUX_SITE),$(DL_DIR)/$(LINUX_SOURCE))
prepare: $(STAMP_PREPARED)
compile: $(LINUX_DIR)/.modules
$(MAKE) -C image compile TARGET_BUILD=
+$(MAKE) -C image compile TARGET_BUILD=

dtb: $(STAMP_CONFIGURED)
$(_SINGLE)$(KERNEL_MAKE) scripts_dtc
Expand Down
5 changes: 4 additions & 1 deletion include/prereq-build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ $(eval $(call SetupHostCommand,perl,Please install Perl 5.x, \
perl --version | grep "perl.*v5"))

$(eval $(call SetupHostCommand,python,Please install Python >= 3.7, \
python3.12 -V 2>&1 | grep 'Python 3', \
python3.11 -V 2>&1 | grep 'Python 3', \
python3.10 -V 2>&1 | grep 'Python 3', \
python3.9 -V 2>&1 | grep 'Python 3', \
Expand All @@ -190,6 +191,7 @@ $(eval $(call SetupHostCommand,python,Please install Python >= 3.7, \
python3 -V 2>&1 | grep -E 'Python 3\.([7-9]|[0-9][0-9])\.?'))

$(eval $(call SetupHostCommand,python3,Please install Python >= 3.7, \
python3.12 -V 2>&1 | grep 'Python 3', \
python3.11 -V 2>&1 | grep 'Python 3', \
python3.10 -V 2>&1 | grep 'Python 3', \
python3.9 -V 2>&1 | grep 'Python 3', \
Expand All @@ -199,7 +201,8 @@ $(eval $(call SetupHostCommand,python3,Please install Python >= 3.7, \

$(eval $(call TestHostCommand,python3-distutils, \
Please install the Python3 distutils module, \
$(STAGING_DIR_HOST)/bin/python3 -c 'from distutils import util'))
printf 'from sys import version_info\nif version_info < (3, 12):\n\tfrom distutils import util' | \
$(STAGING_DIR_HOST)/bin/python3 -))

$(eval $(call TestHostCommand,python3-stdlib, \
Please install the Python3 stdlib module, \
Expand Down
2 changes: 1 addition & 1 deletion include/toplevel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ help:
cat README.md

distclean:
rm -rf bin build_dir .ccache .config* dl feeds key-build* logs package/feeds staging_dir tmp
rm -rf bin build_dir .ccache .config* dl feeds key-build* logs package/feeds target/linux/feeds staging_dir tmp
@$(_SINGLE)$(SUBMAKE) -C scripts/config clean

ifeq ($(findstring v,$(DEBUG)),)
Expand Down
176 changes: 144 additions & 32 deletions nss-setup/config-nss.seed
Original file line number Diff line number Diff line change
@@ -1,16 +1,45 @@
# copy to `.config` and run `make defconfig`
# vi: set syntax=make:

# This builds for all ipq807x targets.
# To use this config, you must build from https://github.com/qosmio/openwrt-ipq

# 1. copy this config to root of build folder name it ".config"
# 2. run `make defconfig`
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~IMPORTANT~~~~~~~~~~~~~~~~~~~~~~~~~~
# Use `scripts/env` to create version controlled build environments.
# This ensures you can easily reproduce builds and view changes
# made during `make menuconfig`.
#
# It will also version control custom files you add to `files/`

# To create a new environment, run:
# (e.g `./scripts/env new nss`)
# For more information, see `./scripts/env help`
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# 1. Copy this config to root of build folder name it ".config"
# `cp nss-setup/config-nss.seed .config`
# 2. Uncomment the device you want to build for listed below, replace 'is not set' with '=y'
# (e.g. CONFIG_TARGET_qualcommax_ipq807x_DEVICE_linksys_mx4300=y)
# 3. Update feeds
# `./scripts/feeds update -a && ./scripts/feeds install -a`
# 4. Expand your seed file to a full config
# `make defconfig V=s`
# 5. If you want to make further customizations, use `make menuconfig`
# 6. Build the firmware
# `make -j$(nproc) V=s`

# use `make menuconfig` to further customize building just for your target or adding custom packages.

#####################################################################
# Target platform
#####################################################################
CONFIG_TARGET_qualcommax=y
CONFIG_TARGET_qualcommax_ipq807x=y

#####################################################################
# Target device
#####################################################################
# Uncomment target device you want to build for, set '=y'

# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_arcadyan_aw1000 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_asus_rt-ax89x is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_buffalo_wxr-5950ax12 is not set
Expand Down Expand Up @@ -41,30 +70,41 @@ CONFIG_TARGET_qualcommax_ipq807x=y
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_zte_mf269 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_zyxel_nbg7815 is not set

#####################################################################
# NSS Offloading
#####################################################################
CONFIG_ATH11K_NSS_SUPPORT=y
CONFIG_ATH11K_NSS_MESH_SUPPORT=y
CONFIG_PACKAGE_MAC80211_NSS_SUPPORT=y
CONFIG_PACKAGE_kmod-qca-nss-drv=y
CONFIG_PACKAGE_kmod-qca-nss-drv-bridge-mgr=y
CONFIG_PACKAGE_kmod-qca-nss-ecm=y

# Additional NSS packages (VLAN, Multicast Snooping, etc)
CONFIG_PACKAGE_kmod-qca-nss-drv-vlan-mgr=y
CONFIG_PACKAGE_kmod-qca-mcs=y

# NSS SQM Traffic Shaping
CONFIG_PACKAGE_sqm-scripts=y
CONFIG_PACKAGE_sqm-scripts-nss=y

#####################################################################
# Compiler Optimization
#####################################################################
CONFIG_BUILD_PATENTED=y
# Use ccache to speed up subsequent builds
CONFIG_CCACHE=y
CONFIG_DEVEL=y
CONFIG_EXPERIMENTAL=y
CONFIG_TOOLCHAINOPTS=y
CONFIG_TARGET_OPTIONS=y
CONFIG_TARGET_OPTIMIZATION="-O2 -pipe -mcpu=cortex-a53+crc+crypto"
CONFIG_TARGET_INIT_PATH="/usr/sbin:/usr/bin:/sbin:/bin:/opt/usr/bin:/opt/bin:/opt/sbin:/opt/usr/sbin"
CONFIG_USE_GC_SECTIONS=y

# If your device supports USB and plan on installing packages via opkg
# Use a USB device, as these devices have limited storage and you avoid wearing out the internal flash.
# We update the PATH to include the USB device. '/opt' is a common mount point.
CONFIG_TARGET_INIT_PATH="/usr/sbin:/usr/bin:/sbin:/bin:/opt/usr/bin:/opt/bin:/opt/sbin:/opt/usr/sbin"

# Kernel Config
CONFIG_COLLECT_KERNEL_DEBUG=y
CONFIG_KERNEL_PERF_EVENTS=y
Expand All @@ -74,63 +114,135 @@ CONFIG_KERNEL_ARM_PMUV3=y
CONFIG_KERNEL_PREEMPT_NONE=y
CONFIG_KERNEL_PREEMPT_NONE_BUILD=y

# Reduce kernel module size
# Disable unnecessary debugging for Wi-Fi driver.
CONFIG_ATH11K_DEBUGFS_HTT_STATS=n
CONFIG_ATH11K_DEBUGFS_STA=n
# Disables thermal throttling support for ath11k.
CONFIG_ATH11K_THERMAL=n

#####################################################################
# SSL Configuration
#####################################################################
# Use OpenSSL as the preferred SSL library
CONFIG_PACKAGE_libustream-openssl=y
CONFIG_PACKAGE_libustream-mbedtls=n
CONFIG_PACKAGE_libopenssl=y
CONFIG_LUA_ECO_OPENSSL=y
CONFIG_LUA_ECO_MBEDTLS=n
# Optimize OpenSSL for speed over size
CONFIG_OPENSSL_OPTIMIZE_SPEED=y

# LUCI Config
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-ssl-openssl=y
#####################################################################
# Wireless Configuration
#####################################################################
# Enable WPA3 and Mesh support
CONFIG_PACKAGE_wpad-mesh-openssl=y
# Avoid using mbedTLS for consistency across packages and to avoid mixed SSL libraries.
CONFIG_PACKAGE_wpad-basic-mbedtls=n

#####################################################################
# Library Optimization
#####################################################################
# Optimize common libraries (zlib, zstd) for speed, improving performance on compression tasks.
CONFIG_ZLIB_OPTIMIZE_SPEED=y
CONFIG_ZSTD_OPTIMIZE_O3=y

#####################################################################
# Feeds Configuration
#####################################################################
# Prevent opkg from adding custom feeds to /etc/opkg/distfeeds.conf in the final image.
CONFIG_FEED_nss_packages=n
CONFIG_FEED_sqm_scripts_nss=n

# --- Essential Packages ---

#####################################################################
# LUCI (the web interface)
#####################################################################
CONFIG_PACKAGE_luci=y
# Enable HTTPS support
CONFIG_PACKAGE_luci-ssl-openssl=y

#####################################################################
# LUCI Applications
#####################################################################
# - Firewall: Manage firewall rules via LUCI.
CONFIG_PACKAGE_luci-app-firewall=y
# - OPKG: Package manager for OpenWRT, manage installed packages via LUCI.
CONFIG_PACKAGE_luci-app-opkg=y

# - iperf3: CLI tool to measure network performance.
# This is essential to test WiFi speeds,
# as posting speedtest.net results is useless
# without knowing the network conditions.
CONFIG_PACKAGE_iperf3=y

# --- Optional Packages --- #

#### EVERYTHING BELOW THIS SECTION IS OPTIONAL!!

#### You can delete or comment out with '#' any package you don't want to install.

#####################################################################
# LUCI Applications
#####################################################################

# - SQM: Smart Queue Management for bufferbloat control.
CONFIG_PACKAGE_luci-app-sqm=y
# - Statistics: Monitor your router’s performance (CPU, memory, bandwidth).
CONFIG_PACKAGE_luci-app-statistics=y
# - ACME: Automated SSL cert management. If you want to access your router via HTTPS and have a domain.
CONFIG_PACKAGE_luci-app-acme=y
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-nlbwmon=y
CONFIG_PACKAGE_luci-app-opkg=y
CONFIG_PACKAGE_luci-app-sqm=y
CONFIG_PACKAGE_luci-app-statistics=y
# - Watchcat: Automate reboots on connection loss.
CONFIG_PACKAGE_luci-app-watchcat=y
# - WireGuard: VPN support. Will also select the kernel module.
CONFIG_PACKAGE_luci-proto-wireguard=y
# - NLBWMon: Network usage monitoring to track bandwidth by host.
CONFIG_PACKAGE_luci-app-nlbwmon=y

# Library Optimization
CONFIG_ZLIB_OPTIMIZE_SPEED=y
CONFIG_ZSTD_OPTIMIZE_O3=y

# Reduce kernel module size
CONFIG_ATH11K_DEBUGFS_HTT_STATS=n
CONFIG_ATH11K_DEBUGFS_STA=n
CONFIG_ATH11K_THERMAL=n

# Additional kernel modules
#####################################################################
# Kernel Modules
#####################################################################
# Filesystem support for USB storage:
# FAT32: Useful to load recovery or new images that can be booted by u-boot
CONFIG_PACKAGE_kmod-fs-vfat=y
CONFIG_PACKAGE_kmod-fs-f2fs=y
# NTFS: Mostly useful for Windows users.
CONFIG_PACKAGE_kmod-fs-ntfs3=y

# Network
# Bridge module support for working with nftables for more complex firewall setups.
CONFIG_PACKAGE_kmod-nft-bridge=y

# USB Storage
# NOTE: Not all IPQ807x devices have USB ports, so this is optional.
CONFIG_PACKAGE_kmod-usb-storage=y

# Logging/Debugging

# ramoops: kernel module that logs crashes to RAM which can be read after a reboot.
# Check '/sys/fs/pstore' for logs after a crash.
CONFIG_PACKAGE_kmod-ramoops=y

# Additional packages
CONFIG_PACKAGE_iperf3=y
CONFIG_PACKAGE_htop=y
#####################################################################
# Packages
#####################################################################

# - curl: CLI tool to transfer data with URLs. Useful for scripting, and supperior to wget.
CONFIG_PACKAGE_curl=y
CONFIG_LIBCURL_OPENSSL=y
CONFIG_LIBCURL_MBEDTLS=n
# - rsync: Efficient file transfers and backups.
CONFIG_PACKAGE_rsync=y
# - jq: Parse JSON data from the command line. Useful for scripting, and WAY better than `jsonfilter`.
CONFIG_PACKAGE_jq=y
# - pigz: Parallel gzip for faster compression.
CONFIG_PACKAGE_pigz=y
# - tar: Archiving utility. The default busybox tar is very limited.
CONFIG_PACKAGE_tar=y
# - tcpdump: Capture and analyze network traffic.
CONFIG_PACKAGE_tcpdump=y

# - htop: CLI tool to monitor system resource usage.
CONFIG_PACKAGE_htop=y
# lm-sensors isn't needed for IPQ807x devices.
CONFIG_HTOP_LMSENSORS=n

# Prevent opkg from adding custom feeds to /etc/opkg/distfeeds.conf
CONFIG_FEED_nss_packages=n
CONFIG_FEED_sqm_scripts_nss=n
19 changes: 9 additions & 10 deletions nss-setup/example/01-mesh-node
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ config wifi-device 'radio2'
option country 'US'
option htmode 'HE80'
option channel '161'
option cell_density '3'
option cell_density '0'
option noscan '1'

config wifi-iface '5g'
option device 'radio1'
option mode 'ap'
option network 'lan'
option ssid 'MX4300'
option encryption 'psk2+ccmp'
option encryption 'psk2'
option key 'xxxxxxxxxxxxx'
option beacon_int '97'
option bss_transition '1'
Expand All @@ -54,14 +54,13 @@ config wifi-iface '5g'
option wnm_sleep_mode '1'
option wpa_group_rekey '86400'
option pmk_r1_push '1'
option macaddr '80:69:1A:22:FF:BA'

config wifi-iface '2g'
option device 'radio1'
option mode 'ap'
option network 'lan'
option ssid 'MX4300'
option encryption 'psk2+ccmp'
option encryption 'psk2'
option key 'xxxxxxxxxxxxx'
option bss_transition '1'
option beacon_int '100'
Expand All @@ -80,7 +79,6 @@ config wifi-iface '2g'
option wpa_group_rekey '86400'
option max_inactivity '4260'
option pmk_r1_push '1'
option macaddr '80:69:1A:22:FF:BB'

config wifi-iface 'mesh'
option device 'radio2'
Expand All @@ -91,11 +89,13 @@ config wifi-iface 'mesh'
option network 'lan'
option mesh_fwding '1'
option mesh_gate_announcements '1'
option mesh_hwmp_rootmode '2'
option mesh_max_peer_links '16'
option mesh_rssi_threshold '-65'
option mesh_hwmp_rootmode '4'
option mesh_max_peer_links '5'
option mesh_ttl '5'
option mesh_element_ttl '3'
option mesh_hwmp_max_preq_retries '2'
option mesh_rssi_threshold '-70'
option disabled '0'
option macaddr '80:69:1A:22:AA:BC'

config wifi-iface 'wds'
option device 'radio2'
Expand All @@ -106,4 +106,3 @@ config wifi-iface 'wds'
option key '4b22dd0c95846d36a8760ec90b703601c60f31ce4c8db1d9ade683cd3a2c2326'
option wds '1'
option disabled '1'
option macaddr '80:69:1A:22:AA:BC'
Loading

0 comments on commit bbebc5d

Please sign in to comment.