blob: 0d67432e4583f4df9a287ca0296f3a68f087f5dc [file] [log] [blame]
Robin Pengc2b5ca92021-02-23 20:00:28 +08001#
2# Copyright (C) 2019 The Android Open-Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16include build/make/target/board/BoardConfigMainlineCommon.mk
Tianjiea76d1042021-03-12 11:42:05 -080017include build/make/target/board/BoardConfigPixelCommon.mk
Robin Pengc2b5ca92021-02-23 20:00:28 +080018
19# Should be uncommented after fixing vndk-sp violation is fixed.
20PRODUCT_FULL_TREBLE_OVERRIDE := true
21
Kelvin Zhanga8fdc572021-06-10 14:07:40 -040022# This prop, when set to 1, will prevent OTA tooling from generating a VABC OTA,
23# even if device actually supports it.
24# Remove this once P21 decides to use VABC OTA
25BOARD_DONT_USE_VABC_OTA := true
26
Robin Pengc2b5ca92021-02-23 20:00:28 +080027# HACK : To fix up after bring up multimedia devices.
28TARGET_SOC := gs101
29
30TARGET_SOC_NAME := google
31
32USES_DEVICE_GOOGLE_GS101 := true
33
34TARGET_ARCH := arm64
Philip Cuadra0111d392021-06-03 10:25:34 -070035TARGET_ARCH_VARIANT := armv8-2a
Robin Pengc2b5ca92021-02-23 20:00:28 +080036TARGET_CPU_ABI := arm64-v8a
Philip Cuadra0111d392021-06-03 10:25:34 -070037TARGET_CPU_VARIANT := cortex-a55
38TARGET_CPU_VARIANT_RUNTIME := cortex-a55
Robin Pengc2b5ca92021-02-23 20:00:28 +080039
40ifeq (,$(filter %_64,$(TARGET_PRODUCT)))
41TARGET_2ND_ARCH := arm
42TARGET_2ND_ARCH_VARIANT := armv8-a
43TARGET_2ND_CPU_ABI := armeabi-v7a
44TARGET_2ND_CPU_ABI2 := armeabi
45TARGET_2ND_CPU_VARIANT := generic
46TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a53
47endif
48
Minchan Kim5d135292021-03-17 15:13:38 -070049BOARD_KERNEL_CMDLINE += dyndbg=\"func alloc_contig_dump_pages +p\"
Oleg Matcovschi9963cf02021-03-23 14:03:45 -070050BOARD_KERNEL_CMDLINE += earlycon=exynos4210,0x10A00000 console=ttySAC0,115200 androidboot.console=ttySAC0 printk.devkmsg=on
Minchan Kim3623b572021-03-29 13:18:03 -070051BOARD_KERNEL_CMDLINE += cma_sysfs.experimental=Y
Minchan Kimc9f14082021-05-07 13:00:29 -070052BOARD_KERNEL_CMDLINE += stack_depot_disable=off page_pinner=on
Daniel Mentzc37a73b2021-04-08 20:24:38 -070053BOARD_BOOTCONFIG += androidboot.boot_devices=14700000.ufs
Robin Pengc2b5ca92021-02-23 20:00:28 +080054
55TARGET_NO_BOOTLOADER := true
Petri Gynther645bea62021-07-20 22:58:00 -070056TARGET_NO_KERNEL := false
Petri Gyntherccbd2c72021-08-19 13:10:07 -070057TARGET_NO_RADIOIMAGE := true
Robin Pengc2b5ca92021-02-23 20:00:28 +080058BOARD_USES_GENERIC_KERNEL_IMAGE := true
59BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := true
60BOARD_MOVE_GSI_AVB_KEYS_TO_VENDOR_BOOT := true
61TARGET_RECOVERY_WIPE := device/google/gs101/conf/recovery.wipe
Eric Biggersf739cf62021-08-30 14:09:06 -070062
63# This is the fstab file that will be included in the recovery image. Note that
64# recovery doesn't care about the encryption settings, so it doesn't matter
65# whether we use the normal or the fips fstab here.
66#
67# Since this is a generated file, it's necessary to use intermediates-dir-for in
68# order to refer to it correctly. And since intermediates-dir-for isn't defined
69# yet when this file is included, it's necessary to use a deferred variable
70# assignment ( = ) rather than an immediate variable assignment ( := ).
71TARGET_RECOVERY_FSTAB = $(call intermediates-dir-for,ETC,fstab.gs101)/fstab.gs101
72
Robin Pengc2b5ca92021-02-23 20:00:28 +080073TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888
74TARGET_RECOVERY_UI_MARGIN_HEIGHT := 165
75TARGET_RECOVERY_UI_LIB := \
76 librecovery_ui_pixel \
77 libfstab
78
79AB_OTA_UPDATER := true
80
81AB_OTA_PARTITIONS += \
82 system \
83 system_ext \
84 product \
85 vbmeta_system
86
87ifneq ($(PRODUCT_BUILD_BOOT_IMAGE),false)
88AB_OTA_PARTITIONS += boot
89endif
90ifneq ($(PRODUCT_BUILD_VENDOR_BOOT_IMAGE),false)
91AB_OTA_PARTITIONS += vendor_boot
92AB_OTA_PARTITIONS += dtbo
93endif
94ifneq ($(PRODUCT_BUILD_VBMETA_IMAGE),false)
95AB_OTA_PARTITIONS += vbmeta
96endif
97
98# EMULATOR common modules
99BOARD_EMULATOR_COMMON_MODULES := liblight
100
101OVERRIDE_RS_DRIVER := libRSDriverArm.so
102BOARD_EGL_CFG := device/google/gs101/conf/egl.cfg
103#BOARD_USES_HGL := true
104USE_OPENGL_RENDERER := true
105NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
106BOARD_USES_EXYNOS5_COMMON_GRALLOC := true
Robin Pengc2b5ca92021-02-23 20:00:28 +0800107BOARD_USES_ALIGN_RESTRICTION := false
Sean Callanan13c4abd2021-03-25 18:27:04 -0700108BOARD_USES_GRALLOC_ION_SYNC := true
Robin Pengc2b5ca92021-02-23 20:00:28 +0800109
110# This should be the same value as USE_SWIFTSHADER in device.mk
111BOARD_USES_SWIFTSHADER := false
112
113# Gralloc4
Robin Pengc2b5ca92021-02-23 20:00:28 +0800114SOONG_CONFIG_NAMESPACES += arm_gralloc
115SOONG_CONFIG_arm_gralloc := \
116 gralloc_arm_no_external_afbc \
117 mali_gpu_support_afbc_basic \
118 mali_gpu_support_afbc_wideblk \
119 gralloc_init_afbc \
120 gralloc_ion_sync_on_lock \
121 dpu_support_1010102_afbc
122
123ifeq ($(BOARD_USES_SWIFTSHADER),true)
124SOONG_CONFIG_arm_gralloc_gralloc_arm_no_external_afbc := true
125SOONG_CONFIG_arm_gralloc_mali_gpu_support_afbc_basic := false
126SOONG_CONFIG_arm_gralloc_mali_gpu_support_afbc_wideblk := false
127SOONG_CONFIG_arm_gralloc_gralloc_init_afbc := false
128SOONG_CONFIG_arm_gralloc_dpu_support_1010102_afbc := false
129else
130SOONG_CONFIG_arm_gralloc_gralloc_arm_no_external_afbc := false
131SOONG_CONFIG_arm_gralloc_mali_gpu_support_afbc_basic := true
132SOONG_CONFIG_arm_gralloc_mali_gpu_support_afbc_wideblk := true
133SOONG_CONFIG_arm_gralloc_gralloc_init_afbc := true
134SOONG_CONFIG_arm_gralloc_dpu_support_1010102_afbc := true
135endif # ifeq ($(BOARD_USES_SWIFTSHADER),true)
136SOONG_CONFIG_arm_gralloc_gralloc_ion_sync_on_lock := $(BOARD_USES_GRALLOC_ION_SYNC)
Robin Pengc2b5ca92021-02-23 20:00:28 +0800137
138# Graphics
139#BOARD_USES_EXYNOS_DATASPACE_FEATURE := true
140
Robin Pengc2b5ca92021-02-23 20:00:28 +0800141# Enable chain partition for system.
142BOARD_AVB_VBMETA_SYSTEM := system system_ext product
143BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
144BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
145BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
146BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
147
Will McVickerb5b92ea2021-01-26 12:37:06 -0800148# Enable chained vbmeta for boot images
149BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
150BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA2048
151BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
152BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2
153
Robin Pengc2b5ca92021-02-23 20:00:28 +0800154TARGET_USERIMAGES_USE_EXT4 := true
155TARGET_USERIMAGES_USE_F2FS := true
156BOARD_USERDATAIMAGE_PARTITION_SIZE := 11796480000
157BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
158PRODUCT_FS_COMPRESSION := 1
159BOARD_FLASH_BLOCK_SIZE := 4096
160BOARD_MOUNT_SDCARD_RW := true
161
162# product.img
163BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
164TARGET_COPY_OUT_PRODUCT := product
165
166# system_ext.img
167BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
168TARGET_COPY_OUT_SYSTEM_EXT := system_ext
169
170########################
171# Video Codec
172########################
173# 1. Exynos C2
174BOARD_USE_CSC_FILTER := false
175BOARD_USE_DEC_SW_CSC := true
176BOARD_USE_ENC_SW_CSC := true
177BOARD_SUPPORT_MFC_ENC_RGB := true
Charlie Chen935a1dd2021-03-16 16:26:13 +0800178BOARD_USE_BLOB_ALLOCATOR := false
Robin Pengc2b5ca92021-02-23 20:00:28 +0800179########################
180
181BOARD_SUPER_PARTITION_SIZE := 8531214336
182BOARD_SUPER_PARTITION_GROUPS := google_dynamic_partitions
Pat Tjin977ea342021-03-11 23:20:27 -0800183# Set size to BOARD_SUPER_PARTITION_SIZE - overhead (4MiB) (b/182237294)
184BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 8527020032
Robin Pengc2b5ca92021-02-23 20:00:28 +0800185BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST := \
186 system \
187 system_ext \
188 product \
Daniel Mentzfc05a5f2021-03-03 14:44:17 -0800189 vendor \
190 vendor_dlkm
Robin Pengc2b5ca92021-02-23 20:00:28 +0800191
192# Set error limit to BOARD_SUPER_PARTITON_SIZE - 500MB
193BOARD_SUPER_PARTITION_ERROR_LIMIT := 8006926336
194
195#
196# AUDIO & VOICE
197#
198BOARD_USES_GENERIC_AUDIO := true
199
200SOONG_CONFIG_NAMESPACES += aoc_audio_func
201
202SOONG_CONFIG_aoc_audio_func += \
203 ext_hidl
204
205SOONG_CONFIG_aoc_audio_func_ext_hidl := true
206
207ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
208SOONG_CONFIG_aoc_audio_func += \
209 dump_usecase_data \
210 hal_socket_control \
211 record_tunning_keys
212
213SOONG_CONFIG_aoc_audio_func_dump_usecase_data := true
214SOONG_CONFIG_aoc_audio_func_hal_socket_control := true
215SOONG_CONFIG_aoc_audio_func_record_tunning_keys := true
216endif
217
Carter Hsu977c44c2021-05-12 17:02:05 +0800218ifneq (,$(filter aosp_%,$(TARGET_PRODUCT)))
219SOONG_CONFIG_aoc_audio_func += aosp_build
220
221SOONG_CONFIG_aoc_audio_func_aosp_build := true
222endif
223
Robin Pengc2b5ca92021-02-23 20:00:28 +0800224# Primary AudioHAL Configuration
225#BOARD_USE_COMMON_AUDIOHAL := true
226#BOARD_USE_CALLIOPE_AUDIOHAL := false
227#BOARD_USE_AUDIOHAL := true
228
229# Compress Offload Configuration
230#BOARD_USE_OFFLOAD_AUDIO := true
231#BOARD_USE_OFFLOAD_EFFECT := false
232
233# SoundTriggerHAL Configuration
234#BOARD_USE_SOUNDTRIGGER_HAL := false
235
236# HWComposer
237BOARD_HWC_VERSION := libhwc2.1
238TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK := false
239BOARD_HDMI_INCAPABLE := true
240TARGET_USES_HWC2 := true
241HWC_SKIP_VALIDATE := true
242HWC_SUPPORT_RENDER_INTENT := true
243HWC_SUPPORT_COLOR_TRANSFORM := true
244#BOARD_USES_DISPLAYPORT := true
245# if AFBC is enabled, must set ro.vendor.ddk.set.afbc=1
246BOARD_USES_EXYNOS_AFBC_FEATURE := true
247#BOARD_USES_HDRUI_GLES_CONVERSION := true
248
249BOARD_LIBACRYL_DEFAULT_COMPOSITOR := fimg2d_gs101
250BOARD_LIBACRYL_G2D_HDR_PLUGIN := libacryl_hdr_plugin
251
252# HWCServices
253BOARD_USES_HWC_SERVICES := true
254
255# WiFiDisplay
256# BOARD_USES_VIRTUAL_DISPLAY := true
257# BOARD_USES_VDS_EXYNOS_HWC := true
258# BOARD_USES_WIFI_DISPLAY:= true
259# BOARD_USES_EGL_SURFACE_FOR_COMPOSITION_MIXED := true
260# BOARD_USES_VDS_YUV420SPM := true
261# BOARD_USES_VDS_OTHERFORMAT := true
262# BOARD_USES_VDS_DEBUG_FLAG := true
263# BOARD_USES_DISABLE_COMPOSITIONTYPE_GLES := true
264# BOARD_USES_SECURE_ENCODER_ONLY := true
265# BOARD_USES_TSMUX := true
266
267# SCALER
268BOARD_USES_DEFAULT_CSC_HW_SCALER := true
269BOARD_DEFAULT_CSC_HW_SCALER := 4
270BOARD_USES_SCALER_M2M1SHOT := true
271
272# Device Tree
273BOARD_USES_DT := true
274BOARD_INCLUDE_DTB_IN_BOOTIMG := true
275BOARD_PREBUILT_DTBIMAGE_DIR := $(TARGET_KERNEL_DIR)
276BOARD_PREBUILT_DTBOIMAGE := $(BOARD_PREBUILT_DTBIMAGE_DIR)/dtbo.img
277
278# PLATFORM LOG
279TARGET_USES_LOGD := true
280
281# LIBHWJPEG
282#TARGET_USES_UNIVERSAL_LIBHWJPEG := true
283#LIBHWJPEG_HWSCALER_ID := 0
284
285#Keymaster
286#BOARD_USES_KEYMASTER_VER1 := true
287
288#FMP
289#BOARD_USES_FMP_DM_CRYPT := true
290#BOARD_USES_FMP_FSCRYPTO := true
291BOARD_USES_METADATA_PARTITION := true
292
Robin Pengc2b5ca92021-02-23 20:00:28 +0800293# SKIA
294#BOARD_USES_SKIA_MULTITHREADING := true
295#BOARD_USES_FIMGAPI_V5X := true
296
297# SECCOMP Policy
298BOARD_SECCOMP_POLICY = device/google/gs101/seccomp_policy
299
300#CURL
301BOARD_USES_CURL := true
302
303# Sensor HAL
304BOARD_USES_EXYNOS_SENSORS_DUMMY := true
305
306# VISION
307# Exynos vision framework (EVF)
308#TARGET_USES_EVF := true
309# HW acceleration
310#TARGET_USES_VPU_KERNEL := true
311#TARGET_USES_SCORE_KERNEL := true
312#TARGET_USES_CL_KERNEL := false
313
314# exynos RIL
315TARGET_EXYNOS_RIL_SOURCE := true
316ENABLE_VENDOR_RIL_SERVICE := true
317
318# GNSS
319# BOARD_USES_EXYNOS_GNSS_DUMMY := true
320
321# Bluetooth defines
322# TODO(b/123695868): Remove the need for this
323BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := \
324 build/make/target/board/mainline_arm64/bluetooth
325
Robin Pengc2b5ca92021-02-23 20:00:28 +0800326#VNDK
327BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
328BOARD_VNDK_VERSION := current
329
330# H/W align restriction of MM IPs
331BOARD_EXYNOS_S10B_FORMAT_ALIGN := 64
332
333# WiFi
334BOARD_WLAN_DEVICE := bcmdhd
335BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
336BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
337WPA_SUPPLICANT_VERSION := VER_0_8_X
338BOARD_WPA_SUPPLICANT_DRIVER := NL80211
339BOARD_HOSTAPD_DRIVER := NL80211
Roger Wang2b65b152021-06-22 07:09:19 +0800340# Wifi interface combination - {1 STA + 1 AP (bridged or single)} or {1 STA + 1 P2P}
341# or {1 STA + 1 NAN} or {2 STA}
342WIFI_HAL_INTERFACE_COMBINATIONS := {{{STA}, 1}, {{P2P, NAN, AP}, 1}}, {{{STA}, 2}}
Robin Pengc2b5ca92021-02-23 20:00:28 +0800343WIFI_FEATURE_WIFI_EXT_HAL := true
344WIFI_FEATURE_IMU_DETECTION := true
345# Avoid Wifi reset on MAC Address change
346WIFI_AVOID_IFACE_RESET_MAC_CHANGE := true
347WIFI_FEATURE_HOSTAPD_11AX := true
348
349# NeuralNetworks
350GPU_SOURCE_PRESENT := $(wildcard vendor/arm/mali/valhall)
linjoey3097b782021-05-26 11:24:26 +0800351GPU_PREBUILD_PRESENT := $(wildcard vendor/google_devices/gs101/prebuilts/gpu/libs)
Robin Pengc2b5ca92021-02-23 20:00:28 +0800352ifneq "$(or $(GPU_SOURCE_PRESENT),$(GPU_PREBUILD_PRESENT))" ""
353ARMNN_COMPUTE_CL_ENABLE := 1
354else
355ARMNN_COMPUTE_CL_ENABLE := 0
356endif
357ARMNN_COMPUTE_NEON_ENABLE := 1
358
359# Boot.img
360BOARD_RAMDISK_USE_LZ4 := true
361#BOARD_KERNEL_BASE := 0x80000000
362#BOARD_KERNEL_PAGESIZE := 2048
363#BOARD_KERNEL_OFFSET := 0x80000
364#BOARD_RAMDISK_OFFSET := 0x4000000
Daniel Mentzc37a73b2021-04-08 20:24:38 -0700365BOARD_BOOT_HEADER_VERSION := 4
Robin Pengc2b5ca92021-02-23 20:00:28 +0800366BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
367
Daniel Mentzc37a73b2021-04-08 20:24:38 -0700368BOARD_VENDOR_RAMDISK_FRAGMENTS := dlkm
369BOARD_VENDOR_RAMDISK_FRAGMENT.dlkm.KERNEL_MODULE_DIRS := top
370
Robin Pengc2b5ca92021-02-23 20:00:28 +0800371# Enable AVB2.0
372BOARD_AVB_ENABLE := true
373BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
374BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 0x04000000
375BOARD_DTBOIMG_PARTITION_SIZE := 0x01000000
376
377# System As Root
378BOARD_BUILD_SYSTEM_ROOT_IMAGE := false
379
Petri Gynther3c5da8c2021-03-07 01:19:46 -0800380# Vendor ramdisk image for kernel development
381BOARD_BUILD_VENDOR_RAMDISK_IMAGE := true
382
Daniel Mentz24b12e22021-05-13 17:26:39 -0700383BOARD_VENDOR_KERNEL_MODULES_BLOCKLIST_FILE := device/google/gs101/vendor_dlkm.blocklist
384
Daniel Mentz6a6d8f82021-05-11 22:58:19 -0700385KERNEL_MODULE_DIR := $(TARGET_KERNEL_DIR)
386KERNEL_MODULES := $(wildcard $(KERNEL_MODULE_DIR)/*.ko)
Robin Pengc2b5ca92021-02-23 20:00:28 +0800387
Daniel Mentz6a6d8f82021-05-11 22:58:19 -0700388BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_MODULE_DIR)/vendor_boot.modules.load))
389ifndef BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD
390$(error vendor_boot.modules.load not found or empty)
391endif
392BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(addprefix $(KERNEL_MODULE_DIR)/, $(notdir $(BOARD_VENDOR_RAMDISK_KERNEL_MODULES_LOAD)))
Robin Pengc2b5ca92021-02-23 20:00:28 +0800393
Daniel Mentz6a6d8f82021-05-11 22:58:19 -0700394BOARD_VENDOR_KERNEL_MODULES_LOAD := $(strip $(shell cat $(KERNEL_MODULE_DIR)/vendor_dlkm.modules.load))
395ifndef BOARD_VENDOR_KERNEL_MODULES_LOAD
396$(error vendor_dlkm.modules.load not found or empty)
397endif
398BOARD_VENDOR_KERNEL_MODULES := $(KERNEL_MODULES)
Robin Pengc2b5ca92021-02-23 20:00:28 +0800399
400# Using BUILD_COPY_HEADERS
401BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true
402
403include device/google/gs101-sepolicy/gs101-sepolicy.mk
Robin Pengc2b5ca92021-02-23 20:00:28 +0800404
405# Battery options
406BOARD_KERNEL_CMDLINE += at24.write_timeout=100
J. Aviladf9dc5c2021-04-12 18:22:36 +0000407
408# Enable larger logbuf
409BOARD_KERNEL_CMDLINE += log_buf_len=1024K
Jeffrey Carlyle15d83482021-06-15 08:26:29 -0700410
411-include vendor/google_devices/gs101/proprietary/BoardConfigVendor.mk