-
Notifications
You must be signed in to change notification settings - Fork 5
/
BoardConfig.mk
283 lines (235 loc) · 9.57 KB
/
BoardConfig.mk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# config.mk
#
# Product-specific compile-time definitions.
#
#Generate DTBO image
BOARD_KERNEL_SEPARATED_DTBO := true
### Dynamic partition Handling
ifneq ($(strip $(BOARD_DYNAMIC_PARTITION_ENABLE)),true)
BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472
#BOARD_ODMIMAGE_PARTITION_SIZE := 67108864
BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
TARGET_NO_RECOVERY := true
BOARD_USES_RECOVERY_AS_BOOT := true
else
# Define the Dynamic Partition sizes and groups.
ifeq ($(ENABLE_VIRTUAL_AB), true)
BOARD_SUPER_PARTITION_SIZE := 6442450944
else
BOARD_SUPER_PARTITION_SIZE := 12884901888
endif
BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6438256640
BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := vendor odm
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x06000000
BOARD_EXT4_SHARE_DUP_BLOCKS := true
ifeq ($(BOARD_KERNEL_SEPARATED_DTBO),true)
# Enable DTBO for recovery image
BOARD_INCLUDE_RECOVERY_DTBO := true
endif
endif
### Dynamic partition Handling
BOARD_SYSTEMSDK_VERSIONS:=$(SHIPPING_API_LEVEL)
TARGET_BOARD_PLATFORM := msmnile
TARGET_BOOTLOADER_BOARD_NAME := msmnile
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_ABI2 :=
TARGET_CPU_VARIANT := generic
TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := cortex-a9
TARGET_HW_DISK_ENCRYPTION := true
TARGET_HW_DISK_ENCRYPTION_PERF := true
BOARD_SECCOMP_POLICY := device/qcom/$(TARGET_BOARD_PLATFORM)/seccomp
TARGET_NO_BOOTLOADER := false
TARGET_USES_UEFI := true
TARGET_NO_KERNEL := false
-include vendor/qcom/prebuilt/msmnile/BoardConfigVendor.mk
-include $(QCPATH)/common/msmnile/BoardConfigVendor.mk
USE_OPENGL_RENDERER := true
BOARD_USE_LEGACY_UI := true
#Disable appended dtb
TARGET_KERNEL_APPEND_DTB := false
# Set Header version for bootimage
ifneq ($(strip $(TARGET_KERNEL_APPEND_DTB)),true)
#Enable dtb in boot image and Set Header version
BOARD_INCLUDE_DTB_IN_BOOTIMG := true
BOARD_BOOTIMG_HEADER_VERSION := 2
else
BOARD_BOOTIMG_HEADER_VERSION := 1
endif
BOARD_MKBOOTIMG_ARGS := --header_version $(BOARD_BOOTIMG_HEADER_VERSION)
# Defines for enabling A/B builds
#AB_OTA_UPDATER := true
# Full A/B partition update set
# AB_OTA_PARTITIONS := xbl rpm tz hyp pmic modem abl boot keymaster cmnlib cmnlib64 system bluetooth
# Minimum partition set for automation to test recovery generation code
# Packages generated by using just the below flag cannot be used for updating a device. You must pass
# in the full set mentioned above as part of your make commandline
#AB_OTA_PARTITIONS ?= boot vendor odm
BOARD_USES_METADATA_PARTITION := true
#Enable compilation of oem-extensions to recovery
#These need to be explicitly
ifneq ($(AB_OTA_UPDATER),true)
TARGET_RECOVERY_UPDATER_LIBS += librecovery_updater_msm
endif
#Enable split vendor image
ENABLE_VENDOR_IMAGE := true
ifeq ($(ENABLE_VENDOR_IMAGE), true)
ifneq ($(strip $(BOARD_DYNAMIC_PARTITION_ENABLE)),true)
TARGET_RECOVERY_FSTAB := device/qcom/msmnile/recovery_vendor_variant.fstab
else
TARGET_RECOVERY_FSTAB := device/qcom/msmnile/recovery_dynamic_partition.fstab
endif
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_VENDOR := vendor
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
TARGET_USERIMAGES_USE_EXT4 := true
else
TARGET_RECOVERY_FSTAB := device/qcom/msmnile/recovery.fstab
endif
TARGET_USERIMAGES_USE_EXT4 := true
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x06000000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 48318382080
BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
BOARD_METADATAIMAGE_PARTITION_SIZE := 16777216
BOARD_PREBUILT_DTBOIMAGE := out/target/product/msmnile/prebuilt_dtbo.img
BOARD_DTBOIMG_PARTITION_SIZE := 0x0800000
BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
#----------------------------------------------------------------------
# Compile Linux Kernel
#----------------------------------------------------------------------
KERNEL_DEFCONFIG := vendor/sm8150-perf_defconfig
BOARD_VENDOR_KERNEL_MODULES := \
$(KERNEL_MODULES_OUT)/audio_apr.ko \
$(KERNEL_MODULES_OUT)/audio_wglink.ko \
$(KERNEL_MODULES_OUT)/audio_q6_pdr.ko \
$(KERNEL_MODULES_OUT)/audio_q6_notifier.ko \
$(KERNEL_MODULES_OUT)/audio_adsp_loader.ko \
$(KERNEL_MODULES_OUT)/audio_q6.ko \
$(KERNEL_MODULES_OUT)/audio_usf.ko \
$(KERNEL_MODULES_OUT)/audio_pinctrl_wcd.ko \
$(KERNEL_MODULES_OUT)/audio_swr.ko \
$(KERNEL_MODULES_OUT)/audio_wcd_core.ko \
$(KERNEL_MODULES_OUT)/audio_swr_ctrl.ko \
$(KERNEL_MODULES_OUT)/audio_wsa881x.ko \
$(KERNEL_MODULES_OUT)/audio_platform.ko \
$(KERNEL_MODULES_OUT)/audio_hdmi.ko \
$(KERNEL_MODULES_OUT)/audio_stub.ko \
$(KERNEL_MODULES_OUT)/audio_wcd9xxx.ko \
$(KERNEL_MODULES_OUT)/audio_mbhc.ko \
$(KERNEL_MODULES_OUT)/audio_wcd934x.ko \
$(KERNEL_MODULES_OUT)/audio_wcd9360.ko \
$(KERNEL_MODULES_OUT)/audio_wcd_spi.ko \
$(KERNEL_MODULES_OUT)/audio_native.ko \
$(KERNEL_MODULES_OUT)/audio_machine_msmnile.ko \
$(KERNEL_MODULES_OUT)/wil6210.ko \
$(KERNEL_MODULES_OUT)/msm_11ad_proxy.ko \
$(KERNEL_MODULES_OUT)/mpq-adapter.ko \
$(KERNEL_MODULES_OUT)/mpq-dmx-hw-plugin.ko \
$(KERNEL_MODULES_OUT)/tspp.ko \
# install lkdtm only for userdebug and eng build variants
ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
ifeq (,$(findstring perf_defconfig, $(KERNEL_DEFCONFIG)))
BOARD_VENDOR_KERNEL_MODULES += $(KERNEL_MODULES_OUT)/lkdtm.ko
endif
endif
BOARD_DO_NOT_STRIP_VENDOR_MODULES := true
TARGET_USES_ION := true
TARGET_USES_NEW_ION_API :=true
TARGET_USES_QCOM_BSP := false
BOARD_KERNEL_CMDLINE := console=ttyMSM0,115200n8 earlycon=msm_geni_serial,0xa90000 androidboot.hardware=qcom androidboot.console=ttyMSM0 androidboot.memcg=1 lpm_levels.sleep_disabled=1 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 service_locator.enable=1 swiotlb=2048 loop.max_part=7 androidboot.usbcontroller=a600000.dwc3 kpti=off
BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive
BOARD_EGL_CFG := device/qcom/$(TARGET_BOARD_PLATFORM)/egl.cfg
BOARD_KERNEL_BASE := 0x00000000
BOARD_KERNEL_PAGESIZE := 4096
BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
BOARD_RAMDISK_OFFSET := 0x02000000
TARGET_KERNEL_ARCH := arm64
TARGET_KERNEL_HEADER_ARCH := arm64
TARGET_KERNEL_CROSS_COMPILE_PREFIX := $(shell pwd)/prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/aarch64-linux-androidkernel-
KERN_CONF_PATH := kernel/msm-4.14/arch/arm64/configs/vendor/
KERN_CONF_FILE := $(shell ls $(KERN_CONF_PATH) | grep sm8..._defconfig)
KERNEL_UNCOMPRESSED_DEFCONFIG := $(shell grep "CONFIG_BUILD_ARM64_UNCOMPRESSED_KERNEL=y" $(KERN_CONF_PATH)$(KERN_CONF_FILE))
ifeq ($(KERNEL_UNCOMPRESSED_DEFCONFIG),)
TARGET_USES_UNCOMPRESSED_KERNEL := false
else
TARGET_USES_UNCOMPRESSED_KERNEL := true
endif
MAX_EGL_CACHE_KEY_SIZE := 12*1024
MAX_EGL_CACHE_SIZE := 2048*1024
#File system for ODM
TARGET_COPY_OUT_ODM := vendor/odm
#BOARD_ODMIMAGE_FILE_SYSTEM_TYPE := ext4
BOARD_USES_GENERIC_AUDIO := true
TARGET_NO_RPC := true
TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/
TARGET_INIT_VENDOR_LIB := libinit_msm
TARGET_COMPILE_WITH_MSM_KERNEL := true
#Enable PD locater/notifier
TARGET_PD_SERVICE_ENABLED := true
#Enable peripheral manager
TARGET_PER_MGR_ENABLED := true
# Enable dex pre-opt to speed up initial boot
ifeq ($(HOST_OS),linux)
ifeq ($(WITH_DEXPREOPT),)
WITH_DEXPREOPT := true
WITH_DEXPREOPT_PIC := true
ifneq ($(TARGET_BUILD_VARIANT),user)
# Retain classes.dex in APK's for non-user builds
DEX_PREOPT_DEFAULT := nostripping
endif
endif
endif
TARGET_USES_GRALLOC1 := true
# Enable sensor multi HAL
USE_SENSOR_MULTI_HAL := true
#Add non-hlos files to ota packages
ADD_RADIO_FILES := true
#Enable INTERACTION_BOOST
TARGET_USES_INTERACTION_BOOST := true
#Enable DRM plugins 64 bit compilation
TARGET_ENABLE_MEDIADRM_64 := true
#----------------------------------------------------------------------
# wlan specific
#----------------------------------------------------------------------
ifeq ($(strip $(BOARD_HAS_QCOM_WLAN)),true)
include device/qcom/wlan/msmnile/BoardConfigWlan.mk
endif
ifeq ($(ENABLE_VENDOR_IMAGE), false)
$(error "Vendor Image is mandatory !!")
endif
BUILD_BROKEN_DUP_RULES := true
BUILD_BROKEN_PREBUILT_ELF_FILES := true
BUILD_BROKEN_NINJA_USES_ENV_VARS := SDCLANG_AE_CONFIG SDCLANG_CONFIG SDCLANG_SA_ENABLED SDCLANG_CONFIG_AOSP
BUILD_BROKEN_NINJA_USES_ENV_VARS += TEMPORARY_DISABLE_PATH_RESTRICTIONS
BUILD_BROKEN_NINJA_USES_ENV_VARS += RTIC_MPGEN
BUILD_BROKEN_PREBUILT_ELF_FILES := true
BUILD_BROKEN_USES_BUILD_HOST_SHARED_LIBRARY := true
BUILD_BROKEN_USES_BUILD_HOST_STATIC_LIBRARY := true
BUILD_BROKEN_USES_BUILD_HOST_EXECUTABLE := true
BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true
#Enable VNDK Compliance
BOARD_VNDK_VERSION:=current
Q_BU_DISABLE_MODULE := true
#################################################################################
# This is the End of BoardConfig.mk file.
# Now, Pickup other split Board.mk files:
#################################################################################
# TODO: Relocate the system Board.mk files pickup into qssi lunch, once it is up.
-include vendor/qcom/defs/board-defs/system/*.mk
-include vendor/qcom/defs/board-defs/vendor/*.mk
#################################################################################
include device/qcom/sepolicy_vndr/SEPolicy.mk
# Make sure custom sepolicy is only included once
ifneq ($(CUSTOM_POLICY_INCLUDED),true)
BOARD_SEPOLICY_DIRS += \
device/qcom/msmnile/sepolicy/vendor
CUSTOM_POLICY_INCLUDED := true
endif