1# 2# Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/ 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 17TARGET_ARCH := arm 18TARGET_ARCH_VARIANT := armv7-a-neon 19TARGET_CPU_VARIANT := cortex-a15 20TARGET_CPU_ABI := armeabi-v7a 21TARGET_CPU_ABI2 := armeabi 22TARGET_CPU_SMP := true 23 24TARGET_BOOTIMAGE_FIT := true 25TARGET_USES_64_BIT_BINDER := true 26 27#Treble 28PRODUCT_FULL_TREBLE_OVERRIDE := true 29BOARD_VNDK_VERSION := current 30 31# Use mke2fs to create ext4 images 32TARGET_USES_MKE2FS := true 33TARGET_USES_HWC2 := true 34 35DEVICE_MANIFEST_FILE := device/ti/beagle_x15/manifest.xml 36DEVICE_MATRIX_FILE := device/ti/beagle_x15/compatibility_matrix.xml 37 38PRODUCT_ENFORCE_VINTF_MANIFEST_OVERRIDE := true 39 40BOARD_FLASH_BLOCK_SIZE := 4096 41 42USE_CAMERA_STUB := true 43 44BOARD_BOOTIMAGE_PARTITION_SIZE := 20971520 # 20 MiB 45BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864 # 64 MiB 46BOARD_USERDATAIMAGE_PARTITION_SIZE := 961658368 # ~917 MiB 47BOARD_DTBOIMG_PARTITION_SIZE := 8388608 # 8 MiB 48 49BOARD_SUPER_PARTITION_SIZE := 2684354560 # 2560 MiB 50BOARD_SUPER_PARTITION_GROUPS := group_oem 51# In case when A/B is enabled and we have only one group: 52# size_group = (size_super - 1 MiB) / 2 53BOARD_GROUP_OEM_SIZE := 1341652992 # 1279.5 MiB 54BOARD_GROUP_OEM_PARTITION_LIST := system vendor 55BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true 56BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true 57 58TARGET_USERIMAGES_USE_EXT4 := true 59BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 60 61TARGET_BOOTLOADER_BOARD_NAME := beagle_x15board 62TARGET_BOARD_PLATFORM := am57x 63TARGET_COPY_OUT_VENDOR := vendor 64 65TARGET_RECOVERY_FSTAB := device/ti/beagle_x15/$(TARGET_FSTAB) 66TARGET_RECOVERY_PIXEL_FORMAT := "BGRA_8888" 67TARGET_RECOVERY_UI_LIB := librecovery_ui_beagle_x15 68TARGET_RELEASETOOLS_EXTENSIONS := device/ti/beagle_x15 69 70BOARD_SEPOLICY_DIRS += \ 71 device/ti/beagle_x15/sepolicy 72 73ifeq ($(TARGET_PRODUCT),beagle_x15_auto) 74BOARD_SEPOLICY_DIRS += \ 75 packages/services/Car/car_product/sepolicy 76 77DEVICE_MANIFEST_FILE += device/ti/beagle_x15/auto/manifest.xml 78endif 79 80BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true 81 82# Copy uboot prebuilts 83PRODUCT_COPY_FILES += \ 84 device/ti/beagle_x15/bootloader/MLO:$(TARGET_OUT)/MLO \ 85 device/ti/beagle_x15/bootloader/u-boot.img:$(TARGET_OUT)/u-boot.img \ 86 87 88# Copy kernel modules (including pvrsrvkm.ko) into /vendor/lib/modules 89BOARD_ALL_MODULES := $(shell find $(LOCAL_KERNEL_HOME) -type f -iname '*.ko') 90BOARD_VENDOR_KERNEL_MODULES += $(BOARD_ALL_MODULES) 91 92# Check if SGX kernel module is present in chosen kernel directory 93SGX_KO := $(shell find $(LOCAL_KERNEL_HOME) -type f -name 'pvrsrvkm.ko') 94ifeq ($(SGX_KO),) 95 $(warning SGX module (pvrsrvkm.ko) not found, graphics will not work) 96 $(warning SGX module search path is: $(LOCAL_KERNEL_HOME)) 97endif 98 99BOARD_AVB_ENABLE := true 100 101# Include *.dtb to boot.img and use Android Boot Image v2 102BOARD_INCLUDE_DTB_IN_BOOTIMG := true 103BOARD_MKBOOTIMG_ARGS := --header_version 2 104 105# Pass unsigned dtbo image (generated by build/tasks/dtimages.mk) to Android 106# build system for AVB signing 107DTBO_UNSIGNED := dtbo-unsigned.img 108# $(PRODUCT_OUT) hasn't been defined yet, so use "=" instead of ":=" 109# so that it is resolved later 110BOARD_PREBUILT_DTBOIMAGE = $(PRODUCT_OUT)/$(DTBO_UNSIGNED) 111 112# Board uses A/B OTA. 113AB_OTA_UPDATER := true 114# A/B updater updatable partitions list. Keep in sync with the partition list 115# with "_a" and "_b" variants in the device. Note that the vendor can add more 116# partitions to this list for the bootloader and radio. 117AB_OTA_PARTITIONS += \ 118 boot \ 119 system \ 120 vbmeta \ 121 dtbo \ 122 vendor 123