blob: 90cfcdb8260cb3b208b3c40693ce2a2199e6c50a [file] [log] [blame]
Aparna Mallavarapu01fc3352015-01-19 21:06:16 +05301# top level project rules for the MSM8952 project
2#
3LOCAL_DIR := $(GET_LOCAL_DIR)
4
5TARGET := msm8952
6
7MODULES += app/aboot
8
9ifeq ($(TARGET_BUILD_VARIANT),user)
10DEBUG := 0
11else
12DEBUG := 1
13endif
14
15EMMC_BOOT := 1
Parth Dixit5b954e02015-10-17 22:20:31 +053016
lijuang3dcb6fe2018-03-26 19:26:57 +080017ifeq ($(ENABLE_DISPLAY),1)
18DEFINES += ENABLE_DISPLAY=1
19DEFINES += DISPLAY_SPLASH_SCREEN=1
20endif
Parth Dixitf039d6e2015-10-08 15:01:04 +053021
Parth Dixit6e6bad52015-07-30 19:02:38 +053022ENABLE_SECAPP_LOADER := 1
23ENABLE_RPMB_SUPPORT := 1
Monika Singh851f3862018-04-19 10:27:26 +053024
25ifeq ($(VERIFIED_BOOT),1)
26ENABLE_MDTP_SUPPORT := 1
Parth Dixit5b954e02015-10-17 22:20:31 +053027#enable fbcon display menu
Parth Dixit550ddf32016-11-28 17:00:29 +053028ifneq (,$(findstring DISPLAY_SPLASH_SCREEN,$(DEFINES)))
Parth Dixit5b954e02015-10-17 22:20:31 +053029ENABLE_FBCON_DISPLAY_MSG := 1
Parth Dixit550ddf32016-11-28 17:00:29 +053030else
31ENABLE_FBCON_DISPLAY_MSG := 0
32endif #DISPLAY_SPLASH_SCREEN END
Parth Dixit550ddf32016-11-28 17:00:29 +053033endif #VERIFIED_BOOT
Parth Dixit5b954e02015-10-17 22:20:31 +053034
Monika Singh851f3862018-04-19 10:27:26 +053035ifeq ($(VERIFIED_BOOT_2),1)
36ifneq (,$(findstring DISPLAY_SPLASH_SCREEN,$(DEFINES)))
37#enable fbcon display menu
38 ENABLE_FBCON_DISPLAY_MSG := 1
39endif
40endif
Aparna Mallavarapu01fc3352015-01-19 21:06:16 +053041
Mohamed Sunfeer5db44f52018-08-27 19:10:54 +053042#Enable below flag to compile cmnlib64
43DEFINES += ENABLE_CMNLIB64_LOADING=1
44
Aparna Mallavarapu0c357fb2015-04-01 01:58:39 +053045ENABLE_SMD_SUPPORT := 1
Lei Chen2c11b462018-04-11 18:42:37 +080046ENABLE_PWM_SUPPORT := true
Aparna Mallavarapu01fc3352015-01-19 21:06:16 +053047
48#DEFINES += WITH_DEBUG_DCC=1
49DEFINES += WITH_DEBUG_LOG_BUF=1
50DEFINES += WITH_DEBUG_UART=1
51#DEFINES += WITH_DEBUG_FBCON=1
52DEFINES += DEVICE_TREE=1
53#DEFINES += MMC_BOOT_BAM=1
Aparna Mallavarapu96cc3352015-03-30 00:48:42 +053054DEFINES += CRYPTO_BAM=1
Aparna Mallavarapu01fc3352015-01-19 21:06:16 +053055DEFINES += SPMI_CORE_V2=1
56DEFINES += ABOOT_IGNORE_BOOT_HEADER_ADDRS=1
Parth Dixit652296c2016-02-23 10:57:04 +053057DEFINES += TARGET_MAX_WLED_STRINGS=2
Aparna Mallavarapu01fc3352015-01-19 21:06:16 +053058
Aparna Mallavarapu96cc3352015-03-30 00:48:42 +053059DEFINES += BAM_V170=1
Aparna Mallavarapu01fc3352015-01-19 21:06:16 +053060
61#Enable the feature of long press power on
Aparna Mallavarapueef02d72015-04-11 04:02:55 +053062DEFINES += LONG_PRESS_POWER_ON=1
Parth Dixit5b954e02015-10-17 22:20:31 +053063
64ifeq ($(ENABLE_RPMB_SUPPORT),1)
Parth Dixit6e6bad52015-07-30 19:02:38 +053065DEFINES += USE_RPMB_FOR_DEVINFO=1
Parth Dixit5b954e02015-10-17 22:20:31 +053066endif
Aparna Mallavarapu01fc3352015-01-19 21:06:16 +053067
68#Disable thumb mode
69ENABLE_THUMB := false
70
Aparna Mallavarapu19cf0a72015-03-26 05:57:55 +053071ENABLE_SDHCI_SUPPORT := 1
Aparna Mallavarapu01fc3352015-01-19 21:06:16 +053072
73ifeq ($(ENABLE_SDHCI_SUPPORT),1)
74DEFINES += MMC_SDHCI_SUPPORT=1
75endif
76
Parth Dixit5b954e02015-10-17 22:20:31 +053077
Parth Dixitca8cb792015-08-05 15:35:01 +053078
79ifeq ($(ENABLE_FBCON_DISPLAY_MSG),1)
80DEFINES += FBCON_DISPLAY_MSG=1
81endif
82
Aparna Mallavarapu01fc3352015-01-19 21:06:16 +053083#enable power on vibrator feature
Matthew Qina847a6c2015-06-24 13:47:03 +080084ENABLE_HAP_VIB_SUPPORT := true
Aparna Mallavarapu01fc3352015-01-19 21:06:16 +053085
86ifeq ($(EMMC_BOOT),1)
87DEFINES += _EMMC_BOOT=1
88endif
89
90ifeq ($(ENABLE_PON_VIB_SUPPORT),true)
91DEFINES += PON_VIB_SUPPORT=1
92endif
93
Matthew Qina847a6c2015-06-24 13:47:03 +080094ifeq ($(ENABLE_HAP_VIB_SUPPORT),true)
95DEFINES += PON_VIB_SUPPORT=1
96endif
97
Aparna Mallavarapu01fc3352015-01-19 21:06:16 +053098ifeq ($(ENABLE_SMD_SUPPORT),1)
99DEFINES += SMD_SUPPORT=1
100endif
101
Umang Chhedaeb221392019-11-15 11:19:16 +0530102#Enable Weak battery charging feature
103ENABLE_WEAK_BATT_CHRG_SUPPORT := 1
104
105ifeq ($(ENABLE_WEAK_BATT_CHRG_SUPPORT),1)
Umang Chheda4c140de2019-12-19 14:30:38 +0530106DEFINES += ENABLE_WBC=1
Umang Chhedaeb221392019-11-15 11:19:16 +0530107DEFINES += LK_BATT_VOLT_THRESHOLD=3400000
108endif
Rami Burstein19aedbc2015-06-09 15:25:34 +0300109
Rami Butsteine51318a2015-05-27 16:23:17 +0300110ifeq ($(ENABLE_MDTP_SUPPORT),1)
111DEFINES += MDTP_SUPPORT=1
Rami Butsteine51318a2015-05-27 16:23:17 +0300112endif
113
lijuangc8d186a2016-01-21 17:24:54 +0800114#Disable the dload mode
115DEFINES += DISABLE_DLOAD_MODE=0
116
Aparna Mallavarapu1567fec2015-07-03 16:33:29 +0530117ENABLE_WDOG_SUPPORT := 0
Aparna Mallavarapu59914502015-06-01 15:31:28 +0530118ifeq ($(ENABLE_WDOG_SUPPORT),1)
119DEFINES += WDOG_SUPPORT=1
120endif
121
Parth Dixit17b85192016-12-28 15:51:33 +0530122ifeq ($(APPEND_CMDLINE),1)
123DEFINES += _APPEND_CMDLINE=1
124endif
125
Aparna Mallavarapu01fc3352015-01-19 21:06:16 +0530126#SCM call before entering DLOAD mode
127DEFINES += PLATFORM_USE_SCM_DLOAD=1
Aparna Mallavarapueef02d72015-04-11 04:02:55 +0530128
129CFLAGS += -Werror
Aparna Mallavarapu330b9342015-05-06 06:46:02 +0530130
c_wufeng40ef4372015-12-15 16:53:40 +0800131#enable user force reset feature
132DEFINES += USER_FORCE_RESET_SUPPORT=1
133
Aparna Mallavarapu330b9342015-05-06 06:46:02 +0530134DEFINES += USE_TARGET_HS200_DELAY=1
lijuang36ffff92015-08-29 16:39:49 +0800135
136#enable battery voltage check
137DEFINES += CHECK_BAT_VOLTAGE=1
Maria Yu3ce8b632018-03-23 13:26:31 +0530138
139#Use PON register for reboot reason
140ENABLE_REBOOT_MODULE := 1
141DEFINES += USE_PON_REBOOT_REG=1