mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-11-01 10:57:47 +00:00
Adds build system support for Qualcomm SDK kernels, enabling builds with vendor-specific kernel versions. New patch for 24.10. Signed-off-by: John Crispin <john@phrozen.org>
163 lines
5.9 KiB
Diff
163 lines
5.9 KiB
Diff
From 68acfdabcc56141b01c0d94e8578dc8b25988ec4 Mon Sep 17 00:00:00 2001
|
|
From: John Crispin <john@phrozen.org>
|
|
Date: Fri, 1 Aug 2025 11:47:07 +0200
|
|
Subject: [PATCH 06/55] include: add support for QSDK kernels
|
|
|
|
Adds build system support for Qualcomm SDK kernels, enabling builds with vendor-specific kernel versions.
|
|
|
|
Signed-off-by: John Crispin <john@phrozen.org>
|
|
---
|
|
config/Config-images.in | 4 ++++
|
|
config/Config-kernel.in | 9 +++++++++
|
|
include/image.mk | 6 +++++-
|
|
include/kernel.mk | 4 ++--
|
|
include/target.mk | 12 ++++++++++++
|
|
package/kernel/linux/modules/netfilter.mk | 2 ++
|
|
package/kernel/linux/modules/netsupport.mk | 5 +++--
|
|
7 files changed, 37 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/config/Config-images.in b/config/Config-images.in
|
|
index 47f3dfc0d9..6b8e682589 100644
|
|
--- a/config/Config-images.in
|
|
+++ b/config/Config-images.in
|
|
@@ -19,6 +19,11 @@ menu "Target Images"
|
|
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
|
|
default TARGET_INITRAMFS_COMPRESSION_ZSTD if TARGET_qualcommax
|
|
default TARGET_INITRAMFS_COMPRESSION_XZ if USES_SEPARATE_INITRAMFS
|
|
+ default TARGET_INITRAMFS_COMPRESSION_GZIP if TARGET_ipq807x
|
|
+ default TARGET_INITRAMFS_COMPRESSION_GZIP if TARGET_ipq60xx
|
|
+ default TARGET_INITRAMFS_COMPRESSION_GZIP if TARGET_ipq50xx
|
|
+ default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ipq95xx
|
|
+ default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ipq53xx
|
|
default TARGET_INITRAMFS_COMPRESSION_NONE
|
|
depends on TARGET_ROOTFS_INITRAMFS
|
|
help
|
|
diff --git a/config/Config-kernel.in b/config/Config-kernel.in
|
|
index 64c8c63466..da2dcf16bf 100644
|
|
--- a/config/Config-kernel.in
|
|
+++ b/config/Config-kernel.in
|
|
@@ -2,6 +2,15 @@
|
|
#
|
|
# Copyright (C) 2006-2014 OpenWrt.org
|
|
|
|
+config KERNEL_IPQ_MEM_PROFILE
|
|
+ int "Different memory profile "
|
|
+ range 0 1024
|
|
+ default 512
|
|
+ depends on TARGET_ipq807x || TARGET_ipq60xx || TARGET_ipq50xx || TARGET_ipq95xx || TARGET_ipq53xx
|
|
+ help
|
|
+ This option select memory profile to be used,which defines
|
|
+ the reserved memory configuration used in device tree.
|
|
+
|
|
config KERNEL_BUILD_USER
|
|
string "Custom Kernel Build User Name"
|
|
default "builder" if BUILDBOT
|
|
diff --git a/include/image.mk b/include/image.mk
|
|
index 6408719bdc..e449aaa6ad 100644
|
|
--- a/include/image.mk
|
|
+++ b/include/image.mk
|
|
@@ -205,6 +205,10 @@ define Image/pad-root-squashfs
|
|
$(call Image/pad-to,$(KDIR)/root.squashfs,$(if $(1),$(1),$(ROOTFS_PARTSIZE)))
|
|
endef
|
|
|
|
+ifeq ($(CONFIG_IPQ_MEM_PROFILE),512)
|
|
+DTC_CFLAGS = -D __IPQ_MEM_PROFILE_512_MB__
|
|
+endif
|
|
+
|
|
# $(1) source dts file
|
|
# $(2) target dtb file
|
|
# $(3) extra CPP flags
|
|
@@ -216,7 +220,7 @@ define Image/BuildDTB/sub
|
|
-I$(DTS_DIR)/include \
|
|
-I$(LINUX_DIR)/include/ \
|
|
-I$(LINUX_DIR)/scripts/dtc/include-prefixes \
|
|
- -undef -D__DTS__ $(3) \
|
|
+ -undef -D__DTS__ $(DTC_CFLAGS) $(3) \
|
|
-o $(2).tmp $(1)
|
|
$(LINUX_DIR)/scripts/dtc/dtc -O dtb \
|
|
-i$(dir $(1)) $(4) \
|
|
diff --git a/include/kernel.mk b/include/kernel.mk
|
|
index 6ef766388a..842925aeb9 100644
|
|
--- a/include/kernel.mk
|
|
+++ b/include/kernel.mk
|
|
@@ -44,7 +44,7 @@ else
|
|
FILES_DIR ?= $(foreach dir,$(wildcard $(CURDIR)/files $(CURDIR)/files-$(KERNEL_PATCHVER)),"$(dir)")
|
|
endif
|
|
KERNEL_BUILD_DIR ?= $(BUILD_DIR)/linux-$(BOARD)_$(SUBTARGET)
|
|
- LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
|
|
+ LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)$(KERNEL_NAME_SUFFIX)
|
|
LINUX_UAPI_DIR=uapi/
|
|
LINUX_VERMAGIC:=$(strip $(shell cat $(LINUX_DIR)/.vermagic 2>/dev/null))
|
|
LINUX_VERMAGIC:=$(if $(LINUX_VERMAGIC),$(LINUX_VERMAGIC),unknown)
|
|
@@ -59,7 +59,7 @@ else
|
|
ifneq (,$(findstring -rc,$(LINUX_VERSION)))
|
|
LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.gz
|
|
else
|
|
- LINUX_SOURCE:=linux-$(LINUX_VERSION).tar.xz
|
|
+ LINUX_SOURCE:=linux-$(LINUX_VERSION)$(KERNEL_NAME_SUFFIX).tar.xz
|
|
endif
|
|
|
|
ifneq (,$(findstring -rc,$(LINUX_VERSION)))
|
|
diff --git a/include/target.mk b/include/target.mk
|
|
index 9b10db8d2f..e5f45714bf 100644
|
|
--- a/include/target.mk
|
|
+++ b/include/target.mk
|
|
@@ -59,6 +59,18 @@ DEFAULT_PACKAGES.router:=\
|
|
ppp \
|
|
ppp-mod-pppoe
|
|
|
|
+DEFAULT_PACKAGES.qsdk:=\
|
|
+ dnsmasq \
|
|
+ firewall \
|
|
+ ip6tables \
|
|
+ iptables \
|
|
+ kmod-ipt-offload \
|
|
+ odhcp6c \
|
|
+ odhcpd-ipv6only \
|
|
+ ppp \
|
|
+ ppp-mod-pppoe \
|
|
+ -procd-ujail
|
|
+
|
|
ifneq ($(DUMP),)
|
|
all: dumpinfo
|
|
endif
|
|
diff --git a/package/kernel/linux/modules/netfilter.mk b/package/kernel/linux/modules/netfilter.mk
|
|
index 96531b1e08..0db0569de4 100644
|
|
--- a/package/kernel/linux/modules/netfilter.mk
|
|
+++ b/package/kernel/linux/modules/netfilter.mk
|
|
@@ -1210,6 +1210,8 @@ define KernelPackage/nft-offload
|
|
DEPENDS:=@IPV6 +kmod-nf-flow +kmod-nft-nat
|
|
KCONFIG:= \
|
|
CONFIG_NF_FLOW_TABLE_INET \
|
|
+ CONFIG_NF_FLOW_TABLE_IPV4 \
|
|
+ CONFIG_NF_FLOW_TABLE_IPV6 \
|
|
CONFIG_NFT_FLOW_OFFLOAD
|
|
FILES:= \
|
|
$(LINUX_DIR)/net/netfilter/nf_flow_table_inet.ko \
|
|
diff --git a/package/kernel/linux/modules/netsupport.mk b/package/kernel/linux/modules/netsupport.mk
|
|
index 06ef823280..8c058fb260 100644
|
|
--- a/package/kernel/linux/modules/netsupport.mk
|
|
+++ b/package/kernel/linux/modules/netsupport.mk
|
|
@@ -111,7 +111,8 @@ define KernelPackage/vxlan
|
|
+IPV6:kmod-udptunnel6
|
|
KCONFIG:=CONFIG_VXLAN
|
|
FILES:= \
|
|
- $(LINUX_DIR)/drivers/net/vxlan/vxlan.ko
|
|
+ $(LINUX_DIR)/drivers/net/vxlan/vxlan.ko@ge5.5 \
|
|
+ $(LINUX_DIR)/drivers/net/vxlan.ko@le5.4
|
|
AUTOLOAD:=$(call AutoLoad,13,vxlan)
|
|
endef
|
|
|
|
@@ -1026,7 +1027,7 @@ endef
|
|
$(eval $(call KernelPackage,bpf-test))
|
|
|
|
|
|
-SCHED_MODULES_EXTRA = sch_codel sch_gred sch_multiq sch_sfq sch_teql sch_fq sch_ets act_pedit act_simple act_skbmod act_csum em_cmp em_nbyte em_meta em_text
|
|
+SCHED_MODULES_EXTRA = sch_codel sch_gred sch_multiq sch_sfq sch_teql sch_fq sch_ets@ge5.5 act_pedit act_simple act_skbmod act_csum em_cmp em_nbyte em_meta em_text
|
|
SCHED_FILES_EXTRA = $(foreach mod,$(SCHED_MODULES_EXTRA),$(LINUX_DIR)/net/sched/$(mod).ko)
|
|
|
|
define KernelPackage/sched
|
|
--
|
|
2.34.1
|
|
|