Skip to content

Commit

Permalink
Merge pull request #12 from qosmio/qualcommax-6.x-nss-mx4300
Browse files Browse the repository at this point in the history
Qualcommax 6.x nss mx4300
  • Loading branch information
arix00 authored Sep 25, 2024
2 parents 38bb47c + a4e0eb0 commit 2b0e70a
Show file tree
Hide file tree
Showing 215 changed files with 45,490 additions and 235 deletions.
2 changes: 2 additions & 0 deletions Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ source "target/sdk/Config.in"
source "target/toolchain/Config.in"

source "tmp/.config-package.in"

source "config/Config-ipq.in"
150 changes: 150 additions & 0 deletions config/Config-ipq.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
# vim: set ft=kconfig
menu "Qualcomm IPQ Options"

comment "Kernel build options"

choice KERNEL_IPQ_MEM_PROFILE
prompt "IPQ memory profile"
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_edimax_cax1800
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_compex_wpq87
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_linksys_mx4200v1
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_redmi_ax6
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_xiaomi_ax3600
default IPQ_MEM_PROFILE_512 if TARGET_qualcommax_ipq807x_DEVICE_zte_mf269

config IPQ_MEM_PROFILE_1024
bool "1024"
config IPQ_MEM_PROFILE_512
bool "512"
config IPQ_MEM_PROFILE_256
bool "256"
endchoice

config KERNEL_IPQ_MEM_PROFILE
int
default 1024 if IPQ_MEM_PROFILE_1024
default 512 if IPQ_MEM_PROFILE_512
default 256 if IPQ_MEM_PROFILE_256

help
This option select memory profile to used, which defines
the reserved memory configuration used in device tree

config KERNEL_SKB_RECYCLER
bool "Generic SKB recycling"
default y if KERNEL_IPQ_MEM_PROFILE > 256

choice KERNEL_SKB_RECYCLE_SIZE
prompt "SKB recycler size"
default SKB_RECYCLE_SIZE_2304
default SKB_RECYCLE_SIZE_1856 if KERNEL_IPQ_MEM_PROFILE < 1024

depends on KERNEL_SKB_RECYCLER
config SKB_RECYCLE_SIZE_1856
bool "1856"
config SKB_RECYCLE_SIZE_2304
bool "2304"
endchoice

config KERNEL_SKB_RECYCLE_SIZE
int
depends on KERNEL_SKB_RECYCLER
default 2304 if SKB_RECYCLE_SIZE_2304
default 1856 if SKB_RECYCLE_SIZE_1856

help
SKB recycler default size

config KERNEL_SKB_RECYCLER_MULTI_CPU
bool "Cross-CPU recycling for CPU-locked workloads"
depends on KERNEL_SKB_RECYCLER
default y

config KERNEL_SKB_RECYCLER_PREALLOC
bool "Enable preallocation of SKBs (For SFE not NSS)"
depends on KERNEL_SKB_RECYCLER
default n
help
NOTE: This is primarily for platforms utilizing SFE (Shortcut Forwarding Engine)
and not NSS (Network Subsystem) offload.

NSS offload platforms mostly utilize the SKB recycling feature when managing memory.
Mostly when to "reclaim" it.

This option enables preallocation of SKBs.
The default is '16384' which means 16384 x 4096 (Size of SKB) = 64MB.

config KERNEL_SKB_RECYCLE_MAX_PREALLOC_SKBS
int "Number of SKBs to be preallocated"
depends on KERNEL_SKB_RECYCLER_PREALLOC
default 16384

config KERNEL_SKB_FIXED_SIZE_2K
bool "SKB size fixed at 2K"
default n
default y if KERNEL_IPQ_MEM_PROFILE < 512
help
SKB size fixed at 2K. Primarily for platforms with less than 512MB memory.

config KERNEL_ALLOC_SKB_PAGE_FRAG_DISABLE
depends on KERNEL_SKB_RECYCLER
bool "Disable alloc skb page frag"
default n

choice KERNEL_PREEMPTION
prompt "Kernel preemption level"
default KERNEL_PREEMPT

config KERNEL_PREEMPT_NONE
bool "No Forced Preemption (Server)"
help
This is the traditional Linux preemption model, geared towards
throughput. It will still provide good latencies most of the time,
but there are no guarantees and occasional longer delays are
possible.

Select this option if you are building a kernel for a server or
scientific/computation system, or if you want to maximize the
raw processing power of the kernel, irrespective of scheduling
latencies.

config KERNEL_PREEMPT_NONE_BUILD
depends on KERNEL_PREEMPT_NONE
bool
default y

config KERNEL_PREEMPT
bool "Preemptible Kernel (Low-Latency)"
help
This option reduces the latency of the kernel by making
all kernel code (that is not executing in a critical section)
preemptible. This allows reaction to interactive events by
permitting a low priority process to be preempted involuntarily
even if it is in kernel mode executing a system call and would
otherwise not be about to reach a natural preemption point.
This allows applications to run more 'smoothly' even when the
system is under load, at the cost of slightly lower throughput
and a slight runtime overhead to kernel code.

