1# 2# Copyright (C) 2020 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 17#RBC# type_hint string TROUT_KERNEL_IMAGE 18 19TARGET_USES_CF_RILD ?= false 20$(call inherit-product, device/google/cuttlefish/vsoc_arm64_only/auto/aosp_cf.mk) 21 22# Package ramdisk.img in target package 23BOARD_IMG_USE_RAMDISK := true 24 25# Kernel - prefer version 5.10 by default for trout 26TARGET_KERNEL_USE ?= 5.10 27 28TROUT_KERNEL_DIR ?= $(wildcard device/google/trout-kernel/$(TARGET_KERNEL_USE)-arm64) 29 30# Currently, the trout kernel prebuilt is not being distributed to partners and AOSP, 31# and thus we cannot rely on it existing outside of Google-internal builds. Make sure not to try 32# and include a missing kernel image. 33TROUT_KERNEL_IMAGE := $(wildcard $(TROUT_KERNEL_DIR)/Image) 34ifneq ($(TROUT_KERNEL_IMAGE),) 35ifndef TARGET_KERNEL_PATH 36TARGET_KERNEL_PATH := $(TROUT_KERNEL_IMAGE) 37endif 38endif 39 40TROUT_KO_DIR ?= $(TROUT_KERNEL_DIR) 41ifneq ($(TROUT_KO_DIR),) 42BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(wildcard $(TROUT_KO_DIR)/*.ko) 43endif 44 45# Audio HAL 46# TODO: turn back on goldfish HAL and HFP 47TARGET_USES_CUTTLEFISH_AUDIO ?= false 48AUDIO_FEATURE_HFP_ENABLED ?= true 49 50# HWComposer choice. Setting this flag to true 51# will disable Ranchu and turn on the legacy 52# drmhwc. This is not a supported configuration and 53# should only be turned on for debugging and experimental 54# purposes. In general, omitting this line or leaving the 55# default configured (false) will do the right thing and pick 56# Ranchu from upstream Cuttlefish 57TARGET_ENABLE_DRMHWCOMPOSER ?= false 58 59# Audio Control HAL 60# TODO (chenhaosjtuacm, egranata): move them to kernel command line 61LOCAL_AUDIOCONTROL_PROPERTIES ?= \ 62 ro.vendor.audiocontrol.server.cid=1000 \ 63 ro.vendor.audiocontrol.server.port=9410 \ 64 65# Tracing Server Address 66LOCAL_TRACING_SERVER_PROPERTIES ?= \ 67 ro.vendor.tracing.server.cid=1000 \ 68 ro.vendor.tracing.server.port=9510 \ 69 70include device/google/trout/aosp_trout_common.mk 71 72DEVICE_MANIFEST_FILE += device/google/trout/trout_arm64/manifest.xml 73 74PRODUCT_PROPERTY_OVERRIDES += \ 75 vendor.ser.bt-uart?= \ 76 77PRODUCT_PACKAGES += \ 78 vport_trigger \ 79 80# Sensor HAL 81# The implementations use SCMI, which only works on arm architecture 82LOCAL_SENSOR_PRODUCT_PACKAGE ?= \ 83 android.hardware.sensors@2.0-service.multihal \ 84 android.hardware.sensors@2.0-service.multihal.rc \ 85 android.hardware.sensors@2.0-Google-IIO-Subhal \ 86 87LOCAL_SENSOR_FILE_OVERRIDES := true 88 89UEVENTD_ODM_COPY_FILE ?= device/google/trout/product_files/odm/ueventd.rc 90 91PRODUCT_COPY_FILES += \ 92 $(UEVENTD_ODM_COPY_FILE):$(TARGET_COPY_OUT_ODM)/etc/ueventd.rc \ 93 device/google/trout/hal/sensors/2.0/config/sensor_hal_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/sensor_hal_configuration.xml \ 94 device/google/trout/product_files/odm/usr/idc/Vendor_0fff_Product_0fff.idc:$(TARGET_COPY_OUT_ODM)/usr/idc/Vendor_0fff_Product_0fff.idc \ 95 device/google/trout/product_files/vendor/etc/sensors/hals.conf:$(TARGET_COPY_OUT_VENDOR)/etc/sensors/hals.conf \ 96 frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \ 97 frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \ 98 99TARGET_USES_INITBOOT ?= false 100 101# WiFi configuration 102ifndef DEVICE_VIRTWIFI_PORT 103DEVICE_VIRTWIFI_PORT := eth0 104endif 105PRODUCT_PROPERTY_OVERRIDES += ro.vendor.disable_rename_eth0?=true 106PRODUCT_COPY_FILES += device/google/trout/trout_arm64/wifi/virtwifi.sh:$(TARGET_COPY_OUT_VENDOR)/bin/virtwifi.sh 107PRODUCT_COPY_FILES += device/google/trout/trout_arm64/wifi/virtwifi.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/virtwifi.rc 108 109PRODUCT_NAME := aosp_trout_arm64 110PRODUCT_DEVICE := trout_arm64 111PRODUCT_MODEL := arm64 trout 112