1PRODUCT_SOONG_NAMESPACES += device/amlogic/yukawa 2 3# Check vendor package version 4include device/amlogic/yukawa/vendor-package-ver.mk 5ifneq (,$(wildcard $(YUKAWA_VENDOR_PATH)/bt-wifi-firmware)) 6 ifneq (,$(wildcard $(YUKAWA_VENDOR_PATH)/bt-wifi-firmware/$(EXPECTED_YUKAWA_VENDOR_VERSION)/version.mk)) 7 # Unfortunately inherit-product doesn't export build variables from the 8 # called make file to the caller, so we have to include it directly here. 9 include $(YUKAWA_VENDOR_PATH)/bt-wifi-firmware/$(EXPECTED_YUKAWA_VENDOR_VERSION)/version.mk 10 ifneq ($(TARGET_YUKAWA_VENDOR_VERSION), $(EXPECTED_YUKAWA_VENDOR_VERSION)) 11 $(warning TARGET_YUKAWA_VENDOR_VERSION ($(TARGET_YUKAWA_VENDOR_VERSION)) does not match. Build may be invalid.) 12 $(warning Please download and extract the new binaries by running the following script:) 13 $(warning ./device/amlogic/yukawa/fetch-vendor-package.sh ) 14 endif 15 else 16 $(warning TARGET_YUKAWA_VENDOR_VERSION undefined.) 17 $(warning The vendor package version is incorrect. Please update the yukawa source tree.) 18 endif 19else 20 $(warning Missing yukawa vendor package!) 21 $(warning Please download and extract the vendor binaries by running the following script:) 22 $(warning ./device/amlogic/yukawa/fetch-vendor-package.sh ) 23endif 24 25ifeq ($(TARGET_PREBUILT_KERNEL),) 26LOCAL_KERNEL := device/amlogic/yukawa-kernel/$(TARGET_KERNEL_USE)/Image.lz4 27else 28LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL) 29endif 30 31PRODUCT_COPY_FILES += $(LOCAL_KERNEL):kernel 32 33# Build and run only ART 34PRODUCT_RUNTIMES := runtime_libart_default 35 36# Enable userspace reboot 37$(call inherit-product, $(SRC_TARGET_DIR)/product/userspace_reboot.mk) 38 39# Enable Virtual A/B 40$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/android_t_baseline.mk) 41PRODUCT_VIRTUAL_AB_COMPRESSION_METHOD := gz 42 43$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk) 44 45# Installs gsi keys into ramdisk, to boot a developer GSI with verified boot. 46$(call inherit-product, $(SRC_TARGET_DIR)/product/developer_gsi_keys.mk) 47 48DEVICE_PACKAGE_OVERLAYS := device/amlogic/yukawa/overlay 49ifeq ($(TARGET_USE_TABLET_LAUNCHER), true) 50# Setup tablet build 51$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk) 52$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk) 53# Packages to invoke RC pairing 54PRODUCT_CHARACTERISTICS := tablet 55else 56# Setup TV Build 57USE_OEM_TV_APP := true 58$(call inherit-product, device/google/atv/products/atv_base.mk) 59PRODUCT_CHARACTERISTICS := tv 60PRODUCT_IS_ATV := true 61endif 62 63# inherit binaries from the vendor package 64$(call inherit-product-if-exists, $(YUKAWA_VENDOR_PATH)/bt-wifi-firmware/$(EXPECTED_YUKAWA_VENDOR_VERSION)/vendor.mk) 65$(call inherit-product-if-exists, $(YUKAWA_VENDOR_PATH)/video_firmware/$(EXPECTED_YUKAWA_VENDOR_VERSION)/vendor.mk) 66$(call inherit-product-if-exists, $(YUKAWA_VENDOR_PATH)/gpu/$(EXPECTED_YUKAWA_VENDOR_VERSION)/vendor.mk) 67$(call inherit-product-if-exists, $(YUKAWA_VENDOR_PATH)/bootloader/$(EXPECTED_YUKAWA_VENDOR_VERSION)/vendor.mk) 68 69# A/B support 70PRODUCT_PACKAGES += \ 71 otapreopt_script \ 72 cppreopts.sh \ 73 update_engine \ 74 update_engine_sideload \ 75 update_verifier \ 76 sg_write_buffer \ 77 f2fs_io \ 78 check_f2fs 79 80# The following modules are included in debuggable builds only. 81PRODUCT_PACKAGES_DEBUG += \ 82 bootctl \ 83 update_engine_client \ 84 SystemUpdaterSample 85 86# Userdata Checkpointing OTA GC 87PRODUCT_PACKAGES += \ 88 checkpoint_gc 89 90# Boot control 91PRODUCT_PACKAGES += \ 92 com.android.hardware.boot \ 93 android.hardware.boot-service.default_recovery 94 95# Dynamic partitions 96PRODUCT_BUILD_SUPER_PARTITION := true 97PRODUCT_USE_DYNAMIC_PARTITIONS := true 98PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true 99 100PRODUCT_PACKAGES += \ 101 android.hardware.fastboot@1.1 \ 102 android.hardware.fastboot@1.1-impl-mock \ 103 fastbootd 104 105 106ifeq ($(TARGET_AVB_ENABLE), true) 107PRODUCT_COPY_FILES += \ 108 $(LOCAL_PATH)/fstab.yukawa.avb.ab:$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/fstab.yukawa \ 109 $(LOCAL_PATH)/fstab.yukawa.avb.ab:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.yukawa \ 110 $(LOCAL_PATH)/fstab.yukawa.avb.ab:$(TARGET_COPY_OUT_VENDOR_RAMDISK)/etc/fstab.yukawa 111else 112PRODUCT_COPY_FILES += \ 113 $(LOCAL_PATH)/fstab.yukawa.ab:$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/fstab.yukawa \ 114 $(LOCAL_PATH)/fstab.yukawa.ab:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.yukawa \ 115 $(LOCAL_PATH)/fstab.yukawa.ab:$(TARGET_COPY_OUT_VENDOR_RAMDISK)/etc/fstab.yukawa 116endif 117 118PRODUCT_COPY_FILES += \ 119 $(LOCAL_PATH)/init.yukawa.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.yukawa.rc \ 120 $(LOCAL_PATH)/init.yukawa.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.yukawa.usb.rc \ 121 $(LOCAL_PATH)/init.recovery.hardware.rc:$(TARGET_COPY_OUT_RECOVERY)/root/init.recovery.yukawa.rc \ 122 $(LOCAL_PATH)/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc 123 124ifeq ($(TARGET_USE_TABLET_LAUNCHER), true) 125# Use Launcher3QuickStep 126PRODUCT_PACKAGES += Launcher3QuickStep 127else 128# TV Specific Packages 129PRODUCT_PACKAGES += \ 130 LiveTv \ 131 google-tv-pairing-protocol \ 132 LeanbackSampleApp \ 133 tv_input.default \ 134 com.android.media.tv.remoteprovider \ 135 InputDevices 136 137# Fallback IME and Home apps 138PRODUCT_PACKAGES += \ 139 LeanbackIME \ 140 TvSampleLeanbackLauncher 141 142ifeq ($(TARGET_PRODUCT), yukawa_gms) 143PRODUCT_PACKAGES += \ 144 TvProvision \ 145 TVLauncherNoGms \ 146 TVRecommendationsNoGms 147endif 148endif 149 150# Bluetooth 151PRODUCT_PACKAGES += android.hardware.bluetooth-service.default 152 153# Wifi 154PRODUCT_PACKAGES += libwpa_client wpa_supplicant hostapd wificond wpa_cli 155PRODUCT_PROPERTY_OVERRIDES += wifi.interface=wlan0 \ 156 wifi.supplicant_scan_interval=15 157 158PRODUCT_COPY_FILES += \ 159 frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \ 160 frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \ 161 $(LOCAL_PATH)/wifi/wpa_supplicant.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant.conf \ 162 $(LOCAL_PATH)/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \ 163 $(LOCAL_PATH)/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf 164 165# Build default bluetooth a2dp and usb audio HALs 166PRODUCT_PACKAGES += \ 167 android.hardware.bluetooth.audio@2.1-impl \ 168 android.hardware.bluetooth.audio-impl \ 169 audio.usb.default \ 170 audio.primary.yukawa \ 171 audio.r_submix.default \ 172 audio.bluetooth.default \ 173 tinyplay \ 174 tinycap \ 175 tinymix \ 176 tinypcminfo \ 177 cplay 178 179PRODUCT_PACKAGES += \ 180 android.hardware.audio.service \ 181 android.hardware.audio@7.1-impl \ 182 android.hardware.audio.effect@7.0-impl \ 183 android.hardware.soundtrigger@2.3-impl 184 185# audio policy configuration 186PRODUCT_COPY_FILES += \ 187 frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration_7_0.xml \ 188 frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration_7_0.xml \ 189 frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration_7_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration_7_0.xml \ 190 frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \ 191 frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \ 192 frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \ 193 frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \ 194 frameworks/av/media/libeffects/data/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml 195 196PRODUCT_COPY_FILES += \ 197 device/amlogic/yukawa/hal/audio/mixer_paths_hdmi_only.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \ 198 device/amlogic/yukawa/hal/audio/audio_policy_configuration_hdmi_only.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml 199DEVICE_PACKAGE_OVERLAYS += \ 200 device/amlogic/yukawa/hal/audio/overlay_hdmi_only 201TARGET_USE_HDMI_AUDIO ?= true 202 203# CAS AIDL HAL 204PRODUCT_PACKAGES += \ 205 android.hardware.cas-service.example 206 207# Graphics # 208PRODUCT_PROPERTY_OVERRIDES += ro.sf.lcd_density=320 209 210# Vulkan 211PRODUCT_COPY_FILES += \ 212 frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:vendor/etc/permissions/android.hardware.vulkan.version.xml \ 213 frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:vendor/etc/permissions/android.hardware.vulkan.compute.xml \ 214 frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:vendor/etc/permissions/android.hardware.vulkan.level.xml 215 216PRODUCT_PACKAGES += \ 217 gralloc.yukawa \ 218 android.hardware.graphics.allocator@2.0-service \ 219 android.hardware.graphics.allocator@2.0-impl \ 220 android.hardware.graphics.mapper@2.0-impl-2.1 221 222# Hardware Composer HAL 223# 224PRODUCT_PACKAGES += android.hardware.composer.hwc3-service.drm.meson 225 226PRODUCT_PROPERTY_OVERRIDES += \ 227 ro.hardware.egl=mali \ 228 ro.hardware.vulkan=yukawa 229 230PRODUCT_PROPERTY_OVERRIDES += \ 231 ro.hardware.gralloc=yukawa 232 233# Create input surface on the framework side 234PRODUCT_VENDOR_PROPERTIES += \ 235 debug.stagefright.c2inputsurface=-1 236 237PRODUCT_VENDOR_PROPERTIES += \ 238 ro.opengles.version=196610 239 240# DRM Service 241PRODUCT_PACKAGES += \ 242 android.hardware.drm-service.widevine \ 243 android.hardware.drm@latest-service.clearkey 244 245# CEC on ATV only 246ifeq ($(PRODUCT_IS_ATV), true) 247PRODUCT_PACKAGES += \ 248 android.hardware.tv.cec@1.0-impl \ 249 android.hardware.tv.cec@1.0-service \ 250 hdmi_cec.yukawa 251 252PRODUCT_PROPERTY_OVERRIDES += \ 253 ro.hdmi.cec_device_types=playback_device 254 255PRODUCT_COPY_FILES += \ 256 frameworks/native/data/etc/android.hardware.hdmi.cec.xml:system/etc/permissions/android.hardware.hdmi.cec.xml 257endif 258 259# HDMI display 260PRODUCT_PROPERTY_OVERRIDES += ro.hdmi.device_type=4 \ 261 persist.sys.hdmi.keep_awake=false 262 263PRODUCT_COPY_FILES += \ 264 $(LOCAL_PATH)/input/Generic.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/Generic.kl 265 266# Thermal HAL 267PRODUCT_PACKAGES += android.hardware.thermal-service.example 268 269# PowerHAL 270PRODUCT_PACKAGES += \ 271 android.hardware.power-service.example 272 273# PowerStats HAL 274PRODUCT_PACKAGES += \ 275 android.hardware.power.stats-service.example 276 277# Health: Install default binderized implementation to vendor. 278PRODUCT_PACKAGES += \ 279 android.hardware.health-service.example \ 280 android.hardware.health-service.example_recovery 281 282# Health Storage 283PRODUCT_PACKAGES += \ 284 android.hardware.health.storage-service.default 285 286# Sensor HAL 287ifneq ($(TARGET_SENSOR_MEZZANINE),) 288TARGET_USES_NANOHUB_SENSORHAL := true 289NANOHUB_SENSORHAL_LID_STATE_ENABLED := true 290NANOHUB_SENSORHAL_SENSORLIST := $(LOCAL_PATH)/sensorhal/sensorlist_$(TARGET_SENSOR_MEZZANINE).cpp 291NANOHUB_SENSORHAL_DIRECT_REPORT_ENABLED := true 292NANOHUB_SENSORHAL_DYNAMIC_SENSOR_EXT_ENABLED := true 293 294PRODUCT_PACKAGES += \ 295 context_hub.default \ 296 sensors.yukawa \ 297 android.hardware.sensors@1.0-service \ 298 android.hardware.sensors@1.0-impl \ 299 android.hardware.contexthub@1.2-service \ 300 android.hardware.contexthub@1.2-impl 301 302# Nanohub tools 303PRODUCT_PACKAGES += stm32_flash nanoapp_cmd nanotool 304 305PRODUCT_COPY_FILES += \ 306 device/amlogic/yukawa/init.common.nanohub.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.nanohub.rc 307 308# Copy sensors config file(s) 309PRODUCT_COPY_FILES += \ 310 frameworks/native/data/etc/android.hardware.sensor.accelerometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.accelerometer.xml \ 311 frameworks/native/data/etc/android.hardware.sensor.ambient_temperature.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.ambient_temperature.xml \ 312 frameworks/native/data/etc/android.hardware.sensor.barometer.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.barometer.xml \ 313 frameworks/native/data/etc/android.hardware.sensor.compass.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.compass.xml \ 314 frameworks/native/data/etc/android.hardware.sensor.gyroscope.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.gyroscope.xml \ 315 frameworks/native/data/etc/android.hardware.sensor.hifi_sensors.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.hifi_sensors.xml \ 316 frameworks/native/data/etc/android.hardware.sensor.light.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.light.xml \ 317 frameworks/native/data/etc/android.hardware.sensor.relative_humidity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.relative_humidity.xml \ 318 frameworks/native/data/etc/android.hardware.sensor.stepcounter.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepcounter.xml \ 319 frameworks/native/data/etc/android.hardware.sensor.stepdetector.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.stepdetector.xml 320 321# Argonkey VL53L0X proximity driver is not available yet. So we are going to copy conf file for neonkey only 322ifeq ($(TARGET_SENSOR_MEZZANINE),neonkey) 323PRODUCT_COPY_FILES += \ 324 frameworks/native/data/etc/android.hardware.sensor.proximity.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.sensor.proximity.xml 325endif 326endif 327 328# Software Security HAL 329PRODUCT_PACKAGES += \ 330 android.hardware.gatekeeper@1.0-service.software \ 331 android.hardware.security.keymint-service 332 333# USB 334PRODUCT_PACKAGES += \ 335 android.hardware.usb@1.1-service 336 337PRODUCT_COPY_FILES += \ 338 frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \ 339 frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml 340 341PRODUCT_COPY_FILES += \ 342 frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \ 343 frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \ 344 frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml \ 345 frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \ 346 frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \ 347 frameworks/native/data/etc/android.software.cts.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.cts.xml \ 348 frameworks/native/data/etc/android.software.backup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.backup.xml 349 350# Copy media codecs config file 351PRODUCT_COPY_FILES += \ 352 frameworks/av/media/libstagefright/data/media_codecs_google_c2.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \ 353 frameworks/av/media/libstagefright/data/media_codecs_google_c2_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_c2_video.xml \ 354 frameworks/av/media/libstagefright/data/media_codecs_google_c2_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_c2_audio.xml \ 355 device/amlogic/yukawa/media_xml/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml 356 357# Enable USB Camera 358PRODUCT_PACKAGES += android.hardware.camera.provider@2.5-impl 359PRODUCT_PACKAGES += android.hardware.camera.provider@2.5-external-service 360PRODUCT_COPY_FILES += \ 361 device/amlogic/yukawa/hal/camera/external_camera_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/external_camera_config.xml 362 363PRODUCT_COPY_FILES += \ 364 frameworks/native/data/etc/android.hardware.camera.concurrent.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.concurrent.xml \ 365 frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.flash-autofocus.xml \ 366 frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \ 367 frameworks/native/data/etc/android.hardware.camera.full.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.full.xml \ 368 frameworks/native/data/etc/android.hardware.camera.raw.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.raw.xml 369 370# Include Virtualization APEX 371$(call inherit-product, packages/modules/Virtualization/apex/product_packages.mk) 372 373# ro.frp.pst points to a partition that contains factory reset protection information. 374PRODUCT_VENDOR_PROPERTIES += ro.frp.pst=/dev/block/by-name/frp 375