Select this if you are building a kernel for a desktop or
embedded system with latency requirements in the milliseconds
range.

if KERNEL_PREEMPT
config KERNEL_PREEMPT_RCU
bool "Preemptible RCU"
default y
select KERNEL_PREEMPT_COUNT
help
This option selects the RCU implementation that is
designed for very large SMP systems with hundreds or
thousands of CPUs, but for which real-time response
is also required. It also scales down nicely to
smaller systems.

Select this option if you are unsure.

endif
endchoice

endmenu
2 changes: 2 additions & 0 deletions feeds.conf.default
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ src-git packages https://git.openwrt.org/feed/packages.git
src-git luci https://git.openwrt.org/project/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/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
#src-git oldpackages http://git.openwrt.org/packages.git
Expand Down
136 changes: 136 additions & 0 deletions nss-setup/config-nss.seed
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# copy to `.config` and run `make defconfig`
# 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`
#
# 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

# 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
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_cmcc_rm2-6 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_compex_wpq873 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_dynalink_dl-wrx36 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_edgecore_eap102 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_edimax_cax1800 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_linksys_mx4200v1 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_linksys_mx4200v2 is not set
CONFIG_TARGET_qualcommax_ipq807x_DEVICE_linksys_mx4300=y
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_linksys_mx5300 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_linksys_mx8500 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_netgear_rax120v2 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_netgear_sxr80 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_netgear_sxs80 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_netgear_wax218 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_netgear_wax620 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_netgear_wax630 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_prpl_haze is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_qnap_301w is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_redmi_ax6 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_spectrum_sax1v1k is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_xiaomi_ax3600 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_xiaomi_ax9000 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_yuncore_ax880 is not set
# CONFIG_TARGET_qualcommax_ipq807x_DEVICE_zbtlink_zbt-z800ax is not set
# 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

# 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
CONFIG_CCACHE=y
CONFIG_DEVEL=y
CONFIG_EXPERIMENTAL=y
CONFIG_TOOLCHAINOPTS=y
CONFIG_TARGET_OPTIONS=y
CONFIG_TARGET_OPTIMIZATION="-O3 -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

# Kernel Config
CONFIG_COLLECT_KERNEL_DEBUG=y
CONFIG_KERNEL_PERF_EVENTS=y
CONFIG_KERNEL_DYNAMIC_DEBUG=y
CONFIG_KERNEL_ARM_PMU=y
CONFIG_KERNEL_ARM_PMUV3=y
CONFIG_KERNEL_PREEMPT_NONE=y
CONFIG_KERNEL_PREEMPT_NONE_BUILD=y

# SSL Configuration
CONFIG_PACKAGE_libustream-openssl=y
CONFIG_PACKAGE_libustream-mbedtls=n
CONFIG_PACKAGE_libopenssl=y
CONFIG_LUA_ECO_OPENSSL=y
CONFIG_LUA_ECO_MBEDTLS=n
CONFIG_OPENSSL_OPTIMIZE_SPEED=y

# LUCI Config
CONFIG_PACKAGE_luci=y
CONFIG_PACKAGE_luci-ssl-openssl=y
CONFIG_PACKAGE_wpad-mesh-openssl=y
CONFIG_PACKAGE_wpad-basic-mbedtls=n

# LUCI Applications
CONFIG_PACKAGE_luci-app-firewall=y
CONFIG_PACKAGE_luci-app-opkg=y
CONFIG_PACKAGE_luci-app-sqm=y
CONFIG_PACKAGE_luci-app-statistics=y
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
CONFIG_PACKAGE_luci-app-watchcat=y
CONFIG_PACKAGE_luci-proto-wireguard=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
CONFIG_PACKAGE_kmod-fs-vfat=y
CONFIG_PACKAGE_kmod-fs-f2fs=y
CONFIG_PACKAGE_kmod-fs-ntfs3=y
CONFIG_PACKAGE_kmod-nft-bridge=y
CONFIG_PACKAGE_kmod-usb-storage=y
CONFIG_PACKAGE_kmod-ramoops=y

# Additional packages
CONFIG_PACKAGE_iperf3=y
CONFIG_PACKAGE_htop=y
CONFIG_PACKAGE_curl=y
CONFIG_PACKAGE_rsync=y
CONFIG_PACKAGE_jq=y
CONFIG_PACKAGE_pigz=y
CONFIG_PACKAGE_tar=y
CONFIG_PACKAGE_tcpdump=y

CONFIG_HTOP_LMSENSORS=n

# Prevent opkg from adding custom feeds to /etc/opkg/distfeeds.conf
CONFIG_FEED_nss=n
CONFIG_FEED_sqm_scripts_nss=n
Loading

0 comments on commit 2b0e70a

Please sign in to comment.