• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (C) 2016 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#
16
17include build/make/target/board/BoardConfigMainlineCommon.mk
18
19TARGET_BOARD_PLATFORM := sdm845
20TARGET_BOARD_INFO_FILE := device/google/crosshatch/board-info.txt
21USES_DEVICE_GOOGLE_B1C1 := true
22
23TARGET_ARCH := arm64
24TARGET_ARCH_VARIANT := armv8-a
25TARGET_CPU_ABI := arm64-v8a
26TARGET_CPU_ABI2 :=
27TARGET_CPU_VARIANT := generic
28TARGET_CPU_VARIANT_RUNTIME := kryo385
29
30TARGET_2ND_ARCH := arm
31TARGET_2ND_ARCH_VARIANT := armv8-a
32TARGET_2ND_CPU_ABI := armeabi-v7a
33TARGET_2ND_CPU_ABI2 := armeabi
34TARGET_2ND_CPU_VARIANT := generic
35TARGET_2ND_CPU_VARIANT_RUNTIME := kryo385
36
37TARGET_BOARD_COMMON_PATH := device/google/crosshatch/sdm845
38
39BUILD_BROKEN_DUP_RULES := true
40
41BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8 androidboot.console=ttyMSM0 printk.devkmsg=on
42BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237
43BOARD_KERNEL_CMDLINE += ehci-hcd.park=3
44BOARD_KERNEL_CMDLINE += service_locator.enable=1
45BOARD_KERNEL_CMDLINE += cgroup.memory=nokmem
46BOARD_KERNEL_CMDLINE += lpm_levels.sleep_disabled=1
47BOARD_KERNEL_CMDLINE += usbcore.autosuspend=7
48BOARD_KERNEL_CMDLINE += loop.max_part=7
49BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/1d84000.ufshc
50
51BOARD_KERNEL_BASE        := 0x00000000
52BOARD_KERNEL_PAGESIZE    := 4096
53
54BOARD_INCLUDE_DTB_IN_BOOTIMG := true
55BOARD_BOOT_HEADER_VERSION := 2
56BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
57
58# DTBO partition definitions
59BOARD_PREBUILT_DTBOIMAGE := device/google/crosshatch-kernel/dtbo.img
60BOARD_DTBOIMG_PARTITION_SIZE := 8388608
61
62TARGET_NO_KERNEL := false
63BOARD_USES_RECOVERY_AS_BOOT := true
64BOARD_USES_METADATA_PARTITION := true
65
66# Partitions (listed in the file) to be wiped under recovery.
67TARGET_RECOVERY_WIPE := device/google/crosshatch/recovery.wipe
68ifneq ($(filter %_mainline,$(TARGET_PRODUCT)),)
69TARGET_RECOVERY_FSTAB := device/google/crosshatch/fstab.mainline.hardware
70else
71TARGET_RECOVERY_FSTAB := device/google/crosshatch/fstab.hardware
72endif
73TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
74TARGET_RECOVERY_UI_LIB := \
75    librecovery_ui_crosshatch \
76    libnos_citadel_for_recovery \
77    libnos_for_recovery \
78    libbootloader_message \
79    libfstab
80
81ifneq ($(filter %_mainline,$(TARGET_PRODUCT)),)
82# TODO (b/136154856) product_services partition is removed from
83# BOARD_AVB_VBMETA_SYSTEM. Instead, we will add system_ext once it is ready.
84BOARD_AVB_VBMETA_SYSTEM := system
85BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem
86BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048
87BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP)
88BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1
89endif
90
91# product.img
92ifneq ($(PRODUCT_NO_PRODUCT_PARTITION), true)
93ifneq ($(PRODUCT_USE_DYNAMIC_PARTITIONS), true)
94  BOARD_PRODUCTIMAGE_PARTITION_SIZE := 314572800
95endif
96BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
97else
98TARGET_COPY_OUT_PRODUCT := system/product
99endif
100
101# system.img
102ifneq ($(PRODUCT_USE_DYNAMIC_PARTITIONS), true)
103  BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2952790016
104ifeq ($(PRODUCT_NO_PRODUCT_PARTITION), true)
105  # Increase inode count to add product modules
106  BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := 8192
107else
108  BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := 4096
109endif
110else
111  BOARD_EXT4_SHARE_DUP_BLOCKS := true
112endif
113BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0
114
115# userdata.img
116BOARD_USERDATAIMAGE_PARTITION_SIZE := 10737418240
117BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
118
119# persist.img
120BOARD_PERSISTIMAGE_PARTITION_SIZE := 41943040
121BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
122
123# boot.img
124BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
125
126ifeq ($(PRODUCT_USE_DYNAMIC_PARTITIONS), true)
127BOARD_SUPER_PARTITION_GROUPS := google_dynamic_partitions
128BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST := \
129    system \
130    vendor \
131    product
132
133ifeq ($(PRODUCT_RETROFIT_DYNAMIC_PARTITIONS), true)
134# Normal Pixel 3 must retrofit dynamic partitions.
135BOARD_SUPER_PARTITION_SIZE := 4072669184
136BOARD_SUPER_PARTITION_METADATA_DEVICE := system
137BOARD_SUPER_PARTITION_BLOCK_DEVICES := system vendor product
138BOARD_SUPER_PARTITION_SYSTEM_DEVICE_SIZE := 2952790016
139BOARD_SUPER_PARTITION_VENDOR_DEVICE_SIZE := 805306368
140BOARD_SUPER_PARTITION_PRODUCT_DEVICE_SIZE := 314572800
141# Assume 4MB metadata size.
142# TODO(b/117997386): Use correct metadata size.
143BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 4069523456
144else
145# Mainline Pixel 3 has an actual super partition.
146
147# TODO (b/136154856) product_services partition is removed.
148# Instead, we will add system_ext once it is ready.
149# BOARD_PRODUCT_SERVICESIMAGE_FILE_SYSTEM_TYPE := ext4
150# TARGET_COPY_OUT_PRODUCT_SERVICES := product_services
151
152BOARD_SUPER_PARTITION_SIZE := 12884901888
153# Assume 1MB metadata size.
154# TODO(b/117997386): Use correct metadata size.
155BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 6441402368
156
157# TODO (b/136154856) product_services partition removed.
158# Instead, we will add system_ext once it is ready.
159# BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST += \
160#    product_services \
161
162endif # PRODUCT_RETROFIT_DYNAMIC_PARTITIONS
163endif # PRODUCT_USE_DYNAMIC_PARTITIONS
164
165BOARD_FLASH_BLOCK_SIZE := 131072
166
167# Generate an APEX image for experiment b/119800099.
168DEXPREOPT_GENERATE_APEX_IMAGE := true
169
170BOARD_ROOT_EXTRA_SYMLINKS := /vendor/dsp:/dsp
171BOARD_ROOT_EXTRA_SYMLINKS += /mnt/vendor/persist:/persist
172
173# Add QC specific symlinks for backward compatibility
174# Move the symlinks here instead of removing them
175ifeq ($(PRODUCT_USE_QC_SPECIFIC_SYMLINKS), true)
176BOARD_ROOT_EXTRA_SYMLINKS += /vendor/firmware_mnt:/firmware
177endif
178
179include device/google/crosshatch-sepolicy/crosshatch-sepolicy.mk
180
181TARGET_FS_CONFIG_GEN := device/google/crosshatch/config.fs
182
183QCOM_BOARD_PLATFORMS += sdm845
184BOARD_HAVE_BLUETOOTH_QCOM := true
185BOARD_HAVE_QCOM_FM := false
186BOARD_USES_COMMON_BLUETOOTH_HAL := true
187
188# Camera
189TARGET_USES_AOSP := true
190BOARD_QTI_CAMERA_32BIT_ONLY := false
191CAMERA_DAEMON_NOT_PRESENT := true
192TARGET_USES_ION := true
193TARGET_USES_EASEL := true
194BOARD_USES_EASEL := true
195
196# GPS
197TARGET_NO_RPC := true
198BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default
199BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET := true
200
201# RenderScript
202OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
203
204# Sensors
205USE_SENSOR_MULTI_HAL := true
206TARGET_SUPPORT_DIRECT_REPORT := true
207
208# wlan
209BOARD_WLAN_DEVICE := qcwcn
210BOARD_WPA_SUPPLICANT_DRIVER := NL80211
211BOARD_HOSTAPD_DRIVER := NL80211
212WIFI_DRIVER_DEFAULT := qca_cld3
213WPA_SUPPLICANT_VERSION := VER_0_8_X
214BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
215BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
216WIFI_HIDL_FEATURE_AWARE := true
217WIFI_HIDL_FEATURE_DUAL_INTERFACE:= true
218
219# Audio
220BOARD_USES_ALSA_AUDIO := true
221AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
222AUDIO_FEATURE_ENABLED_SND_MONITOR := true
223AUDIO_FEATURE_ENABLED_USB_TUNNEL := true
224AUDIO_FEATURE_ENABLED_CIRRUS_SPKR_PROTECTION := true
225BOARD_SUPPORTS_SOUND_TRIGGER := true
226AUDIO_FEATURE_FLICKER_SENSOR_INPUT := true
227SOUND_TRIGGER_FEATURE_LPMA_ENABLED := true
228AUDIO_FEATURE_ENABLED_MAXX_AUDIO := true
229AUDIO_FEATURE_ENABLED_24BITS_CAMCORDER := true
230
231# Graphics
232TARGET_USES_GRALLOC1 := true
233TARGET_USES_HWC2 := true
234
235VSYNC_EVENT_PHASE_OFFSET_NS := 2000000
236SF_VSYNC_EVENT_PHASE_OFFSET_NS := 6000000
237
238# Display
239TARGET_HAS_WIDE_COLOR_DISPLAY := true
240TARGET_HAS_HDR_DISPLAY := true
241TARGET_USES_DISPLAY_RENDER_INTENTS := true
242TARGET_USES_COLOR_METADATA := true
243TARGET_USES_DRM_PP := true
244
245# Vendor Interface Manifest
246DEVICE_MANIFEST_FILE := device/google/crosshatch/manifest.xml
247DEVICE_MATRIX_FILE := device/google/crosshatch/compatibility_matrix.xml
248DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := device/google/crosshatch/device_framework_matrix.xml
249
250# Userdebug only Vendor Interface Manifest
251ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
252DEVICE_FRAMEWORK_MANIFEST_FILE += device/google/crosshatch/framework_manifest_userdebug.xml
253DEVICE_MATRIX_FILE += device/google/crosshatch/compatibility_matrix_userdebug.xml
254endif
255
256ODM_MANIFEST_SKUS += \
257    G013A \
258    G013B \
259    G013C \
260    G013D \
261
262ODM_MANIFEST_G013A_FILES := device/google/crosshatch/nfc/manifest_se_SIM1.xml
263ODM_MANIFEST_G013B_FILES := device/google/crosshatch/nfc/manifest_se_eSE1.xml
264ODM_MANIFEST_G013C_FILES := device/google/crosshatch/nfc/manifest_se_SIM1.xml
265ODM_MANIFEST_G013D_FILES := device/google/crosshatch/nfc/manifest_se_eSE1.xml
266
267# Use mke2fs to create ext4 images
268TARGET_USES_MKE2FS := true
269
270# Kernel modules
271ifeq (,$(filter-out blueline_kasan crosshatch_kasan, $(TARGET_PRODUCT)))
272BOARD_VENDOR_KERNEL_MODULES += \
273    $(wildcard device/google/crosshatch-kernel/kasan/*.ko)
274else ifeq (,$(filter-out blueline_kernel_debug_memory crosshatch_kernel_debug_memory, $(TARGET_PRODUCT)))
275BOARD_VENDOR_KERNEL_MODULES += \
276    $(wildcard device/google/crosshatch-kernel/debug_memory/*.ko)
277else ifeq (,$(filter-out blueline_kernel_debug_locking crosshatch_kernel_debug_locking, $(TARGET_PRODUCT)))
278BOARD_VENDOR_KERNEL_MODULES += \
279    $(wildcard device/google/crosshatch-kernel/debug_locking/*.ko)
280else ifeq (,$(filter-out blueline_kernel_debug_hang crosshatch_kernel_debug_hang, $(TARGET_PRODUCT)))
281BOARD_VENDOR_KERNEL_MODULES += \
282    $(wildcard device/google/crosshatch-kernel/debug_hang/*.ko)
283else ifeq (,$(filter-out blueline_kernel_debug_api crosshatch_kernel_debug_api, $(TARGET_PRODUCT)))
284BOARD_VENDOR_KERNEL_MODULES += \
285    $(wildcard device/google/crosshatch-kernel/debug_api/*.ko)
286else ifneq (,$(TARGET_PREBUILT_KERNEL))
287    # If TARGET_PREBUILT_KERNEL is set, check whether there are modules packaged with that kernel
288    # image. If so, use them, otherwise fall back to the default directory.
289    TARGET_PREBUILT_KERNEL_PREBUILT_VENDOR_KERNEL_MODULES := \
290        $(wildcard $(dir $(TARGET_PREBUILT_KERNEL))/*.ko)
291    ifneq (,$(TARGET_PREBUILT_KERNEL_PREBUILT_VENDOR_KERNEL_MODULES))
292        BOARD_VENDOR_KERNEL_MODULES += $(TARGET_PREBUILT_KERNEL_PREBUILT_VENDOR_KERNEL_MODULES)
293    else
294        BOARD_VENDOR_KERNEL_MODULES += $(wildcard device/google/crosshatch-kernel/*.ko)
295    endif
296    # Do NOT delete TARGET_PREBUILT..., it will lead to empty BOARD_VENDOR_KERNEL_MODULES.
297else
298BOARD_VENDOR_KERNEL_MODULES += \
299    $(wildcard device/google/crosshatch-kernel/*.ko)
300endif
301
302# DTB
303ifeq (,$(filter-out blueline_kasan crosshatch_kasan, $(TARGET_PRODUCT)))
304BOARD_PREBUILT_DTBIMAGE_DIR := device/google/crosshatch-kernel/kasan
305else ifeq (,$(filter-out blueline_kernel_debug_memory crosshatch_kernel_debug_memory, $(TARGET_PRODUCT)))
306BOARD_PREBUILT_DTBIMAGE_DIR := device/google/crosshatch-kernel/debug_memory
307else ifeq (,$(filter-out blueline_kernel_debug_locking crosshatch_kernel_debug_locking, $(TARGET_PRODUCT)))
308BOARD_PREBUILT_DTBIMAGE_DIR := device/google/crosshatch-kernel/debug_locking
309else ifeq (,$(filter-out blueline_kernel_debug_hang crosshatch_kernel_debug_hang, $(TARGET_PRODUCT)))
310BOARD_PREBUILT_DTBIMAGE_DIR := device/google/crosshatch-kernel/debug_hang
311else ifeq (,$(filter-out blueline_kernel_debug_api crosshatch_kernel_debug_api, $(TARGET_PRODUCT)))
312BOARD_PREBUILT_DTBIMAGE_DIR := device/google/crosshatch-kernel/debug_api
313else ifneq (,$(TARGET_PREBUILT_KERNEL))
314    # If TARGET_PREBUILT_KERNEL is set, check whether there are dtb files packaged with that kernel
315    # image. If so, use them, otherwise fall back to the default directory.
316    PREBUILT_PREBUILT_DTBIMAGE_DIR := $(wildcard $(dir $(TARGET_PREBUILT_KERNEL))/*.dtb)
317    ifneq (,$(PREBUILT_PREBUILT_DTBIMAGE_DIR)
318        BOARD_PREBUILT_DTBIMAGE_DIR := $(dir $(TARGET_PREBUILT_KERNEL))
319    else
320        BOARD_PREBUILT_DTBIMAGE_DIR += device/google/crosshatch-kernel
321    endif
322    PREBUILT_VENDOR_KERNEL_MODULES :=
323else
324BOARD_PREBUILT_DTBIMAGE_DIR := device/google/crosshatch-kernel
325endif
326
327# Testing related defines
328BOARD_PERFSETUP_SCRIPT := platform_testing/scripts/perf-setup/b1c1-setup.sh
329-include vendor/google_devices/crosshatch/proprietary/BoardConfigVendor.mk
330