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