1PRODUCT_SOONG_NAMESPACES += device/linaro/poplar/proprietary
2
3# 1. bootimage
4# 1.1 kernel and dtb
5LOCAL_KERNEL := device/linaro/poplar-kernel/Image
6PRODUCT_COPY_FILES += $(LOCAL_KERNEL):kernel
7LOCAL_DTB := device/linaro/poplar-kernel/hi3798cv200-poplar.dtb
8PRODUCT_COPY_FILES += $(LOCAL_DTB):2ndbootloader
9
10# 1.2 rootfs
11PRODUCT_COPY_FILES += \
12    $(LOCAL_PATH)/vendor/ueventd.poplar.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
13    $(LOCAL_PATH)/vendor/fstab.poplar:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.poplar
14
15PRODUCT_COPY_FILES += \
16    $(LOCAL_PATH)/vendor/init.poplar.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.poplar.rc \
17    $(LOCAL_PATH)/vendor/init.poplar.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.poplar.usb.rc
18
19
20# feature declaration
21PRODUCT_COPY_FILES += \
22    frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
23    frameworks/native/data/etc/android.hardware.screen.landscape.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.landscape.xml \
24    frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
25    frameworks/native/data/etc/android.software.print.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.print.xml \
26    frameworks/native/data/etc/android.software.webview.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.webview.xml \
27    frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml
28
29
30# framework properties
31PRODUCT_PROPERTY_OVERRIDES += \
32    dalvik.vm.heapstartsize=5m \
33    dalvik.vm.heapgrowthlimit=96m \
34    dalvik.vm.heapsize=256m \
35    dalvik.vm.heaptargetutilization=0.75 \
36    dalvik.vm.heapminfree=512k \
37    dalvik.vm.heapmaxfree=2m \
38    ro.sf.lcd_density=160 \
39    ro.opengles.version=196609
40
41
42# start HAL audio >>>>>>>>
43## feature declaration
44PRODUCT_COPY_FILES += \
45    frameworks/native/data/etc/android.hardware.audio.output.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.output.xml \
46    frameworks/native/data/etc/android.hardware.audio.low_latency.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.low_latency.xml
47## build packages
48PRODUCT_PACKAGES += \
49    android.hardware.audio@2.0-impl \
50    android.hardware.audio@2.0-service \
51    android.hardware.audio.effect@2.0-impl \
52    android.hardware.soundtrigger@2.0-impl \
53    audio.a2dp.default \
54    audio.usb.default \
55    audio.r_submix.default \
56    audio.primary.poplar
57## runtime configs
58PRODUCT_COPY_FILES += \
59    $(LOCAL_PATH)/audio/audio_policy.conf:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy.conf
60
61
62# start HAL drm >>>>>>>>
63## build packages
64PRODUCT_PACKAGES += \
65    android.hardware.drm@1.0-impl
66# raw instructions - do I have a better place to go?
67ifeq ($(TARGET_TEE_IS_OPTEE), true)
68   $(call inherit-product-if-exists, device/linaro/poplar/optee/optee-packages.mk)
69endif
70## service init.rc scripts
71PRODUCT_COPY_FILES += \
72    $(LOCAL_PATH)/optee/optee.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/optee.rc
73
74
75# start HAL graphics >>>>>>>>
76## build packages
77PRODUCT_PACKAGES += \
78    libion \
79    android.hardware.graphics.mapper@2.0 \
80    android.hardware.graphics.mapper@2.0-impl \
81    android.hardware.graphics.allocator@2.0 \
82    android.hardware.graphics.allocator@2.0-impl \
83    android.hardware.graphics.allocator@2.0-service \
84    android.hardware.graphics.composer@2.1 \
85    android.hardware.graphics.composer@2.1-impl \
86    android.hardware.graphics.composer@2.1-service
87## copy packages
88PRODUCT_PACKAGES += \
89    libGLES_mali \
90    hwcomposer.poplar \
91    libhi_gfx2d \
92    overlay.poplar \
93    gralloc.poplar \
94    libion_ext
95
96# Property required by HiSilicon gralloc
97PRODUCT_PROPERTY_OVERRIDES += \
98    ro.config.build.name=poplar.androidp
99
100
101# start HAL keymaster >>>>>>>>
102## build packages
103PRODUCT_PACKAGES += \
104    android.hardware.keymaster@3.0-impl \
105    android.hardware.keymaster@3.0-service
106
107
108# start HAL media.codec >>>>>>>>
109## copy packages
110PRODUCT_PACKAGES += \
111    libstagefrighthw \
112    libhi_common \
113    libhi_msp \
114    libhi_vfmw \
115    libOMX_Core \
116    libOMX.hisi.video.decoder \
117    libhiavplayer \
118    libhiavplayer_adp \
119    libhiavplayerservice \
120    hiavplayer
121## service init.rc scripts
122PRODUCT_COPY_FILES += \
123    $(LOCAL_PATH)/vendor/hiavplayer.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hiavplayer.rc
124## runtime configs
125PRODUCT_COPY_FILES += \
126    $(LOCAL_PATH)/media/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
127    frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
128    frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml
129
130
131# start HAL bt >>>>>>>>
132## feature declaration
133PRODUCT_COPY_FILES += \
134    frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
135    frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml
136## build packages
137PRODUCT_PACKAGES += \
138    android.hardware.bluetooth@1.0-service \
139    android.hardware.bluetooth@1.0-service.rc \
140    android.hardware.bluetooth@1.0-impl
141## copy packages
142PRODUCT_PACKAGES += \
143    libbt-vendor
144## config files
145PRODUCT_COPY_FILES += \
146    $(LOCAL_PATH)/bluetooth/rtkbt.conf:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth/rtkbt.conf
147## firmwares
148PRODUCT_COPY_FILES += \
149    $(LOCAL_PATH)/proprietary/bt-wifi/rtl8822b_config:$(TARGET_COPY_OUT_VENDOR)/firmware/rtl8822b_config \
150    $(LOCAL_PATH)/proprietary/bt-wifi/rtl8822b_fw:$(TARGET_COPY_OUT_VENDOR)/firmware/rtl8822b_fw
151## service init.rc scripts
152PRODUCT_COPY_FILES += \
153    $(LOCAL_PATH)/bluetooth/bt.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/bt.rc
154
155
156# start HAL wifi >>>>>>>>
157## feature declaration
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## build packages
162PRODUCT_PACKAGES += \
163    android.hardware.wifi@1.0-service \
164    wificond \
165    libwpa_client \
166    wpa_supplicant \
167    hostapd
168## config files
169PRODUCT_COPY_FILES += \
170    $(LOCAL_PATH)/wifi/wpa_supplicant.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant.conf \
171    $(LOCAL_PATH)/wifi/p2p_supplicant.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant.conf
172## service init.rc scripts
173PRODUCT_COPY_FILES += \
174    $(LOCAL_PATH)/wifi/wifi.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/wifi.rc
175## feature wifi properties
176PRODUCT_PROPERTY_OVERRIDES += \
177    wifi.interface=wlan0 \
178    wifi.supplicant_scan_interval=15
179
180
181# manifest.xml
182DEVICE_MANIFEST_FILE := $(LOCAL_PATH)/manifest.xml
183
184# VNDK libraries
185PRODUCT_PACKAGES += vndk_package
186