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 17PRODUCT_HARDWARE := beagle_x15board 18 19# Enable updating of APEXes 20$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk) 21 22PRODUCT_SOONG_NAMESPACES += \ 23 device/ti/beagle_x15 \ 24 hardware/ti/am57x 25 26# Adjust the dalvik heap to be appropriate for a tablet. 27$(call inherit-product, frameworks/native/build/tablet-7in-xhdpi-2048-dalvik-heap.mk) 28 29PRODUCT_SHIPPING_API_LEVEL := 29 30PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false 31 32# Set custom settings 33DEVICE_PACKAGE_OVERLAYS := device/ti/beagle_x15/overlay 34PREBUILT_DIR := device/ti/beagle_x15-kernel 35 36# Helper variables for working with kernel files 37ifneq ($(KERNELDIR),) 38 KERNEL_MAJ := $(shell grep '^VERSION' $(KERNELDIR)/Makefile | cut -d " " -f 3) 39 KERNEL_MIN := $(shell grep '^PATCHLEVEL' $(KERNELDIR)/Makefile | cut -d " " -f 3) 40 TARGET_KERNEL_USE := $(KERNEL_MAJ).$(KERNEL_MIN) 41 42 LOCAL_KERNEL_HOME := $(KERNELDIR) 43 LOCAL_KERNEL := $(KERNELDIR)/arch/arm/boot/zImage 44 45 # Check if kernel/omap or linux-mainline is used 46 ifneq ($(wildcard $(KERNELDIR)/arch/arm/boot/dts/ti/.*),) 47 DTB_DIR := $(KERNELDIR)/arch/arm/boot/dts/ti 48 else 49 DTB_DIR := $(KERNELDIR)/arch/arm/boot/dts 50 endif 51 DTBO_DIR := $(KERNELDIR)/arch/arm/boot/dts/ti 52else 53 TARGET_KERNEL_USE ?= 4.14 54 KERNEL_MAJ := $(word 1, $(subst ., ,$(TARGET_KERNEL_USE))) 55 KERNEL_MIN := $(word 2, $(subst ., ,$(TARGET_KERNEL_USE))) 56 57 LOCAL_KERNEL_HOME ?= $(PREBUILT_DIR)/$(TARGET_KERNEL_USE) 58 LOCAL_KERNEL := $(LOCAL_KERNEL_HOME)/zImage 59 DTB_DIR := $(LOCAL_KERNEL_HOME) 60 DTBO_DIR := $(DTB_DIR) 61endif 62 63TARGET_PREBUILT_KERNEL := $(LOCAL_KERNEL) 64PRODUCT_COPY_FILES += $(LOCAL_KERNEL):kernel 65 66# Graphics 67PRODUCT_PACKAGES += \ 68 android.hardware.graphics.allocator@2.0-impl \ 69 android.hardware.graphics.allocator@2.0-service \ 70 android.hardware.graphics.mapper@2.0-impl \ 71 android.hardware.graphics.mapper@2.0-service \ 72 android.hardware.graphics.composer@2.1-impl \ 73 android.hardware.graphics.composer@2.1-service \ 74 android.hardware.boot@1.0-impl:64 \ 75 android.hardware.boot@1.0-service \ 76 android.hardware.fastboot@1.0 \ 77 android.hardware.fastboot@1.0-impl-mock \ 78 libdrm \ 79 libdrm_omap \ 80 gralloc.am57x \ 81 libEGL_POWERVR_SGX544_116 \ 82 libGLESv1_CM_POWERVR_SGX544_116 \ 83 libGLESv2_POWERVR_SGX544_116 \ 84 libPVRScopeServices \ 85 memtrack.am57x \ 86 pvrsrvctl \ 87 88ifeq ($(USE_TI_HWC), y) 89PRODUCT_PACKAGES += hwcomposer.am57x 90else 91PRODUCT_PACKAGES += hwcomposer.drm_imagination 92PRODUCT_PROPERTY_OVERRIDES += ro.hardware.hwcomposer=drm_imagination 93endif 94 95# Software Gatekeeper HAL 96PRODUCT_PACKAGES += \ 97 android.hardware.gatekeeper@1.0-service.software \ 98 99#Health 100PRODUCT_PACKAGES += \ 101 android.hardware.health@2.1-impl \ 102 android.hardware.health@2.1-service \ 103 104#Security 105PRODUCT_PACKAGES += \ 106 android.hardware.keymaster@3.0-impl \ 107 android.hardware.keymaster@3.0-service \ 108 android.hardware.drm@1.0-impl \ 109 android.hardware.drm@1.0-service \ 110 111# Audio 112PRODUCT_PACKAGES += \ 113 android.hardware.audio@2.0-impl \ 114 android.hardware.audio@2.0-service \ 115 android.hardware.audio.effect@2.0-impl \ 116 android.hardware.audio.effect@2.0-service \ 117 118# Audio policy configuration 119USE_XML_AUDIO_POLICY_CONF := 1 120PRODUCT_COPY_FILES += \ 121 device/ti/beagle_x15/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ 122 frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \ 123 frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \ 124 frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \ 125 frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \ 126 frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \ 127 frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ 128 129# Memtrack 130PRODUCT_PACKAGES += \ 131 android.hardware.memtrack@1.0-impl \ 132 android.hardware.memtrack@1.0-service \ 133 134PRODUCT_PROPERTY_OVERRIDES += \ 135 ro.opengles.version=131072 \ 136 ro.sf.lcd_density=160 \ 137 138# All VNDK libraries (HAL interfaces, VNDK, VNDK-SP, LL-NDK) 139PRODUCT_PACKAGES += vndk_package 140 141# USB 142PRODUCT_PACKAGES += \ 143 android.hardware.usb@1.0-service \ 144 145PRODUCT_COPY_FILES += \ 146 frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \ 147 frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \ 148 149PRODUCT_DEFAULT_PROPERTY_OVERRIDES += \ 150 persist.sys.usb.config=mtp \ 151 152ifeq ($(KERNEL_MAJ),4) 153 TARGET_FSTAB := fstab.beagle_x15board_v4 154else 155 TARGET_FSTAB := fstab.beagle_x15board_v5 156endif 157 158PRODUCT_COPY_FILES += \ 159 $(LOCAL_PATH)/init.recovery.hardware.rc:recovery/root/init.recovery.$(PRODUCT_HARDWARE).rc \ 160 device/ti/beagle_x15/tablet_core_hardware_beagle_x15.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/tablet_core_hardware_beagle_x15.xml \ 161 device/ti/beagle_x15/init.beagle_x15board.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.beagle_x15board.rc \ 162 device/ti/beagle_x15/init.beagle_x15board.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.beagle_x15board.usb.rc \ 163 device/ti/beagle_x15/ueventd.beagle_x15board.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \ 164 device/ti/beagle_x15/$(TARGET_FSTAB):$(TARGET_COPY_OUT_RAMDISK)/fstab.beagle_x15board \ 165 device/ti/beagle_x15/$(TARGET_FSTAB):$(TARGET_COPY_OUT_VENDOR)/etc/fstab.beagle_x15board \ 166 frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \ 167 168#FIXME: this feature should be turned off as soon as google start checking for WIFI support before wifi calls 169PRODUCT_COPY_FILES += \ 170 frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \ 171 172# Static modprobe for recovery image 173PRODUCT_PACKAGES += \ 174 toybox_static \ 175 176PRODUCT_CHARACTERISTICS := tablet,nosdcard 177 178PRODUCT_PACKAGES += \ 179 toybox_vendor \ 180 Launcher3 \ 181 WallpaperPicker \ 182 sh_vendor \ 183 vintf \ 184 netutils-wrapper-1.0 \ 185 messaging \ 186 healthd \ 187 gatekeeperd \ 188 189# Boot control 190PRODUCT_PACKAGES += \ 191 bootctrl.am57x \ 192 193PRODUCT_PACKAGES_DEBUG += \ 194 bootctl \ 195 fastbootd \ 196# A/B 197PRODUCT_PACKAGES += \ 198 update_engine \ 199 update_verifier 200 201PRODUCT_PACKAGES += \ 202 update_engine_sideload 203 204PRODUCT_PACKAGES_DEBUG += \ 205 update_engine_client 206 207PRODUCT_USE_DYNAMIC_PARTITIONS := true 208