Files
wlan-ap/patches/0044-ipq807x-add-512MB-profile.patch
John Crispin 9d13fc7330 ipq807x: add 512MB profile
This greatly improves the memory issues that we were seeing on QCA/AX.

Signed-off-by: John Crispin <john@phrozen.org>
2021-03-11 16:31:13 +01:00

58 lines
1.6 KiB
Diff

From a2ed0a77926c6fdca45677ee7698ceb04ab00eba Mon Sep 17 00:00:00 2001
From: John Crispin <john@phrozen.org>
Date: Wed, 3 Mar 2021 10:31:57 +0100
Subject: [PATCH] ipq807x: add 512MB profile
Signed-off-by: John Crispin <john@phrozen.org>
---
config/Config-kernel.in | 8 ++++++++
include/image.mk | 6 +++++-
2 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index eb61db542f..9197186b87 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -4,6 +4,14 @@
# See /LICENSE for more information.
#
+config KERNEL_IPQ_MEM_PROFILE
+ int "Different memory profile "
+ range 0 1024
+ default 0
+ 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 a13f37f886..1d11387ec7 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -178,6 +178,10 @@ ifeq ($(strip $(call kernel_patchver_ge,4.18.0)),1)
-Wno-unique_unit_address
endif
+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
@@ -187,7 +191,7 @@ define Image/BuildDTB
-I$(DTS_DIR) \
-I$(DTS_DIR)/include \
-I$(LINUX_DIR)/include/ \
- -undef -D__DTS__ $(3) \
+ -undef -D__DTS__ $(DTC_CFLAGS) $(3) \
-o $(2).tmp $(1)
$(LINUX_DIR)/scripts/dtc/dtc -O dtb \
-i$(dir $(1)) $(DTC_FLAGS) $(4) \
--
2.25.1