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