forked from StatiXOS/android_device_google_gs101
-
Notifications
You must be signed in to change notification settings - Fork 2
/
BoardConfig-common.mk
412 lines (337 loc) · 12.5 KB
/
BoardConfig-common.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
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
#
# Copyright (C) 2019 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
include build/make/target/board/BoardConfigMainlineCommon.mk
include build/make/target/board/BoardConfigPixelCommon.mk
# Should be uncommented after fixing vndk-sp violation is fixed.
PRODUCT_FULL_TREBLE_OVERRIDE := true
# This prop, when set to 1, will prevent OTA tooling from generating a VABC OTA,
# even if device actually supports it.
# Remove this once P21 decides to use VABC OTA
BOARD_DONT_USE_VABC_OTA := true
# HACK : To fix up after bring up multimedia devices.
TARGET_SOC := gs101
TARGET_SOC_NAME := google
USES_DEVICE_GOOGLE_GS101 := true
TARGET_ARCH := arm64
TARGET_ARCH_VARIANT := armv8-2a
TARGET_CPU_ABI := arm64-v8a
TARGET_CPU_VARIANT := cortex-a55
TARGET_CPU_VARIANT_RUNTIME := cortex-a55
ifeq (,$(filter %_64,$(TARGET_PRODUCT)))
TARGET_2ND_ARCH := arm
TARGET_2ND_ARCH_VARIANT := armv8-a
TARGET_2ND_CPU_ABI := armeabi-v7a
TARGET_2ND_CPU_ABI2 := armeabi
TARGET_2ND_CPU_VARIANT := generic
TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a53
endif
BOARD_KERNEL_CMDLINE += earlycon=exynos4210,0x10A00000 console=ttySAC0,115200 androidboot.console=ttySAC0 printk.devkmsg=on
BOARD_KERNEL_CMDLINE += cma_sysfs.experimental=Y
BOARD_KERNEL_CMDLINE += stack_depot_disable=off page_pinner=on
BOARD_BOOTCONFIG += androidboot.boot_devices=14700000.ufs
TARGET_NO_BOOTLOADER := true
TARGET_NO_RADIOIMAGE := true
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
BOARD_PREBUILT_BOOTIMAGE := $(wildcard $(TARGET_KERNEL_DIR)/boot.img)
else
BOARD_PREBUILT_BOOTIMAGE := $(wildcard $(TARGET_KERNEL_DIR)/boot-user.img)
endif
ifneq (,$(BOARD_PREBUILT_BOOTIMAGE))
TARGET_NO_KERNEL := true
else
TARGET_NO_KERNEL := false
endif
BOARD_USES_GENERIC_KERNEL_IMAGE := true
BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := true
BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT := true
TARGET_RECOVERY_WIPE := device/google/gs101/conf/recovery.wipe
# This is the fstab file that will be included in the recovery image. Note that
# recovery doesn't care about the encryption settings, so it doesn't matter
# whether we use the normal or the fips fstab here.
#
# Since this is a generated file, it's necessary to use intermediates-dir-for in
# order to refer to it correctly. And since intermediates-dir-for isn't defined
# yet when this file is included, it's necessary to use a deferred variable
# assignment ( = ) rather than an immediate variable assignment ( := ).
TARGET_RECOVERY_FSTAB = $(call intermediates-dir-for,ETC,fstab.gs101)/fstab.gs101
TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888
TARGET_RECOVERY_UI_MARGIN_HEIGHT := 165
TARGET_RECOVERY_UI_LIB := \
librecovery_ui_pixel \
libfstab
AB_OTA_UPDATER := true
AB_OTA_PARTITIONS += \
system \
system_ext \
product \
vbmeta_system
ifneq ($(PRODUCT_BUILD_BOOT_IMAGE),false)
AB_OTA_PARTITIONS += boot
endif
ifneq ($(PRODUCT_BUILD_VENDOR_BOOT_IMAGE),false)
AB_OTA_PARTITIONS += vendor_boot
AB_OTA_PARTITIONS += dtbo
endif
ifneq ($(PRODUCT_BUILD_VBMETA_IMAGE),false)
AB_OTA_PARTITIONS += vbmeta
endif
# EMULATOR common modules
BOARD_EMULATOR_COMMON_MODULES := liblight
OVERRIDE_RS_DRIVER := libRSDriverArm.so
BOARD_EGL_CFG := device/google/gs101/conf/egl.cfg
#BOARD_USES_HGL := true
USE_OPENGL_RENDERER := true
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
BOARD_USES_EXYNOS5_COMMON_GRALLOC := true
BOARD_USES_ALIGN_RESTRICTION := false
BOARD_USES_GRALLOC_ION_SYNC := true
# This should be the same value as USE_SWIFTSHADER in device.mk
BOARD_USES_SWIFTSHADER := false
# Gralloc4
SOONG_CONFIG_NAMESPACES += arm_gralloc
SOONG_CONFIG_arm_gralloc := \
gralloc_arm_no_external_afbc \
mali_gpu_support_afbc_basic \
mali_gpu_support_afbc_wideblk \
gralloc_init_afbc \
gralloc_ion_sync_on_lock \
dpu_support_1010102_afbc
ifeq ($(BOARD_USES_SWIFTSHADER),true)
SOONG_CONFIG_arm_gralloc_gralloc_arm_no_external_afbc := true
SOONG_CONFIG_arm_gralloc_mali_gpu_support_afbc_basic := false
SOONG_CONFIG_arm_gralloc_mali_gpu_support_afbc_wideblk := false
SOONG_CONFIG_arm_gralloc_gralloc_init_afbc := false
SOONG_CONFIG_arm_gralloc_dpu_support_1010102_afbc := false
else
SOONG_CONFIG_arm_gralloc_gralloc_arm_no_external_afbc := false
SOONG_CONFIG_arm_gralloc_mali_gpu_support_afbc_basic := true
SOONG_CONFIG_arm_gralloc_mali_gpu_support_afbc_wideblk := true
SOONG_CONFIG_arm_gralloc_gralloc_init_afbc := true
SOONG_CONFIG_arm_gralloc_dpu_support_1010102_afbc := true
endif # ifeq ($(BOARD_USES_SWIFTSHADER),true)
SOONG_CONFIG_arm_gralloc_gralloc_ion_sync_on_lock := $(BOARD_USES_GRALLOC_ION_SYNC)
# Graphics
#BOARD_USES_EXYNOS_DATASPACE_FEATURE := true
# Enable chain partition for system.
BOARD_AVB_VBMETA_SYSTEM := system system_ext product
BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
# Enable chained vbmeta for boot images
BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA2048
BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USERIMAGES_USE_F2FS := true
PRODUCT_FS_COMPRESSION := 1
BOARD_FLASH_BLOCK_SIZE := 4096
BOARD_MOUNT_SDCARD_RW := true
# product.img
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_PRODUCT := product
# system_ext.img
BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
TARGET_COPY_OUT_SYSTEM_EXT := system_ext
########################
# Video Codec
########################
# 1. Exynos C2
BOARD_USE_CSC_FILTER := false
BOARD_USE_DEC_SW_CSC := true
BOARD_USE_ENC_SW_CSC := true
BOARD_SUPPORT_MFC_ENC_RGB := true
BOARD_USE_BLOB_ALLOCATOR := false
########################
BOARD_SUPER_PARTITION_SIZE := 8531214336
BOARD_SUPER_PARTITION_GROUPS := google_dynamic_partitions
# Set size to BOARD_SUPER_PARTITION_SIZE - overhead (4MiB) (b/182237294)
BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 8527020032
BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST := \
system \
system_ext \
product \
vendor \
vendor_dlkm
# Set error limit to BOARD_SUPER_PARTITON_SIZE - 500MB
BOARD_SUPER_PARTITION_ERROR_LIMIT := 8006926336
#
# AUDIO & VOICE
#
BOARD_USES_GENERIC_AUDIO := true
SOONG_CONFIG_NAMESPACES += aoc_audio_func
SOONG_CONFIG_aoc_audio_func += \
ext_hidl
SOONG_CONFIG_aoc_audio_func_ext_hidl := true
ifneq (,$(filter eng, $(TARGET_BUILD_VARIANT)))
SOONG_CONFIG_aoc_audio_func += \
dump_usecase_data \
hal_socket_control \
record_tunning_keys
SOONG_CONFIG_aoc_audio_func_dump_usecase_data := true
SOONG_CONFIG_aoc_audio_func_hal_socket_control := true
SOONG_CONFIG_aoc_audio_func_record_tunning_keys := true
endif
ifneq (,$(filter aosp_%,$(TARGET_PRODUCT)))
SOONG_CONFIG_aoc_audio_func += aosp_build
SOONG_CONFIG_aoc_audio_func_aosp_build := true
endif
# Primary AudioHAL Configuration
#BOARD_USE_COMMON_AUDIOHAL := true
#BOARD_USE_CALLIOPE_AUDIOHAL := false
#BOARD_USE_AUDIOHAL := true
# Compress Offload Configuration
#BOARD_USE_OFFLOAD_AUDIO := true
#BOARD_USE_OFFLOAD_EFFECT := false
# SoundTriggerHAL Configuration
#BOARD_USE_SOUNDTRIGGER_HAL := false
# HWComposer
BOARD_HWC_VERSION := libhwc2.1
TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK := false
BOARD_HDMI_INCAPABLE := true
TARGET_USES_HWC2 := true
HWC_SKIP_VALIDATE := true
HWC_SUPPORT_RENDER_INTENT := true
HWC_SUPPORT_COLOR_TRANSFORM := true
#BOARD_USES_DISPLAYPORT := true
# if AFBC is enabled, must set ro.vendor.ddk.set.afbc=1
BOARD_USES_EXYNOS_AFBC_FEATURE := true
#BOARD_USES_HDRUI_GLES_CONVERSION := true
BOARD_LIBACRYL_DEFAULT_COMPOSITOR := fimg2d_gs101
BOARD_LIBACRYL_G2D_HDR_PLUGIN := libacryl_hdr_plugin
# HWCServices
BOARD_USES_HWC_SERVICES := true
# WiFiDisplay
# BOARD_USES_VIRTUAL_DISPLAY := true
# BOARD_USES_VDS_EXYNOS_HWC := true
# BOARD_USES_WIFI_DISPLAY:= true
# BOARD_USES_EGL_SURFACE_FOR_COMPOSITION_MIXED := true
# BOARD_USES_VDS_YUV420SPM := true
# BOARD_USES_VDS_OTHERFORMAT := true
# BOARD_USES_VDS_DEBUG_FLAG := true
# BOARD_USES_DISABLE_COMPOSITIONTYPE_GLES := true
# BOARD_USES_SECURE_ENCODER_ONLY := true
# BOARD_USES_TSMUX := true
# SCALER
BOARD_USES_DEFAULT_CSC_HW_SCALER := true
BOARD_DEFAULT_CSC_HW_SCALER := 4
BOARD_USES_SCALER_M2M1SHOT := true
# Device Tree
BOARD_USES_DT := true
BOARD_INCLUDE_DTB_IN_BOOTIMG := true
BOARD_PREBUILT_DTBIMAGE_DIR := $(TARGET_KERNEL_DIR)
BOARD_PREBUILT_DTBOIMAGE := $(BOARD_PREBUILT_DTBIMAGE_DIR)/dtbo.img
# PLATFORM LOG
TARGET_USES_LOGD := true
# LIBHWJPEG
#TARGET_USES_UNIVERSAL_LIBHWJPEG := true
#LIBHWJPEG_HWSCALER_ID := 0
#Keymaster
#BOARD_USES_KEYMASTER_VER1 := true
#FMP
#BOARD_USES_FMP_DM_CRYPT := true
#BOARD_USES_FMP_FSCRYPTO := true
BOARD_USES_METADATA_PARTITION := true
# SKIA
#BOARD_USES_SKIA_MULTITHREADING := true
#BOARD_USES_FIMGAPI_V5X := true
# SECCOMP Policy
BOARD_SECCOMP_POLICY = device/google/gs101/seccomp_policy
#CURL
BOARD_USES_CURL := true
# Sensor HAL
BOARD_USES_EXYNOS_SENSORS_DUMMY := true
# VISION
# Exynos vision framework (EVF)
#TARGET_USES_EVF := true
# HW acceleration
#TARGET_USES_VPU_KERNEL := true
#TARGET_USES_SCORE_KERNEL := true
#TARGET_USES_CL_KERNEL := false
# exynos RIL
TARGET_EXYNOS_RIL_SOURCE := true
ENABLE_VENDOR_RIL_SERVICE := true
# GNSS
# BOARD_USES_EXYNOS_GNSS_DUMMY := true
# Bluetooth defines
# TODO(b/123695868): Remove the need for this
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := \
build/make/target/board/mainline_arm64/bluetooth
#VNDK
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
BOARD_VNDK_VERSION := current
# H/W align restriction of MM IPs
BOARD_EXYNOS_S10B_FORMAT_ALIGN := 64
# WiFi
BOARD_WLAN_DEVICE := bcmdhd
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
WPA_SUPPLICANT_VERSION := VER_0_8_X
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_HOSTAPD_DRIVER := NL80211
# Wifi interface combination - {1 STA + 1 AP (bridged or single)} or {1 STA + 1 P2P}
# or {1 STA + 1 NAN} or {2 STA}
WIFI_HAL_INTERFACE_COMBINATIONS := {{{STA}, 1}, {{P2P, NAN, AP}, 1}}, {{{STA}, 2}}
WIFI_FEATURE_WIFI_EXT_HAL := true
WIFI_FEATURE_IMU_DETECTION := true
# Avoid Wifi reset on MAC Address change
WIFI_AVOID_IFACE_RESET_MAC_CHANGE := true
WIFI_FEATURE_HOSTAPD_11AX := true
# NeuralNetworks
ARMNN_COMPUTE_CL_ENABLE := 1
ARMNN_COMPUTE_NEON_ENABLE := 1
# Boot.img
BOARD_RAMDISK_USE_LZ4 := true
#BOARD_KERNEL_BASE := 0x80000000
#BOARD_KERNEL_PAGESIZE := 2048
#BOARD_KERNEL_OFFSET := 0x80000
#BOARD_RAMDISK_OFFSET := 0x4000000
BOARD_BOOT_HEADER_VERSION := 4
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
BOARD_VENDOR_RAMDISK_FRAGMENTS := dlkm
BOARD_VENDOR_RAMDISK_FRAGMENT.dlkm.KERNEL_MODULE_DIRS := top
# Enable AVB2.0
BOARD_AVB_ENABLE := true
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 0x04000000
BOARD_DTBOIMG_PARTITION_SIZE := 0x01000000
# System As Root
BOARD_BUILD_SYSTEM_ROOT_IMAGE := false
# Vendor ramdisk image for kernel development
BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true
BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := device/google/gs101/vendor_dlkm.blocklist
KERNEL_MODULE_DIR := $(TARGET_KERNEL_DIR)
KERNEL_MODULES := $(wildcard $(KERNEL_MODULE_DIR)/*.ko)
BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_MODULE_DIR)/vendor_boot.modules.load))
ifndef BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD
$(error vendor_boot.modules.load not found or empty)
endif
BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(addprefix $(KERNEL_MODULE_DIR)/, $(notdir $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD)))
BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_MODULE_DIR)/vendor_dlkm.modules.load))
ifndef BOARD_VENDOR_KERNEL_MODULES_LOAD
$(error vendor_dlkm.modules.load not found or empty)
endif
BOARD_VENDOR_KERNEL_MODULES := $(KERNEL_MODULES)
# Using BUILD_COPY_HEADERS
BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true
include device/google/gs101-sepolicy/gs101-sepolicy.mk
# Battery options
BOARD_KERNEL_CMDLINE += at24.write_timeout=100
# Enable larger logbuf
BOARD_KERNEL_CMDLINE += log_buf_len=1024K
include device/google/gs101/BoardConfigLineage.mk
-include vendor/google_devices/gs101/proprietary/BoardConfigVendor.mk