1PRODUCT_SOONG_NAMESPACES += device/amlogic/yukawa
2
3ifeq ($(TARGET_PREBUILT_KERNEL),)
4LOCAL_KERNEL := device/amlogic/yukawa-kernel/Image.lz4-$(TARGET_KERNEL_USE)
5else
6LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
7endif
8
9PRODUCT_COPY_FILES +=  $(LOCAL_KERNEL):kernel
10
11# Build and run only ART
12PRODUCT_RUNTIMES := runtime_libart_default
13
14# Enable updating of APEXes
15$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
16
17# Setup TV Build
18USE_OEM_TV_APP := true
19$(call inherit-product, device/google/atv/products/atv_base.mk)
20PRODUCT_CHARACTERISTICS := tv
21PRODUCT_AAPT_PREF_CONFIG := tvdpi
22PRODUCT_IS_ATV := true
23DEVICE_PACKAGE_OVERLAYS := device/amlogic/yukawa/overlay
24DEVICE_PACKAGE_OVERLAYS += device/google/atv/overlay
25
26PRODUCT_PACKAGES += llkd
27
28ifeq ($(TARGET_USE_AB_SLOT), true)
29# A/B support
30PRODUCT_PACKAGES += \
31    otapreopt_script \
32    cppreopts.sh \
33    update_engine \
34    update_verifier
35AB_OTA_POSTINSTALL_CONFIG += \
36    RUN_POSTINSTALm=true \
37    POSTINSTALL_PATH=system/bin/otapreopt_script \
38    FILESYSTEM_TYPE=ext4 \
39    POSTINSTALL_OPTIONAL=true
40
41PRODUCT_PACKAGES += \
42    update_engine_sideload \
43    sg_write_buffer \
44    f2fs_io
45
46# The following modules are included in debuggable builds only.
47PRODUCT_PACKAGES_DEBUG += \
48    bootctl \
49    update_engine_client
50
51# Write flags to the vendor space in /misc partition.
52PRODUCT_PACKAGES += \
53    misc_writer
54
55PRODUCT_PACKAGES += \
56    fs_config_dirs \
57    fs_config_files
58
59# Boot control
60PRODUCT_PACKAGES += \
61    android.hardware.boot@1.0-impl \
62    android.hardware.boot@1.0-impl.recovery \
63    android.hardware.boot@1.0-service \
64	bootctrl.yukawa.recovery \
65	bootctrl.yukawa
66endif
67
68# Dynamic partitions
69PRODUCT_BUILD_SUPER_PARTITION := true
70PRODUCT_USE_DYNAMIC_PARTITIONS := true
71PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
72
73PRODUCT_PACKAGES += \
74	android.hardware.fastboot@1.0 \
75	android.hardware.fastboot@1.0-impl-mock \
76	fastbootd
77
78# All VNDK libraries (HAL interfaces, VNDK, VNDK-SP, LL-NDK)
79PRODUCT_PACKAGES += vndk_package
80
81PRODUCT_PACKAGES += \
82    android.hardware.health@2.0-service.yukawa \
83    android.hardware.health@2.0-service
84
85ifeq ($(TARGET_USE_AB_SLOT), true)
86ifeq ($(TARGET_AVB_ENABLE), true)
87PRODUCT_COPY_FILES += \
88    $(LOCAL_PATH)/fstab.yukawa.avb.ab:$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/fstab.yukawa \
89    $(LOCAL_PATH)/fstab.yukawa.avb.ab:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.yukawa
90else
91PRODUCT_COPY_FILES += \
92    $(LOCAL_PATH)/fstab.yukawa.ab:$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/fstab.yukawa \
93    $(LOCAL_PATH)/fstab.yukawa.ab:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.yukawa
94endif
95else
96ifeq ($(TARGET_AVB_ENABLE), true)
97PRODUCT_COPY_FILES += \
98    $(LOCAL_PATH)/fstab.ramdisk.common.avb:$(TARGET_COPY_OUT_RAMDISK)/fstab.yukawa \
99    $(LOCAL_PATH)/fstab.yukawa:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.yukawa
100else
101PRODUCT_COPY_FILES += \
102    $(LOCAL_PATH)/fstab.ramdisk.common:$(TARGET_COPY_OUT_RAMDISK)/fstab.yukawa \
103    $(LOCAL_PATH)/fstab.yukawa:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.yukawa
104endif
105endif
106
107PRODUCT_COPY_FILES += \
108    $(LOCAL_PATH)/init.yukawa.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.yukawa.rc \
109    $(LOCAL_PATH)/init.yukawa.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.yukawa.usb.rc \
110    $(LOCAL_PATH)/init.recovery.hardware.rc:recovery/root/init.recovery.yukawa.rc \
111    $(LOCAL_PATH)/ueventd.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
112    $(LOCAL_PATH)/wifi/wpa_supplicant.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant.conf \
113    $(LOCAL_PATH)/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
114    $(LOCAL_PATH)/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf \
115    $(LOCAL_PATH)/binaries/bt-wifi-firmware/BCM.hcd:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/BCM.hcd \
116    $(LOCAL_PATH)/binaries/bt-wifi-firmware/fw_bcm4359c0_ag.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/fw_bcm4359c0_ag.bin \
117    $(LOCAL_PATH)/binaries/bt-wifi-firmware/nvram.txt:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/nvram.txt \
118
119ifeq ($(TARGET_USE_SAMPLE_LAUNCHER), true)
120PRODUCT_PACKAGES += \
121    TvSampleLeanbackLauncher
122endif
123
124# TV Specific Packages
125PRODUCT_PACKAGES += \
126    LiveTv \
127    google-tv-pairing-protocol \
128    TvProvision \
129    LeanbackSampleApp \
130    tv_input.default \
131    com.android.media.tv.remoteprovider \
132    InputDevices
133
134PRODUCT_PACKAGES += \
135    LeanbackIME
136
137ifeq (,$(filter $(TARGET_PRODUCT),yukawa_gms yukawa_sei510_gms))
138PRODUCT_PACKAGES += \
139    TVLauncherNoGms \
140    TVRecommendationsNoGms
141endif
142
143PRODUCT_PACKAGES += \
144    libhidltransport \
145    libhwbinder
146
147PRODUCT_PROPERTY_OVERRIDES += ro.sf.lcd_density=320
148
149PRODUCT_PACKAGES +=  libGLES_mali
150PRODUCT_PACKAGES +=  libGLES_android
151
152# Vulkan
153PRODUCT_COPY_FILES += \
154    frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:vendor/etc/permissions/android.hardware.vulkan.version.xml \
155    frameworks/native/data/etc/android.hardware.vulkan.compute-0.xml:vendor/etc/permissions/android.hardware.vulkan.compute.xml \
156    frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:vendor/etc/permissions/android.hardware.vulkan.level.xml
157
158PRODUCT_PACKAGES +=  vulkan.yukawa.so
159
160# Bluetooth
161PRODUCT_PACKAGES += android.hardware.bluetooth@1.1-service.btlinux
162
163# Wifi
164PRODUCT_PACKAGES += libwpa_client wpa_supplicant hostapd wificond wifilogd wpa_cli
165PRODUCT_PROPERTY_OVERRIDES += wifi.interface=wlan0 \
166                              wifi.supplicant_scan_interval=15
167
168# Build default bluetooth a2dp and usb audio HALs
169PRODUCT_PACKAGES += \
170    audio.usb.default \
171    audio.primary.yukawa \
172    audio.r_submix.default \
173    audio.bluetooth.default \
174    audio.hearing_aid.default \
175    audio.a2dp.default \
176    tinyplay \
177    tinycap \
178    tinymix \
179    tinypcminfo \
180    cplay
181
182# Video
183PRODUCT_COPY_FILES += \
184    $(LOCAL_PATH)/binaries/video_firmware/g12a_h264.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/meson/vdec/g12a_h264.bin \
185    $(LOCAL_PATH)/binaries/video_firmware/g12a_hevc_mmu.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/meson/vdec/g12a_hevc_mmu.bin \
186    $(LOCAL_PATH)/binaries/video_firmware/g12a_vp9.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/meson/vdec/g12a_vp9.bin \
187    $(LOCAL_PATH)/binaries/video_firmware/gxl_mpeg4_5.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/meson/vdec/gxl_mpeg4_5.bin \
188    $(LOCAL_PATH)/binaries/video_firmware/gxl_mpeg12.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/meson/vdec/gxl_mpeg12.bin \
189    $(LOCAL_PATH)/binaries/video_firmware/gxl_mjpeg.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/meson/vdec/gxl_mjpeg.bin \
190    $(LOCAL_PATH)/binaries/video_firmware/sm1_hevc_mmu.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/meson/vdec/sm1_hevc_mmu.bin \
191    $(LOCAL_PATH)/binaries/video_firmware/sm1_vp9_mmu.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/meson/vdec/sm1_vp9_mmu.bin
192
193PRODUCT_PACKAGES += \
194    android.hardware.audio@2.0-service \
195    android.hardware.audio@6.0-impl \
196    android.hardware.audio.effect@6.0-impl \
197    android.hardware.soundtrigger@2.2-impl \
198
199# Hardware Composer HAL
200#
201PRODUCT_PACKAGES += \
202    hwcomposer.drm_meson \
203    android.hardware.drm@1.0-impl \
204    android.hardware.drm@1.0-service \
205    android.hardware.drm@1.2-service.widevine \
206    android.hardware.drm@1.2-service.clearkey
207
208# CEC
209PRODUCT_PACKAGES += \
210    android.hardware.tv.cec@1.0-impl \
211    android.hardware.tv.cec@1.0-service \
212    hdmi_cec.yukawa
213
214PRODUCT_PROPERTY_OVERRIDES += ro.hdmi.device_type=4 \
215    persist.sys.hdmi.keep_awake=false
216
217PRODUCT_COPY_FILES += \
218    $(LOCAL_PATH)/input/Generic.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/Generic.kl \
219    frameworks/native/data/etc/android.hardware.hdmi.cec.xml:system/etc/permissions/android.hardware.hdmi.cec.xml
220
221# Memtrack
222PRODUCT_PACKAGES += memtrack.default \
223    android.hardware.memtrack@1.0-service \
224    android.hardware.memtrack@1.0-impl
225
226PRODUCT_PACKAGES += \
227    gralloc.yukawa \
228    android.hardware.graphics.composer@2.1-impl \
229    android.hardware.graphics.composer@2.1-service \
230    android.hardware.graphics.allocator@2.0-service \
231    android.hardware.graphics.allocator@2.0-impl \
232    android.hardware.graphics.mapper@2.0-impl
233
234# PowerHAL
235PRODUCT_PACKAGES += \
236    power.default \
237    android.hardware.power@1.0-impl \
238    android.hardware.power@1.0-service
239
240# ThermalHAL
241PRODUCT_PACKAGES += \
242    thermal.default \
243    android.hardware.thermal@1.0-impl \
244    android.hardware.thermal@1.0-service
245
246# Software Gatekeeper HAL
247PRODUCT_PACKAGES += \
248    android.hardware.gatekeeper@1.0-service.software
249
250PRODUCT_PACKAGES += \
251    android.hardware.keymaster@3.0-impl \
252    android.hardware.keymaster@3.0-service
253
254# USB
255PRODUCT_PACKAGES += \
256    android.hardware.usb@1.1-service
257
258PRODUCT_COPY_FILES +=  \
259    frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
260    frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
261    frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
262    frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
263    frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml \
264    frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
265    frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
266    frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
267    frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
268    frameworks/native/data/etc/android.software.cts.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.cts.xml \
269    frameworks/native/data/etc/android.software.backup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.backup.xml
270
271# audio policy configuration
272USE_XML_AUDIO_POLICY_CONF := 1
273PRODUCT_COPY_FILES += \
274    device/amlogic/yukawa/hal/audio/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
275    device/amlogic/yukawa/hal/audio/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
276    frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
277    frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
278    frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
279    frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
280    frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml \
281    frameworks/av/media/libeffects/data/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml
282
283# Copy media codecs config file
284PRODUCT_COPY_FILES += \
285    device/amlogic/yukawa/media_xml/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
286    frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml
287
288# Enable BT Pairing with button BTN_0 (key 256)
289PRODUCT_PACKAGES += YukawaService YukawaAndroidOverlay
290PRODUCT_COPY_FILES += \
291    device/amlogic/yukawa/input/Vendor_0001_Product_0001.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/Vendor_0001_Product_0001.kl
292
293
294# Light HAL
295PRODUCT_PACKAGES += \
296    android.hardware.light-service \
297    lights-yukawa