• 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 := sdm710
20TARGET_BOARD_INFO_FILE := device/google/bonito/board-info.txt
21USES_DEVICE_GOOGLE_B4S4 := 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 := cortex-a75
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 := cortex-a75
36
37TARGET_BOARD_COMMON_PATH := device/google/bonito/sdm710
38
39BUILD_BROKEN_DUP_RULES := true
40BUILD_BROKEN_ENG_DEBUG_TAGS := true
41
42BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8 androidboot.console=ttyMSM0 printk.devkmsg=on
43BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237
44BOARD_KERNEL_CMDLINE += ehci-hcd.park=3
45BOARD_KERNEL_CMDLINE += service_locator.enable=1
46BOARD_KERNEL_CMDLINE += firmware_class.path=/vendor/firmware
47BOARD_KERNEL_CMDLINE += cgroup.memory=nokmem
48# STOPSHIP Bringup hack- no low power
49BOARD_KERNEL_CMDLINE += lpm_levels.sleep_disabled=1
50BOARD_KERNEL_CMDLINE += loop.max_part=7
51BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/7c4000.sdhci
52
53BOARD_KERNEL_BASE        := 0x00000000
54BOARD_KERNEL_PAGESIZE    := 4096
55ifeq ($(filter-out bonito_kasan sargo_kasan, $(TARGET_PRODUCT)),)
56BOARD_KERNEL_OFFSET      := 0x80000
57BOARD_KERNEL_TAGS_OFFSET := 0x02500000
58BOARD_RAMDISK_OFFSET     := 0x02700000
59BOARD_MKBOOTIMG_ARGS     := --kernel_offset $(BOARD_KERNEL_OFFSET) --ramdisk_offset $(BOARD_RAMDISK_OFFSET) --tags_offset $(BOARD_KERNEL_TAGS_OFFSET)
60else
61BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
62BOARD_RAMDISK_OFFSET     := 0x02000000
63endif
64
65BOARD_INCLUDE_DTB_IN_BOOTIMG := true
66BOARD_BOOT_HEADER_VERSION := 2
67BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
68
69# DTBO partition definitions
70BOARD_PREBUILT_DTBOIMAGE := device/google/bonito-kernel/dtbo.img
71BOARD_DTBOIMG_PARTITION_SIZE := 8388608
72
73TARGET_NO_KERNEL := false
74BOARD_USES_RECOVERY_AS_BOOT := true
75BOARD_USES_METADATA_PARTITION := true
76
77BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
78
79# Partitions (listed in the file) to be wiped under recovery.
80TARGET_RECOVERY_WIPE := device/google/bonito/recovery.wipe
81TARGET_RECOVERY_FSTAB := device/google/bonito/fstab.hardware
82TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888
83TARGET_RECOVERY_UI_LIB := \
84    librecovery_ui_bonito \
85    libnos_citadel_for_recovery \
86    libnos_for_recovery \
87    libbootloader_message \
88    libfstab
89
90# system.img
91BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0
92
93# persist.img
94BOARD_PERSISTIMAGE_PARTITION_SIZE := 41943040
95BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
96
97# boot.img
98BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
99
100BOARD_EXT4_SHARE_DUP_BLOCKS := true
101BOARD_SUPER_PARTITION_GROUPS := google_dynamic_partitions
102BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST := \
103    system \
104    vendor \
105    product
106
107BOARD_SUPER_PARTITION_SIZE := 4072669184
108BOARD_SUPER_PARTITION_METADATA_DEVICE := system
109BOARD_SUPER_PARTITION_BLOCK_DEVICES := system vendor
110BOARD_SUPER_PARTITION_SYSTEM_DEVICE_SIZE := 3267362816
111BOARD_SUPER_PARTITION_VENDOR_DEVICE_SIZE := 805306368
112# Assume 4MB metadata size.
113# TODO(b/117997386): Use correct metadata size.
114BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 4068474880
115
116BOARD_FLASH_BLOCK_SIZE := 131072
117
118BOARD_ROOT_EXTRA_SYMLINKS := /mnt/vendor/persist:/persist
119BOARD_ROOT_EXTRA_SYMLINKS += /vendor/firmware_mnt:/firmware
120BOARD_ROOT_EXTRA_SYMLINKS += /vendor/dsp:/dsp
121
122include device/google/bonito-sepolicy/bonito-sepolicy.mk
123
124TARGET_FS_CONFIG_GEN := device/google/bonito/config.fs
125
126QCOM_BOARD_PLATFORMS += sdm710
127BOARD_HAVE_BLUETOOTH_QCOM := true
128BOARD_USES_COMMON_BLUETOOTH_HAL := true
129
130# Camera
131TARGET_USES_AOSP := true
132BOARD_QTI_CAMERA_32BIT_ONLY := false
133CAMERA_DAEMON_NOT_PRESENT := true
134TARGET_USES_ION := true
135TARGET_USES_EASEL := true
136BOARD_USES_EASEL := true
137
138# GPS
139TARGET_NO_RPC := true
140BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default
141BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET := true
142
143# RenderScript
144OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
145
146# Sensors
147USE_SENSOR_MULTI_HAL := true
148TARGET_SUPPORT_DIRECT_REPORT := true
149
150# wlan
151BOARD_WLAN_DEVICE := qcwcn
152BOARD_WPA_SUPPLICANT_DRIVER := NL80211
153BOARD_HOSTAPD_DRIVER := NL80211
154WIFI_DRIVER_DEFAULT := qca_cld3
155WPA_SUPPLICANT_VERSION := VER_0_8_X
156BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
157BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
158WIFI_HIDL_FEATURE_AWARE := true
159WIFI_HIDL_FEATURE_DUAL_INTERFACE:= true
160
161# Audio
162BOARD_USES_ALSA_AUDIO := true
163AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
164AUDIO_FEATURE_ENABLED_SND_MONITOR := true
165AUDIO_FEATURE_ENABLED_USB_TUNNEL := true
166AUDIO_FEATURE_ENABLED_CIRRUS_SPKR_PROTECTION := true
167BOARD_SUPPORTS_SOUND_TRIGGER := true
168AUDIO_FEATURE_FLICKER_SENSOR_INPUT := true
169SOUND_TRIGGER_FEATURE_LPMA_ENABLED := true
170AUDIO_FEATURE_ENABLED_MAXX_AUDIO := true
171BOARD_SUPPORTS_SOUND_TRIGGER_5514 := true
172AUDIO_FEATURE_ENABLED_24BITS_CAMCORDER := true
173
174# Graphics
175TARGET_USES_GRALLOC1 := true
176TARGET_USES_HWC2 := true
177TARGET_USES_NV21_CAMERA_PREVIEW := true
178
179VSYNC_EVENT_PHASE_OFFSET_NS := 2000000
180SF_VSYNC_EVENT_PHASE_OFFSET_NS := 6000000
181
182# Display
183TARGET_HAS_WIDE_COLOR_DISPLAY := false
184TARGET_USES_DISPLAY_RENDER_INTENTS := true
185TARGET_USES_COLOR_METADATA := true
186TARGET_USES_DRM_PP := true
187
188# Vendor Interface Manifest
189DEVICE_MANIFEST_FILE := device/google/bonito/manifest.xml
190DEVICE_MATRIX_FILE := device/google/bonito/compatibility_matrix.xml
191DEVICE_FRAMEWORK_COMPATIBILITY_MATRIX_FILE := device/google/bonito/device_framework_matrix.xml
192
193# Userdebug only Vendor Interface Manifest
194ifneq (,$(filter userdebug eng, $(TARGET_BUILD_VARIANT)))
195DEVICE_FRAMEWORK_MANIFEST_FILE += device/google/bonito/framework_manifest_userdebug.xml
196DEVICE_MATRIX_FILE += device/google/bonito/compatibility_matrix_userdebug.xml
197endif
198
199ODM_MANIFEST_SKUS := \
200    G020A \
201    G020B \
202    G020C \
203    G020D \
204    G020E \
205    G020F \
206    G020G \
207    G020H \
208
209ODM_MANIFEST_G020A_FILES := device/google/bonito/nfc/manifest_se_SIM1.xml
210ODM_MANIFEST_G020B_FILES := device/google/bonito/nfc/manifest_se_SIM1.xml
211ODM_MANIFEST_G020C_FILES := device/google/bonito/nfc/manifest_se_SIM1.xml
212ODM_MANIFEST_G020D_FILES := device/google/bonito/nfc/manifest_se_eSE1.xml
213ODM_MANIFEST_G020E_FILES := device/google/bonito/nfc/manifest_se_SIM1.xml
214ODM_MANIFEST_G020F_FILES := device/google/bonito/nfc/manifest_se_SIM1.xml
215ODM_MANIFEST_G020G_FILES := device/google/bonito/nfc/manifest_se_SIM1.xml
216ODM_MANIFEST_G020H_FILES := device/google/bonito/nfc/manifest_se_eSE1.xml
217
218# Use mke2fs to create ext4 images
219TARGET_USES_MKE2FS := true
220
221# Kernel modules
222ifeq (,$(filter-out sargo_kasan bonito_kasan, $(TARGET_PRODUCT)))
223BOARD_VENDOR_KERNEL_MODULES += \
224    $(wildcard device/google/bonito-kernel/kasan/*.ko)
225else ifeq (,$(filter-out sargo_kernel_debug_memory bonito_kernel_debug_memory, $(TARGET_PRODUCT)))
226BOARD_VENDOR_KERNEL_MODULES += \
227    $(wildcard device/google/bonito-kernel/debug_memory/*.ko)
228else ifeq (,$(filter-out sargo_kernel_debug_locking bonito_kernel_debug_locking, $(TARGET_PRODUCT)))
229BOARD_VENDOR_KERNEL_MODULES += \
230    $(wildcard device/google/bonito-kernel/debug_locking/*.ko)
231else ifeq (,$(filter-out sargo_kernel_debug_hang bonito_kernel_debug_hang, $(TARGET_PRODUCT)))
232BOARD_VENDOR_KERNEL_MODULES += \
233    $(wildcard device/google/bonito-kernel/debug_hang/*.ko)
234else ifeq (,$(filter-out sargo_kernel_debug_api bonito_kernel_debug_api, $(TARGET_PRODUCT)))
235BOARD_VENDOR_KERNEL_MODULES += \
236    $(wildcard device/google/bonito-kernel/debug_api/*.ko)
237else
238BOARD_VENDOR_KERNEL_MODULES += \
239    $(wildcard device/google/bonito-kernel/*.ko)
240endif
241
242# DTB
243ifeq (,$(filter-out sargo_kasan bonito_kasan, $(TARGET_PRODUCT)))
244BOARD_PREBUILT_DTBIMAGE_DIR := device/google/bonito-kernel/kasan
245else ifeq (,$(filter-out sargo_kernel_debug_memory bonito_kernel_debug_memory, $(TARGET_PRODUCT)))
246BOARD_PREBUILT_DTBIMAGE_DIR := device/google/bonito-kernel/debug_memory
247else ifeq (,$(filter-out sargo_kernel_debug_locking bonito_kernel_debug_locking, $(TARGET_PRODUCT)))
248BOARD_PREBUILT_DTBIMAGE_DIR := device/google/bonito-kernel/debug_locking
249else ifeq (,$(filter-out sargo_kernel_debug_hang bonito_kernel_debug_hang, $(TARGET_PRODUCT)))
250BOARD_PREBUILT_DTBIMAGE_DIR := device/google/bonito-kernel/debug_hang
251else ifeq (,$(filter-out sargo_kernel_debug_api bonito_kernel_debug_api, $(TARGET_PRODUCT)))
252BOARD_PREBUILT_DTBIMAGE_DIR := device/google/bonito-kernel/debug_api
253else
254BOARD_PREBUILT_DTBIMAGE_DIR := device/google/bonito-kernel
255endif
256
257# Testing related defines
258BOARD_PERFSETUP_SCRIPT := platform_testing/scripts/perf-setup/b4s4-setup.sh
259
260-include vendor/google_devices/bonito/proprietary/BoardConfigVendor.mk
261