smarc_mx8mq.mk
13.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# This is an Embedian Android Reference Design platform based on SMARC-iMX8MQ CPU Modules
# It will inherit from FSL core product which in turn inherit from Google generic
IMX_DEVICE_PATH := device/embedian/imx8m/smarc_mx8mq
# configs shared between uboot, kernel and Android rootfs
include $(IMX_DEVICE_PATH)/SharedBoardConfig.mk
-include device/fsl/common/imx_path/ImxPathConfig.mk
$(call inherit-product, device/fsl/imx8m/ProductConfigCommon.mk)
ifneq ($(wildcard $(IMX_DEVICE_PATH)/fstab_nand.freescale),)
$(shell touch $(IMX_DEVICE_PATH)/fstab_nand.freescale)
endif
ifneq ($(wildcard $(IMX_DEVICE_PATH)/fstab.freescale),)
$(shell touch $(IMX_DEVICE_PATH)/fstab.freescale)
endif
# Overrides
PRODUCT_NAME := smarc_mx8mq
PRODUCT_DEVICE := smarc_mx8mq
PRODUCT_MODEL := smarc_mx8mq
PRODUCT_FULL_TREBLE_OVERRIDE := true
#Enable this to choose 32 bit user space build
#IMX8_BUILD_32BIT_ROOTFS := true
# Include keystore attestation keys and certificates.
ifeq ($(PRODUCT_IMX_TRUSTY),true)
-include $(IMX_SECURITY_PATH)/attestation/imx_attestation.mk
endif
# Copy device related config and binary to board
PRODUCT_COPY_FILES += \
$(IMX_DEVICE_PATH)/app_whitelist.xml:system/etc/sysconfig/app_whitelist.xml \
$(IMX_DEVICE_PATH)/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
$(IMX_DEVICE_PATH)/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
$(IMX_DEVICE_PATH)/input-port-associations.xml:$(TARGET_COPY_OUT_VENDOR)/etc/input-port-associations.xml \
$(IMX_DEVICE_PATH)/fstab.freescale:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.freescale \
$(IMX_DEVICE_PATH)/init.imx8mq.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.freescale.imx8mq.rc \
$(IMX_DEVICE_PATH)/early.init.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/early.init.cfg \
$(IMX_DEVICE_PATH)/init.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.freescale.rc \
$(IMX_DEVICE_PATH)/init.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.freescale.usb.rc \
$(IMX_DEVICE_PATH)/required_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/required_hardware.xml \
$(IMX_DEVICE_PATH)/ueventd.freescale.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
$(LINUX_FIRMWARE_IMX_PATH)/linux-firmware-imx/firmware/sdma/sdma-imx7d.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/imx/sdma/sdma-imx7d.bin \
device/fsl/common/init/init.insmod.sh:$(TARGET_COPY_OUT_VENDOR)/bin/init.insmod.sh \
device/fsl/common/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf \
device/fsl/common/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf
ifeq ($(PRODUCT_IMX_TRUSTY),true)
PRODUCT_COPY_FILES += \
device/fsl/common/security/rpmb_key_test.bin:rpmb_key_test.bin \
device/fsl/common/security/testkey_public_rsa4096.bin:testkey_public_rsa4096.bin
endif
# ONLY devices that meet the CDD's requirements may declare these features
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.audio.output.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.audio.output.xml \
frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml \
frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
frameworks/native/data/etc/android.hardware.camera.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.xml \
frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
frameworks/native/data/etc/android.hardware.screen.landscape.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.landscape.xml \
frameworks/native/data/etc/android.hardware.screen.portrait.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.screen.portrait.xml \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.distinct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.distinct.xml \
frameworks/native/data/etc/android.hardware.touchscreen.multitouch.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.multitouch.xml \
frameworks/native/data/etc/android.hardware.touchscreen.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.touchscreen.xml \
frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
frameworks/native/data/etc/android.hardware.vulkan.level-0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level-0.xml \
frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version-1_1.xml \
frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
frameworks/native/data/etc/android.software.backup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.backup.xml \
frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml \
frameworks/native/data/etc/android.software.managed_users.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.managed_users.xml \
frameworks/native/data/etc/android.software.print.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.print.xml \
frameworks/native/data/etc/android.software.sip.voip.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.sip.voip.xml \
frameworks/native/data/etc/android.software.verified_boot.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.verified_boot.xml \
frameworks/native/data/etc/android.software.voice_recognizers.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.voice_recognizers.xml \
frameworks/native/data/etc/android.software.activities_on_secondary_displays.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.activities_on_secondary_displays.xml \
frameworks/native/data/etc/android.software.picture_in_picture.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.picture_in_picture.xml
# Vendor seccomp policy files for media components:
PRODUCT_COPY_FILES += \
$(IMX_DEVICE_PATH)/seccomp/mediacodec-seccomp.policy:vendor/etc/seccomp_policy/mediacodec.policy \
$(IMX_DEVICE_PATH)/seccomp/mediaextractor-seccomp.policy:vendor/etc/seccomp_policy/mediaextractor.policy
PRODUCT_COPY_FILES += \
device/fsl/imx8m/evk_8mq/powerhint_imx8mq.json:$(TARGET_COPY_OUT_VENDOR)/etc/configs/powerhint_imx8mq.json
# fastboot_imx_flashall scripts, fsl-sdcard-partition script and uuu_imx_android_flash scripts
PRODUCT_COPY_FILES += \
$(IMX_DEVICE_PATH)/uuu/uuu-android-smarc-mx8mq-emmc.lst:uuu-android-smarc-mx8mq-emmc.lst \
$(IMX_DEVICE_PATH)/uuu/uuu-android-smarc-mx8mq-sd.lst:uuu-android-smarc-mx8mq-sd.lst \
device/embedian/scripts/sh/smarc-mkemmc.sh:smarc-mkemmc.sh \
device/embedian/scripts/sh/smarc-mksdcard.sh:smarc-mksdcard.sh \
device/fsl/common/tools/fastboot_imx_flashall.bat:fastboot_imx_flashall.bat \
device/fsl/common/tools/fastboot_imx_flashall.sh:fastboot_imx_flashall.sh \
device/fsl/common/tools/uuu_imx_android_flash.bat:uuu_imx_android_flash.bat \
device/fsl/common/tools/uuu_imx_android_flash.sh:uuu_imx_android_flash.sh
USE_XML_AUDIO_POLICY_CONF := 1
DEVICE_PACKAGE_OVERLAYS := $(IMX_DEVICE_PATH)/overlay
PRODUCT_CHARACTERISTICS := tablet
PRODUCT_AAPT_CONFIG += xlarge large tvdpi hdpi xhdpi
# GPU openCL g2d
PRODUCT_COPY_FILES += \
$(IMX_PATH)/imx/opencl-2d/cl_g2d.cl:$(TARGET_COPY_OUT_VENDOR)/etc/cl_g2d.cl
# GPU openCL SDK header file
-include $(FSL_PROPRIETARY_PATH)/fsl-proprietary/include/CL/cl_sdk.mk
# GPU openVX SDK header file
-include $(FSL_PROPRIETARY_PATH)/fsl-proprietary/include/nnxc_kernels/nnxc_kernels.mk
# GPU openCL icdloader config file
-include $(FSL_PROPRIETARY_PATH)/fsl-proprietary/gpu-viv/icdloader/icdloader.mk
# HWC2 HAL
PRODUCT_PACKAGES += \
android.hardware.graphics.composer@2.3-service
# Gralloc HAL
PRODUCT_PACKAGES += \
android.hardware.graphics.mapper@2.0-impl-2.1 \
android.hardware.graphics.allocator@2.0-impl \
android.hardware.graphics.allocator@2.0-service
# RenderScript HAL
PRODUCT_PACKAGES += \
android.hardware.renderscript@1.0-impl
PRODUCT_PACKAGES += \
libEGL_VIVANTE \
libGLESv1_CM_VIVANTE \
libGLESv2_VIVANTE \
gralloc_viv.imx8 \
libGAL \
libGLSLC \
libVSC \
libgpuhelper \
libSPIRV_viv \
libvulkan_VIVANTE \
vulkan.imx8 \
libCLC \
libLLVM_viv \
libOpenCL \
libg2d-opencl \
libg2d-viv \
libOpenVX \
libOpenVXU \
libNNVXCBinary-evis \
libNNVXCBinary-lite \
libOvx12VXCBinary-evis \
libOvx12VXCBinary-lite \
libNNGPUBinary-evis \
libNNGPUBinary-lite \
gatekeeper.imx8
PRODUCT_PACKAGES += \
android.hardware.audio@5.0-impl:32 \
android.hardware.audio@2.0-service \
android.hardware.audio.effect@5.0-impl:32 \
android.hardware.power@1.3-service.imx \
android.hardware.light@2.0-impl \
android.hardware.light@2.0-service \
android.hardware.configstore@1.1-service \
configstore@1.1.policy
# Thermal HAL
PRODUCT_PACKAGES += \
android.hardware.thermal@2.0-service.imx
PRODUCT_COPY_FILES += \
device/fsl/imx8m/evk_8mq/thermal_info_config_imx8mq.json:$(TARGET_COPY_OUT_VENDOR)/etc/configs/thermal_info_config_imx8mq.json
# Neural Network HAL and lib
PRODUCT_PACKAGES += \
libovxlib \
libnnrt \
android.hardware.neuralnetworks@1.2-service-vsi-npu-server
# Usb HAL
PRODUCT_PACKAGES += \
android.hardware.usb@1.1-service.imx
# Bluetooth HAL
PRODUCT_PACKAGES += \
android.hardware.bluetooth@1.0-impl \
android.hardware.bluetooth@1.0-service
# WiFi HAL
PRODUCT_PACKAGES += \
android.hardware.wifi@1.0-service \
wifilogd \
wificond
# BCM Bluetooth vendor config
PRODUCT_PACKAGES += \
bt_vendor.conf
# BCM 1CX Bluetooth Firmware
PRODUCT_COPY_FILES += \
vendor/nxp/imx-firmware/cyw-wifi-bt/1CX_CYW4356/BCM4354A2.1CX.hcd:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/CYW4354A2.1CX.hcd
# BCM 1CX Wifi Firmware
PRODUCT_COPY_FILES += \
vendor/nxp/imx-firmware/cyw-wifi-bt/1CX_CYW4356/brcmfmac4356-pcie.bin:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/brcmfmac4356-pcie.bin \
vendor/nxp/imx-firmware/cyw-wifi-bt/1CX_CYW4356/brcmfmac4356-pcie.clm_blob:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/brcmfmac4356-pcie.clm_blob \
vendor/nxp/imx-firmware/cyw-wifi-bt/1CX_CYW4356/brcmfmac4356-pcie.txt:$(TARGET_COPY_OUT_VENDOR)/firmware/brcm/brcmfmac4356-pcie.txt
# hardware backed keymaster service
ifeq ($(PRODUCT_IMX_TRUSTY),true)
PRODUCT_PACKAGES += \
android.hardware.keymaster@3.0-service.trusty
endif
PRODUCT_COPY_FILES += \
$(IMX_DEVICE_PATH)/camera_config_imx8mq.json:$(TARGET_COPY_OUT_VENDOR)/etc/configs/camera_config_imx8mq.json
# Keymaster HAL
PRODUCT_PACKAGES += \
android.hardware.keymaster@3.0-impl \
android.hardware.keymaster@3.0-service
# DRM HAL
TARGET_ENABLE_MEDIADRM_64 := true
PRODUCT_PACKAGES += \
android.hardware.drm@1.0-impl \
android.hardware.drm@1.0-service
# new gatekeeper HAL
PRODUCT_PACKAGES += \
android.hardware.gatekeeper@1.0-impl \
android.hardware.gatekeeper@1.0-service
# Add Trusty OS backed gatekeeper and secure storage proxy
ifeq ($(PRODUCT_IMX_TRUSTY),true)
PRODUCT_PACKAGES += \
gatekeeper.trusty \
storageproxyd
endif
#Dumpstate HAL 1.0 support
PRODUCT_PACKAGES += \
android.hardware.dumpstate@1.0-service.imx
ifeq ($(PRODUCT_IMX_TRUSTY),true)
#Oemlock HAL 1.0 support
PRODUCT_PACKAGES += \
android.hardware.oemlock@1.0-service.imx
endif
ifneq ($(BUILD_TARGET_FS),ubifs)
PRODUCT_PROPERTY_OVERRIDES += \
ro.internel.storage_size=/sys/block/mmcblk0/size \
ro.frp.pst=/dev/block/by-name/presistdata
endif
# ro.product.first_api_level indicates the first api level the device has commercially launched on.
PRODUCT_PROPERTY_OVERRIDES += \
ro.product.first_api_level=28 \
vendor.typec.legacy=true
PRODUCT_PACKAGES += \
libg1 \
libhantro \
libcodec
# CANbus tools
PRODUCT_PACKAGES += \
candump \
cansend \
cangen \
canfdtest \
cangw \
canplayer \
cansniffer \
isotprecv \
isotpsend \
isotpserver
# Add oem unlocking option in settings.
PRODUCT_PROPERTY_OVERRIDES += ro.frp.pst=/dev/block/by-name/presistdata
PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE := true
# Tensorflow lite camera demo
PRODUCT_PACKAGES += \
tflitecamerademo
# Multi-Display launcher
PRODUCT_PACKAGES += \
MultiDisplay
# Specify rollback index for bootloader and for AVB
ifneq ($(AVB_RBINDEX),)
BOARD_AVB_ROLLBACK_INDEX := $(AVB_RBINDEX)
else
BOARD_AVB_ROLLBACK_INDEX := 0
endif
#DRM Widevine 1.2 L3 support
PRODUCT_PACKAGES += \
android.hardware.drm@1.0-impl \
android.hardware.drm@1.0-service \
android.hardware.drm@1.2-service.widevine \
android.hardware.drm@1.2-service.clearkey \
libwvdrmcryptoplugin \
libwvhidl \
libwvdrmengine \
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_keys.mk)
PRODUCT_PACKAGES += \
adb_debug.prop
endif
IMX-DEFAULT-G2D-LIB := libg2d-viv