1# 2# Product-specific compile-time definitions. 3# 4# The generic product target doesn't have any hardware-specific pieces. 5# Primary Arch 6TARGET_ARCH := arm64 7TARGET_ARCH_VARIANT := armv8-a 8TARGET_CPU_ABI := arm64-v8a 9TARGET_CPU_VARIANT := cortex-a53 10 11# Secondary Arch 12TARGET_2ND_ARCH := arm 13TARGET_2ND_ARCH_VARIANT := armv8-a 14TARGET_2ND_CPU_ABI := armeabi-v7a 15TARGET_2ND_CPU_ABI2 := armeabi 16TARGET_2ND_CPU_VARIANT := cortex-a53 17 18TARGET_USES_64_BIT_BINDER := true 19TARGET_SUPPORTS_64_BIT_APPS := true 20 21TARGET_BOARD_PLATFORM := yukawa 22 23# Vulkan 24BOARD_INSTALL_VULKAN := true 25# BT configs 26BOARD_HAVE_BLUETOOTH := true 27 28# generic wifi 29WPA_SUPPLICANT_VERSION := VER_0_8_X 30BOARD_WPA_SUPPLICANT_DRIVER := NL80211 31BOARD_HOSTAPD_DRIVER := NL80211 32 33# Treble 34PRODUCT_FULL_TREBLE_OVERRIDE := true 35BOARD_VNDK_VERSION := current 36 37# AVB 38ifeq ($(TARGET_AVB_ENABLE), true) 39BOARD_AVB_ENABLE := true 40else 41BOARD_AVB_ENABLE := false 42endif 43 44TARGET_NO_BOOTLOADER := true 45TARGET_NO_KERNEL := false 46 47ifeq ($(TARGET_USE_AB_SLOT), true) 48BOARD_USES_RECOVERY_AS_BOOT := true 49AB_OTA_UPDATER := true 50 51AB_OTA_PARTITIONS += \ 52 boot \ 53 system \ 54 vendor \ 55 vbmeta 56endif 57 58BOARD_BOOTIMAGE_PARTITION_SIZE := 33554432 59BOARD_DTBOIMG_PARTITION_SIZE := 8388608 # 8 MiB 60BOARD_SYSTEMIMAGE_FILE_SYSTEM_TYPE ?= ext4 61BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 62ifneq ($(TARGET_USE_AB_SLOT), true) 63BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456 64BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 65endif 66TARGET_USERIMAGES_USE_EXT4 := true 67TARGET_COPY_OUT_VENDOR := vendor 68 69# Super partition 70TARGET_USE_DYNAMIC_PARTITIONS := true 71BOARD_BUILD_SUPER_IMAGE_BY_DEFAULT := true 72BOARD_SUPER_PARTITION_GROUPS := db_dynamic_partitions 73BOARD_DB_DYNAMIC_PARTITIONS_PARTITION_LIST := system vendor 74ifeq ($(TARGET_USE_AB_SLOT), true) 75BOARD_SUPER_PARTITION_SIZE := 4831838208 76else 77BOARD_SUPER_PARTITION_SIZE := 2415919104 78endif 79BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 2415919104 80BOARD_SUPER_PARTITION_METADATA_DEVICE := super 81BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true 82 83 84# Recovery 85TARGET_RECOVERY_PIXEL_FORMAT := RGBX_8888 86ifeq ($(TARGET_AVB_ENABLE), true) 87ifeq ($(TARGET_USE_AB_SLOT), true) 88TARGET_RECOVERY_FSTAB := device/amlogic/yukawa/fstab.yukawa.avb.ab 89else 90TARGET_RECOVERY_FSTAB := device/amlogic/yukawa/fstab.recovery.yukawa.avb 91BOARD_RECOVERYIMAGE_PARTITION_SIZE := 33554432 92endif 93BOARD_AVB_RECOVERY_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem 94BOARD_AVB_RECOVERY_ALGORITHM := SHA256_RSA2048 95BOARD_AVB_RECOVERY_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) 96BOARD_AVB_RECOVERY_ROLLBACK_INDEX_LOCATION := 2 97else 98ifeq ($(TARGET_USE_AB_SLOT), true) 99TARGET_RECOVERY_FSTAB := device/amlogic/yukawa/fstab.yukawa 100else 101TARGET_RECOVERY_FSTAB := device/amlogic/yukawa/fstab.recovery.yukawa 102BOARD_RECOVERYIMAGE_PARTITION_SIZE := 33554432 103endif 104endif 105 106 107BOARD_KERNEL_OFFSET := 0x1080000 108BOARD_KERNEL_TAGS_OFFSET := 0x1000000 109BOARD_INCLUDE_DTB_IN_BOOTIMG := true 110BOARD_MKBOOTIMG_ARGS := --kernel_offset $(BOARD_KERNEL_OFFSET) 111BOARD_BOOT_HEADER_VERSION := 2 112BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) 113 114# Pass unsigned dtbo image (generated by build/tasks/dtimages.mk) to Android 115# build system for AVB signing 116DTBO_UNSIGNED := dtbo-unsigned.img 117# $(PRODUCT_OUT) hasn't been defined yet, so use "=" instead of ":=" 118# so that it is resolved later 119BOARD_PREBUILT_DTBOIMAGE = $(PRODUCT_OUT)/$(DTBO_UNSIGNED) 120 121 122BOARD_KERNEL_CMDLINE += no_console_suspend console=ttyAML0,115200 earlycon 123BOARD_KERNEL_CMDLINE += printk.devkmsg=on 124BOARD_KERNEL_CMDLINE += androidboot.boot_devices=soc/ffe07000.mmc 125BOARD_KERNEL_CMDLINE += init=/init 126BOARD_KERNEL_CMDLINE += firmware_class.path=/vendor/firmware 127BOARD_KERNEL_CMDLINE += androidboot.hardware=yukawa 128ifneq ($(TARGET_SELINUX_ENFORCE), true) 129BOARD_KERNEL_CMDLINE += androidboot.selinux=permissive 130endif 131ifeq ($(TARGET_BUILTIN_EDID), true) 132BOARD_KERNEL_CMDLINE += drm.edid_firmware=edid/1920x1080.bin 133endif 134 135USE_E2FSPROGS := true 136 137BOARD_USES_GENERIC_AUDIO := false 138BOARD_USES_ALSA_AUDIO := true 139TARGET_USES_MKE2FS := true 140TARGET_USES_HWC2 := true 141BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := device/amlogic/yukawa/bluetooth 142 143BOARD_SEPOLICY_DIRS += \ 144 device/amlogic/yukawa/sepolicy 145 146DEVICE_MANIFEST_FILE := device/amlogic/yukawa/manifest.xml 147ifeq ($(TARGET_USE_AB_SLOT), true) 148DEVICE_MANIFEST_FILE += device/amlogic/yukawa/manifest_ab.xml 149endif 150 151ifeq ($(TARGET_KERNEL_USE), 5.4) 152DEVICE_MANIFEST_FILE += device/amlogic/yukawa/manifest_kernel5.xml 153endif 154DEVICE_MATRIX_FILE := device/amlogic/yukawa/compatibility_matrix.xml 155# Generate an APEX image for experiment b/119800099. 156DEXPREOPT_GENERATE_APEX_IMAGE := true 157