1# 2# Copyright (C) 2017 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 17PRODUCT_MANIFEST_FILES += device/google/cuttlefish/shared/config/product_manifest.xml 18SYSTEM_EXT_MANIFEST_FILES += device/google/cuttlefish/shared/config/system_ext_manifest.xml 19 20$(call inherit-product, packages/services/Car/car_product/build/car_vendor.mk) 21 22$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk) 23$(call inherit-product, device/google/cuttlefish/shared/bluetooth/device_vendor.mk) 24$(call inherit-product, device/google/cuttlefish/shared/gnss/device_vendor.mk) 25$(call inherit-product, device/google/cuttlefish/shared/graphics/device_vendor.mk) 26$(call inherit-product, device/google/cuttlefish/shared/secure_element/device_vendor.mk) 27$(call inherit-product, device/google/cuttlefish/shared/swiftshader/device_vendor.mk) 28$(call inherit-product, device/google/cuttlefish/shared/telephony/device_vendor.mk) 29$(call inherit-product, device/google/cuttlefish/shared/sensors/device_vendor.mk) 30$(call inherit-product, device/google/cuttlefish/shared/device.mk) 31 32# Extend cuttlefish common sepolicy with auto-specific functionality 33BOARD_SEPOLICY_DIRS += device/google/cuttlefish/shared/auto/sepolicy \ 34 device/google/cuttlefish/shared/auto/sepolicy/vendor \ 35 36SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += device/google/cuttlefish/shared/auto/sepolicy/system_ext/private 37SYSTEM_EXT_PUBLIC_SEPOLICY_DIRS += device/google/cuttlefish/shared/auto/sepolicy/system_ext/public 38 39################################################ 40# Begin general Android Auto Embedded configurations 41 42PRODUCT_COPY_FILES += \ 43 packages/services/Car/car_product/init/init.bootstat.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.bootstat.rc \ 44 packages/services/Car/car_product/init/init.car.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.car.rc 45 46ifneq ($(LOCAL_SENSOR_FILE_OVERRIDES),true) 47 PRODUCT_COPY_FILES += \ 48 frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \ 49 frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml 50endif 51 52PRODUCT_PRODUCT_PROPERTIES += \ 53 ro.boot.uwbcountrycode=US 54 55PRODUCT_SYSTEM_PROPERTIES += \ 56 ro.sys.hibernate_enabled=1 \ 57 ro.sys.swap_storage_device=/dev/block/vda19 58 59PRODUCT_COPY_FILES += \ 60 frameworks/native/data/etc/car_core_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/car_core_hardware.xml \ 61 frameworks/native/data/etc/android.hardware.broadcastradio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.broadcastradio.xml \ 62 frameworks/native/data/etc/android.hardware.touchscreen.multitouch.distinct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.distinct.xml \ 63 frameworks/native/data/etc/android.hardware.screen.landscape.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.landscape.xml \ 64 frameworks/native/data/etc/android.software.activities_on_secondary_displays.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.activities_on_secondary_displays.xml \ 65 66# Preinstalled packages per user type 67PRODUCT_COPY_FILES += \ 68 device/google/cuttlefish/shared/auto/preinstalled-packages-product-car-cuttlefish.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/sysconfig/preinstalled-packages-product-car-cuttlefish.xml 69 70ifndef LOCAL_AUDIO_PRODUCT_COPY_FILES 71LOCAL_AUDIO_PRODUCT_COPY_FILES := \ 72 device/google/cuttlefish/shared/auto/car_audio_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/car_audio_configuration.xml \ 73 device/google/cuttlefish/shared/auto/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \ 74 frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \ 75 frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml 76LOCAL_AUDIO_PRODUCT_COPY_FILES += \ 77 device/google/cuttlefish/shared/auto/audio_effects_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects_config.xml 78endif 79 80# Install automotive specific battery health HAL 81PRODUCT_PACKAGES += \ 82 android.hardware.health-service.automotive \ 83 android.hardware.health-service.automotive_recovery \ 84 85# Include display settings for an auto device. 86PRODUCT_COPY_FILES += \ 87 device/google/cuttlefish/shared/auto/display_settings.xml:$(TARGET_COPY_OUT_VENDOR)/etc/display_settings.xml 88 89# Include the fstab needed for suspend to disk 90PRODUCT_COPY_FILES += \ 91 device/google/cuttlefish/shared/auto/hibernation_swap/fstab.hibernationswap:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.hibernationswap 92 93# vehicle HAL 94ifeq ($(LOCAL_VHAL_PRODUCT_PACKAGE),) 95 LOCAL_VHAL_PRODUCT_PACKAGE := com.android.hardware.automotive.vehicle.cf 96 BOARD_SEPOLICY_DIRS += device/google/cuttlefish/shared/auto/sepolicy/vhal 97endif 98PRODUCT_PACKAGES += $(LOCAL_VHAL_PRODUCT_PACKAGE) 99 100# Ethernet setup script for vehicle HAL 101ENABLE_AUTO_ETHERNET ?= true 102ifeq ($(ENABLE_AUTO_ETHERNET), true) 103 PRODUCT_PACKAGES += auto_ethernet_setup_script 104 PRODUCT_PACKAGES += auto_ethernet_config_script 105endif 106 107# Remote access HAL 108PRODUCT_PACKAGES += android.hardware.automotive.remoteaccess@V2-default-service 109 110# Broadcast Radio 111PRODUCT_PACKAGES += android.hardware.broadcastradio-service.default 112 113# IVN HAL 114PRODUCT_PACKAGES += android.hardware.automotive.ivn@V1-default-service 115 116# AudioControl HAL 117ifeq ($(LOCAL_AUDIOCONTROL_HAL_PRODUCT_PACKAGE),) 118 LOCAL_AUDIOCONTROL_HAL_PRODUCT_PACKAGE := android.hardware.automotive.audiocontrol-service.example 119 BOARD_SEPOLICY_DIRS += device/google/cuttlefish/shared/auto/sepolicy/audio 120endif 121PRODUCT_PACKAGES += $(LOCAL_AUDIOCONTROL_HAL_PRODUCT_PACKAGE) 122 123# CAN bus HAL 124PRODUCT_PACKAGES += android.hardware.automotive.can-service 125 126# MACSEC HAL 127PRODUCT_PACKAGES += android.hardware.macsec-service 128PRODUCT_PACKAGES += wpa_supplicant_macsec 129PRODUCT_COPY_FILES += \ 130 $(LOCAL_PATH)/macsec/wpa_supplicant_macsec.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wpa_supplicant_macsec.conf \ 131 $(LOCAL_PATH)/macsec/init.wpa_supplicant_macsec.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.wpa_supplicant_macsec.rc 132 133# Occupant Awareness HAL 134PRODUCT_PACKAGES += android.hardware.automotive.occupant_awareness@1.0-service 135include packages/services/Car/car_product/occupant_awareness/OccupantAwareness.mk 136BOARD_SEPOLICY_DIRS += packages/services/Car/car_product/occupant_awareness/sepolicy 137 138# EVS 139# By default, we enable EvsManager, a sample EVS app, and a mock EVS HAL implementation. 140# If you want to use your own EVS HAL implementation, please set ENABLE_MOCK_EVSHAL as false 141# and add your HAL implementation to the product. Please also check init.evs.rc and see how 142# you can configure EvsManager to use your EVS HAL implementation. Similarly, please set 143# ENABLE_SAMPLE_EVS_APP as false if you want to use your own EVS app configuration or own EVS 144# app implementation. 145ENABLE_EVS_SERVICE ?= true 146ENABLE_MOCK_EVSHAL ?= true 147ENABLE_CAREVSSERVICE_SAMPLE ?= true 148ENABLE_SAMPLE_EVS_APP ?= true 149ENABLE_CARTELEMETRY_SERVICE ?= true 150 151ifeq ($(ENABLE_MOCK_EVSHAL), true) 152CUSTOMIZE_EVS_SERVICE_PARAMETER := true 153PRODUCT_PACKAGES += android.hardware.automotive.evs-aidl-default-service 154PRODUCT_COPY_FILES += \ 155 device/google/cuttlefish/shared/auto/evs/init.evs.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.evs.rc 156endif 157BOARD_SEPOLICY_DIRS += device/google/cuttlefish/shared/auto/sepolicy/evs 158 159ifeq ($(ENABLE_SAMPLE_EVS_APP), true) 160PRODUCT_COPY_FILES += \ 161 device/google/cuttlefish/shared/auto/evs/evs_app_config.json:$(TARGET_COPY_OUT_VENDOR)/etc/automotive/evs/config_override.json 162endif 163 164BOARD_IS_AUTOMOTIVE := true 165 166DEVICE_PACKAGE_OVERLAYS += device/google/cuttlefish/shared/auto/overlay 167 168PRODUCT_PACKAGES += CarServiceOverlayCuttleFish 169GOOGLE_CAR_SERVICE_OVERLAY += CarServiceOverlayCuttleFishGoogle 170 171PRODUCT_PACKAGES += ConnectivityOverlayCuttleFish 172GOOGLE_CAR_SERVICE_OVERLAY += ConnectivityOverlayCuttleFishGoogle 173 174TARGET_BOARD_INFO_FILE ?= device/google/cuttlefish/shared/auto/android-info.txt 175BOARD_BOOTCONFIG += androidboot.hibernation_resume_device=259:3 176