From a2ed0a77926c6fdca45677ee7698ceb04ab00eba Mon Sep 17 00:00:00 2001 From: John Crispin Date: Wed, 3 Mar 2021 10:31:57 +0100 Subject: [PATCH] ipq807x: add 512MB profile Signed-off-by: John Crispin --- 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