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