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 18include build/make/target/board/BoardConfigPixelCommon.mk 19 20TARGET_BOARD_PLATFORM := msmnile 21TARGET_BOARD_INFO_FILE := device/google/coral/board-info.txt 22USES_DEVICE_GOOGLE_CORAL := true 23 24TARGET_ARCH := arm64 25TARGET_ARCH_VARIANT := armv8-a 26TARGET_CPU_ABI := arm64-v8a 27TARGET_CPU_ABI2 := 28TARGET_CPU_VARIANT := generic 29TARGET_CPU_VARIANT_RUNTIME := cortex-a76 30 31TARGET_2ND_ARCH := arm 32TARGET_2ND_ARCH_VARIANT := armv8-a 33TARGET_2ND_CPU_ABI := armeabi-v7a 34TARGET_2ND_CPU_ABI2 := armeabi 35TARGET_2ND_CPU_VARIANT := generic 36TARGET_2ND_CPU_VARIANT_RUNTIME := cortex-a76 37 38TARGET_BOARD_COMMON_PATH := device/google/coral/sm8150 39 40BOARD_KERNEL_CMDLINE += console=ttyMSM0,115200n8 androidboot.console=ttyMSM0 printk.devkmsg=on 41BOARD_KERNEL_CMDLINE += msm_rtb.filter=0x237 42BOARD_KERNEL_CMDLINE += ehci-hcd.park=3 43BOARD_KERNEL_CMDLINE += service_locator.enable=1 44BOARD_KERNEL_CMDLINE += androidboot.memcg=1 cgroup.memory=nokmem 45BOARD_KERNEL_CMDLINE += usbcore.autosuspend=7 46BOARD_KERNEL_CMDLINE += androidboot.usbcontroller=a600000.dwc3 swiotlb=2048 47BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/1d84000.ufshc 48BOARD_KERNEL_CMDLINE += loop.max_part=7 49BOARD_KERNEL_CMDLINE += cgroup_disable=pressure 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/coral-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 66AB_OTA_UPDATER := true 67 68AB_OTA_PARTITIONS += \ 69 boot \ 70 system \ 71 vbmeta \ 72 dtbo \ 73 product \ 74 system_ext \ 75 vbmeta_system 76 77# Partitions (listed in the file) to be wiped under recovery. 78TARGET_RECOVERY_WIPE := device/google/coral/recovery.wipe 79TARGET_RECOVERY_FSTAB := device/google/coral/fstab.hardware 80TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888 81TARGET_RECOVERY_UI_LIB := \ 82 librecovery_ui_pixel \ 83 libfstab 84 85# Enable chain partition for system. 86BOARD_AVB_VBMETA_SYSTEM := system system_ext product 87BOARD_AVB_VBMETA_SYSTEM_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem 88BOARD_AVB_VBMETA_SYSTEM_ALGORITHM := SHA256_RSA2048 89BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) 90BOARD_AVB_VBMETA_SYSTEM_ROLLBACK_INDEX_LOCATION := 1 91 92# product.img 93BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4 94 95# system_ext.img 96BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4 97 98# userdata.img 99TARGET_USERIMAGES_USE_F2FS := true 100BOARD_USERDATAIMAGE_PARTITION_SIZE := 10737418240 101BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs 102 103# persist.img 104BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432 105BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4 106 107# boot.img 108BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000 109 110BOARD_FLASH_BLOCK_SIZE := 131072 111 112BOARD_ROOT_EXTRA_SYMLINKS := /mnt/vendor/persist:/persist 113 114include device/google/coral-sepolicy/coral-sepolicy.mk 115 116TARGET_FS_CONFIG_GEN := device/google/coral/config.fs 117 118QCOM_BOARD_PLATFORMS += msmnile 119QC_PROP_ROOT := vendor/qcom/sm8150/proprietary 120QC_PROP_PATH := $(QC_PROP_ROOT) 121BOARD_HAVE_BLUETOOTH_QCOM := true 122BOARD_HAVE_QCOM_FM := false 123TARGET_USE_QTI_BT_SAR := true 124BOARD_USES_COMMON_BLUETOOTH_HAL := true 125 126# Camera 127TARGET_USES_AOSP := true 128BOARD_QTI_CAMERA_32BIT_ONLY := false 129CAMERA_DAEMON_NOT_PRESENT := true 130TARGET_USES_ION := true 131 132# GPS 133TARGET_NO_RPC := true 134TARGET_USES_HARDWARE_QCOM_GPS := false 135BOARD_VENDOR_QCOM_GPS_LOC_API_HARDWARE := default 136BOARD_VENDOR_QCOM_LOC_PDK_FEATURE_SET := true 137 138# RenderScript 139OVERRIDE_RS_DRIVER := libRSDriver_adreno.so 140 141# Sensors 142USE_SENSOR_MULTI_HAL := true 143TARGET_SUPPORT_DIRECT_REPORT := true 144# Enable sensor Version V_2 145USE_SENSOR_HAL_VER := 2.0 146 147# CHRE 148CHRE_DAEMON_ENABLED := true 149CHRE_DAEMON_LPMA_ENABLED := true 150CHRE_DAEMON_LOAD_INTO_SENSORSPD := true 151CHRE_DAEMON_USE_SDSPRPC := true 152 153# wlan 154BOARD_WLAN_DEVICE := qcwcn 155BOARD_WPA_SUPPLICANT_DRIVER := NL80211 156BOARD_HOSTAPD_DRIVER := NL80211 157WIFI_DRIVER_DEFAULT := qca_cld3 158WPA_SUPPLICANT_VERSION := VER_0_8_X 159BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) 160BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE) 161WIFI_HIDL_FEATURE_AWARE := true 162WIFI_HIDL_FEATURE_DUAL_INTERFACE:= true 163WIFI_FEATURE_WIFI_EXT_HAL := true 164WIFI_FEATURE_IMU_DETECTION := true 165WIFI_HIDL_UNIFIED_SUPPLICANT_SERVICE_RC_ENTRY := 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 173AUDIO_FEATURE_CONFIG_CIRRUS_RX_CHANNELS := 4 174BOARD_SUPPORTS_SOUND_TRIGGER := true 175AUDIO_FEATURE_FLICKER_SENSOR_INPUT := false 176SOUND_TRIGGER_FEATURE_LPMA_ENABLED := true 177AUDIO_FEATURE_ENABLED_MAXX_AUDIO := true 178AUDIO_FEATURE_ENABLED_24BITS_CAMCORDER := true 179AUDIO_FEATURE_ENABLED_AUDIO_ZOOM := true 180AUDIO_FEATURE_ENABLED_INSTANCE_ID := true 181 182# Audio hal flag 183TARGET_USES_HARDWARE_QCOM_AUDIO := true 184TARGET_USES_HARDWARE_QCOM_AUDIO_PLATFORM_8974 := true 185TARGET_USES_HARDWARE_QCOM_AUDIO_POSTPROC := true 186TARGET_USES_HARDWARE_QCOM_AUDIO_VOLUME_LISTENER := true 187TARGET_USES_HARDWARE_QCOM_AUDIO_GET_MMAP_DATA_FD := true 188TARGET_USES_HARDWARE_QCOM_AUDIO_APP_TYPE_CFG := true 189TARGET_USES_HARDWARE_QCOM_AUDIO_ACDB_INIT_V2_CVD := true 190TARGET_USES_HARDWARE_QCOM_AUDIO_MAX_TARGET_SPECIFIC_CHANNEL_CNT := "4" 191TARGET_USES_HARDWARE_QCOM_AUDIO_INCALL_MUSIC_ENABLED := true 192TARGET_USES_HARDWARE_QCOM_AUDIO_MULTIPLE_HW_VARIANTS_ENABLED := true 193TARGET_USES_HARDWARE_QCOM_AUDIO_INCALL_STEREO_CAPTURE_ENABLED := true 194 195# SoundTrigger hal flag of new codec 196USE_SOUND_TRIGGER_HAL := iaxxx 197# Setup configuration in Soong namespace 198$(call soong_config_set,knowles,use_sound_trigger_hal,$(USE_SOUND_TRIGGER_HAL)) 199ifeq ($(PLATFORM_VERSION),P) 200$(call soong_config_set,knowles,sound_trigger_hal_is_android_p,true) 201endif 202 203# Graphics 204TARGET_USES_GRALLOC1 := true 205TARGET_USES_HWC2 := true 206 207# Display 208TARGET_USES_DISPLAY_RENDER_INTENTS := true 209TARGET_USES_COLOR_METADATA := true 210TARGET_USES_DRM_PP := true 211TARGET_HAS_WIDE_COLOR_DISPLAY := true 212TARGET_HAS_HDR_DISPLAY := true 213 214# Vendor Interface Manifest 215DEVICE_MANIFEST_FILE := device/google/coral/manifest.xml 216DEVICE_MATRIX_FILE := device/google/coral/compatibility_matrix.xml 217# Intall device framework compatibility matrix to product partition 218DEVICE_PRODUCT_COMPATIBILITY_MATRIX_FILE := device/google/coral/device_framework_matrix_product.xml 219 220# Use mke2fs to create ext4 images 221TARGET_USES_MKE2FS := true 222 223# Kernel modules 224ifeq (,$(filter-out flame_kasan coral_kasan, $(TARGET_PRODUCT))) 225BOARD_VENDOR_KERNEL_MODULES += \ 226 $(wildcard device/google/coral-kernel/kasan/*.ko) 227else ifeq (,$(filter-out flame_hwasan coral_hwasan, $(TARGET_PRODUCT))) 228BOARD_VENDOR_KERNEL_MODULES += \ 229 $(wildcard device/google/coral-kernel/khwasan/*.ko) 230else ifeq (,$(filter-out flame_boundsan coral_boundsan, $(TARGET_PRODUCT))) 231BOARD_VENDOR_KERNEL_MODULES += \ 232 $(wildcard device/google/coral-kernel/boundsan/*.ko) 233else ifeq (,$(filter-out flame_kernel_debug_memory coral_kernel_debug_memory, $(TARGET_PRODUCT))) 234BOARD_VENDOR_KERNEL_MODULES += \ 235 $(wildcard device/google/coral-kernel/debug_memory/*.ko) 236else ifeq (,$(filter-out flame_kernel_debug_memory_accounting coral_kernel_debug_memory_accounting, $(TARGET_PRODUCT))) 237BOARD_VENDOR_KERNEL_MODULES += \ 238 $(wildcard device/google/coral-kernel/debug_memory_accounting/*.ko) 239BOARD_KERNEL_CMDLINE += page_owner=on 240else ifeq (,$(filter-out flame_kernel_debug_locking coral_kernel_debug_locking, $(TARGET_PRODUCT))) 241BOARD_VENDOR_KERNEL_MODULES += \ 242 $(wildcard device/google/coral-kernel/debug_locking/*.ko) 243else ifeq (,$(filter-out flame_kernel_debug_hang coral_kernel_debug_hang, $(TARGET_PRODUCT))) 244BOARD_VENDOR_KERNEL_MODULES += \ 245 $(wildcard device/google/coral-kernel/debug_hang/*.ko) 246else ifeq (,$(filter-out flame_kernel_debug_api coral_kernel_debug_api, $(TARGET_PRODUCT))) 247BOARD_VENDOR_KERNEL_MODULES += \ 248 $(wildcard device/google/coral-kernel/debug_api/*.ko) 249else 250BOARD_VENDOR_KERNEL_MODULES += \ 251 $(wildcard device/google/coral-kernel/*.ko) 252endif 253 254BOARD_SUPER_PARTITION_SIZE := 9755951104 255BOARD_SUPER_PARTITION_GROUPS := google_dynamic_partitions 256BOARD_GOOGLE_DYNAMIC_PARTITIONS_PARTITION_LIST := \ 257 system \ 258 vendor \ 259 product \ 260 system_ext 261 262#BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE is set to BOARD_SUPER_PARTITION_SIZE / 2 - 4MB 263BOARD_GOOGLE_DYNAMIC_PARTITIONS_SIZE := 4873781248 264 265# Set error limit to BOARD_SUPER_PARTITON_SIZE - 100MB 266BOARD_SUPER_PARTITION_ERROR_LIMIT := 9651093504 267 268# DTB 269ifeq (,$(filter-out coral_kasan flame_kasan, $(TARGET_PRODUCT))) 270BOARD_PREBUILT_DTBIMAGE_DIR := device/google/coral-kernel/kasan 271else ifeq (,$(filter-out flame_kernel_debug_memory coral_kernel_debug_memory, $(TARGET_PRODUCT))) 272BOARD_PREBUILT_DTBIMAGE_DIR := device/google/coral-kernel/debug_memory 273else ifeq (,$(filter-out flame_kernel_debug_memory_accounting coral_kernel_debug_memory_accounting, $(TARGET_PRODUCT))) 274BOARD_PREBUILT_DTBIMAGE_DIR := device/google/coral-kernel/debug_memory_accounting 275else ifeq (,$(filter-out flame_kernel_debug_locking coral_kernel_debug_locking, $(TARGET_PRODUCT))) 276BOARD_PREBUILT_DTBIMAGE_DIR := device/google/coral-kernel/debug_locking 277else ifeq (,$(filter-out flame_kernel_debug_hang coral_kernel_debug_hang, $(TARGET_PRODUCT))) 278BOARD_PREBUILT_DTBIMAGE_DIR := device/google/coral-kernel/debug_hang 279else ifeq (,$(filter-out flame_kernel_debug_api coral_kernel_debug_api, $(TARGET_PRODUCT))) 280BOARD_PREBUILT_DTBIMAGE_DIR := device/google/coral-kernel/debug_api 281else 282BOARD_PREBUILT_DTBIMAGE_DIR := device/google/coral-kernel 283endif 284 285# Testing related defines 286BOARD_PERFSETUP_SCRIPT := platform_testing/scripts/perf-setup/c2f2-setup.sh 287 288-include vendor/google_devices/coral/proprietary/BoardConfigVendor.mk 289