summaryrefslogtreecommitdiff
path: root/ampere.mk (plain)
blob: 957e7886b7f1d8fd8f3b11cf5ff857c3248565f3
1# Copyright (C) 2011 Amlogic Inc
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15#
16# This file is the build configuration for a full Android
17# build for Meson reference board.
18#
19
20ANDROID_BUILD_TYPE := 64
21
22# Dynamic enable start/stop zygote_secondary in 64bits
23# and 32bit system, default closed
24#TARGET_DYNAMIC_ZYGOTE_SECONDARY_ENABLE := true
25
26# Inherit from those products. Most specific first.
27ifneq ($(ANDROID_BUILD_TYPE), 32)
28ifeq ($(TARGET_DYNAMIC_ZYGOTE_SECONDARY_ENABLE), true)
29$(call inherit-product, device/amlogic/common/dynamic_zygote_seondary/dynamic_zygote_64_bit.mk)
30else
31$(call inherit-product, build/target/product/core_64_bit.mk)
32endif
33endif
34
35$(call inherit-product, device/amlogic/common/products/mbox/product_mbox.mk)
36$(call inherit-product, device/amlogic/ampere/device.mk)
37$(call inherit-product-if-exists, vendor/google/products/gms.mk)
38
39# ampere:
40PRODUCT_PROPERTY_OVERRIDES += \
41 ro.hdmi.device_type=4 \
42 persist.sys.hdmi.keep_awake=false
43
44PRODUCT_NAME := ampere
45PRODUCT_DEVICE := ampere
46PRODUCT_BRAND := Amlogic
47PRODUCT_MODEL := ampere
48PRODUCT_MANUFACTURER := Amlogic
49
50TARGET_KERNEL_BUILT_FROM_SOURCE := false
51
52PRODUCT_TYPE := mbox
53
54#BOARD_OLD_PARTITION := true
55
56WITH_LIBPLAYER_MODULE := false
57
58OTA_UP_PART_NUM_CHANGED := true
59
60BOARD_AML_VENDOR_PATH := vendor/amlogic/ampere/
61
62BOARD_WIDEVINE_TA_PATH := vendor/amlogic/
63
64#AB_OTA_UPDATER :=true
65
66ifeq ($(AB_OTA_UPDATER),true)
67AB_OTA_PARTITIONS := \
68 boot \
69 system
70
71ifneq ($(BOARD_OLD_PARTITION),true)
72AB_OTA_PARTITIONS += \
73 vendor \
74 odm
75endif
76
77TARGET_BOOTLOADER_CONTROL_BLOCK := true
78TARGET_NO_RECOVERY := true
79TARGET_PARTITION_DTSI := partition_mbox_ab.dtsi
80else
81TARGET_NO_RECOVERY := false
82
83ifneq ($(BOARD_OLD_PARTITION),true)
84TARGET_PARTITION_DTSI := partition_mbox_normal.dtsi
85else
86TARGET_PARTITION_DTSI := partition_mbox_old.dtsi
87endif
88
89BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016
90BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
91endif
92
93#########Support compiling out encrypted zip/aml_upgrade_package.img directly
94#PRODUCT_BUILD_SECURE_BOOT_IMAGE_DIRECTLY := true
95PRODUCT_AML_SECUREBOOT_USERKEY := ./uboot/board/amlogic/gxl_p212_v1/aml-user-key.sig
96PRODUCT_AML_SECUREBOOT_SIGNTOOL := ./uboot/fip/gxl/aml_encrypt_gxl
97PRODUCT_AML_SECUREBOOT_SIGNBOOTLOADER := $(PRODUCT_AML_SECUREBOOT_SIGNTOOL) --bootsig \
98 --amluserkey $(PRODUCT_AML_SECUREBOOT_USERKEY) \
99 --aeskey enable
100PRODUCT_AML_SECUREBOOT_SIGNIMAGE := $(PRODUCT_AML_SECUREBOOT_SIGNTOOL) --imgsig \
101 --amluserkey $(PRODUCT_AML_SECUREBOOT_USERKEY)
102PRODUCT_AML_SECUREBOOT_SIGBIN := $(PRODUCT_AML_SECUREBOOT_SIGNTOOL) --binsig \
103 --amluserkey $(PRODUCT_AML_SECUREBOOT_USERKEY)
104
105########################################################################
106#
107# ATV
108#
109########################################################################
110ifeq ($(BOARD_COMPILE_ATV),true)
111BOARD_COMPILE_CTS := true
112TARGET_BUILD_GOOGLE_ATV:= true
113DONT_DEXPREOPT_PREBUILTS:= true
114endif
115########################################################################
116
117########################################################################
118#
119# CTS
120#
121########################################################################
122ifeq ($(BOARD_COMPILE_CTS),true)
123BOARD_WIDEVINE_OEMCRYPTO_LEVEL := 1
124BOARD_PLAYREADY_LEVEL := 1
125TARGET_BUILD_CTS:= true
126TARGET_BUILD_NETFLIX:= true
127endif
128########################################################################
129
130#########################################################################
131#
132# Dm-Verity
133#
134#########################################################################
135#BUILD_WITH_DM_VERITY := true
136#TARGET_USE_SECURITY_DM_VERITY_MODE_WITH_TOOL := true
137ifeq ($(TARGET_USE_SECURITY_DM_VERITY_MODE_WITH_TOOL), true)
138BUILD_WITH_DM_VERITY := true
139endif # ifeq ($(TARGET_USE_SECURITY_DM_VERITY_MODE_WITH_TOOL), true)
140ifeq ($(BUILD_WITH_DM_VERITY), true)
141PRODUCT_PACKAGES += \
142 libfs_mgr \
143 fs_mgr \
144 slideshow
145endif
146ifneq ($(BOARD_OLD_PARTITION),true)
147ifneq ($(BOARD_USES_RECOVERY_AS_BOOT), true)
148ifeq ($(AB_OTA_UPDATER),true)
149ifeq ($(BUILD_WITH_DM_VERITY), true)
150PRODUCT_COPY_FILES += \
151 device/amlogic/ampere/fstab.AB.verity.amlogic:root/fstab.amlogic
152else
153PRODUCT_COPY_FILES += \
154 device/amlogic/ampere/fstab.AB.amlogic:root/fstab.amlogic
155endif
156else
157ifeq ($(BUILD_WITH_DM_VERITY), true)
158PRODUCT_COPY_FILES += \
159 device/amlogic/ampere/fstab.verity.amlogic:root/fstab.amlogic
160else
161PRODUCT_COPY_FILES += \
162 device/amlogic/ampere/fstab.amlogic:root/fstab.amlogic
163endif
164endif
165else
166ifeq ($(AB_OTA_UPDATER),true)
167ifeq ($(BUILD_WITH_DM_VERITY), true)
168PRODUCT_COPY_FILES += \
169 device/amlogic/ampere/fstab.AB.verity.amlogic:recovery/root/fstab.amlogic
170else
171PRODUCT_COPY_FILES += \
172 device/amlogic/ampere/fstab.AB.amlogic:recovery/root/fstab.amlogic
173endif
174else
175ifeq ($(BUILD_WITH_DM_VERITY), true)
176PRODUCT_COPY_FILES += \
177 device/amlogic/ampere/fstab.verity.amlogic:recovery/root/fstab.amlogic
178else
179PRODUCT_COPY_FILES += \
180 device/amlogic/ampere/fstab.amlogic:recovery/root/fstab.amlogic
181endif
182endif
183endif
184endif
185ifeq ($(BOARD_OLD_PARTITION),true)
186PRODUCT_COPY_FILES += \
187 device/amlogic/ampere/fstab.3.14.amlogic:root/fstab.amlogic
188endif
189
190#########################################################################
191#
192# WiFi
193#
194#########################################################################
195
196#MULTI_WIFI_SUPPORT := true
197WIFI_MODULE := bcm4356
198WIFI_BUILD_IN := true
199include device/amlogic/common/wifi.mk
200
201# Change this to match target country
202# 11 North America; 14 Japan; 13 rest of world
203PRODUCT_DEFAULT_WIFI_CHANNELS := 11
204
205
206#########################################################################
207#
208# Bluetooth
209#
210#########################################################################
211
212BOARD_HAVE_BLUETOOTH := true
213BLUETOOTH_MODULE := bcm4356
214#MULTI_BLUETOOTH_SUPPORT := true
215BCM_BLUETOOTH_LPM_ENABLE := true
216include device/amlogic/common/bluetooth.mk
217
218
219#########################################################################
220#
221# ConsumerIr
222#
223#########################################################################
224
225#PRODUCT_PACKAGES += \
226# consumerir.amlogic \
227# SmartRemote
228#PRODUCT_COPY_FILES += \
229# frameworks/native/data/etc/android.hardware.consumerir.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.consumerir.xml
230
231
232#PRODUCT_PACKAGES += libbt-vendor
233
234ifeq ($(SUPPORT_HDMIIN),true)
235PRODUCT_PACKAGES += \
236 libhdmiin \
237 HdmiIn
238endif
239
240PRODUCT_COPY_FILES += \
241 frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml
242
243# Audio
244#
245BOARD_ALSA_AUDIO=tiny
246include device/amlogic/common/audio.mk
247
248#########################################################################
249#
250# Camera
251#
252#########################################################################
253
254ifneq ($(TARGET_BUILD_CTS), true)
255PRODUCT_COPY_FILES += \
256 frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
257 frameworks/native/data/etc/android.hardware.camera.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.xml
258endif
259
260
261
262#########################################################################
263#
264# PlayReady DRM
265#
266#########################################################################
267#export BOARD_PLAYREADY_LEVEL=3 for PlayReady+NOTVP
268#export BOARD_PLAYREADY_LEVEL=1 for PlayReady+OPTEE+TVP
269#########################################################################
270#
271# Verimatrix DRM
272##########################################################################
273#verimatrix web
274BUILD_WITH_VIEWRIGHT_WEB := false
275#verimatrix stb
276BUILD_WITH_VIEWRIGHT_STB := false
277#########################################################################
278
279
280#DRM Widevine
281ifeq ($(BOARD_WIDEVINE_OEMCRYPTO_LEVEL),)
282BOARD_WIDEVINE_OEMCRYPTO_LEVEL := 3
283endif
284
285ifeq ($(BOARD_WIDEVINE_OEMCRYPTO_LEVEL), 1)
286TARGET_USE_OPTEEOS := true
287TARGET_ENABLE_TA_SIGN := true
288TARGET_USE_HW_KEYMASTER := true
289endif
290
291$(call inherit-product, device/amlogic/common/media.mk)
292
293#########################################################################
294#
295# Languages
296#
297#########################################################################
298
299# For all locales, $(call inherit-product, build/target/product/languages_full.mk)
300PRODUCT_LOCALES := en_US en_AU en_IN fr_FR it_IT es_ES et_EE de_DE nl_NL cs_CZ pl_PL ja_JP \
301 zh_TW zh_CN zh_HK ru_RU ko_KR nb_NO es_US da_DK el_GR tr_TR pt_PT pt_BR rm_CH sv_SE bg_BG \
302 ca_ES en_GB fi_FI hi_IN hr_HR hu_HU in_ID iw_IL lt_LT lv_LV ro_RO sk_SK sl_SI sr_RS uk_UA \
303 vi_VN tl_PH ar_EG fa_IR th_TH sw_TZ ms_MY af_ZA zu_ZA am_ET hi_IN en_XA ar_XB fr_CA km_KH \
304 lo_LA ne_NP si_LK mn_MN hy_AM az_AZ ka_GE my_MM mr_IN ml_IN is_IS mk_MK ky_KG eu_ES gl_ES \
305 bn_BD ta_IN kn_IN te_IN uz_UZ ur_PK kk_KZ
306
307#################################################################################
308#
309# PPPOE
310#
311#################################################################################
312#ifneq ($(TARGET_BUILD_GOOGLE_ATV), true)
313#BUILD_WITH_PPPOE := true
314#endif
315
316ifeq ($(BUILD_WITH_PPPOE),true)
317PRODUCT_PACKAGES += \
318 PPPoE \
319 libpppoejni \
320 libpppoe \
321 pppoe_wrapper \
322 pppoe \
323 droidlogic.frameworks.pppoe \
324 droidlogic.external.pppoe \
325 droidlogic.software.pppoe.xml
326PRODUCT_PROPERTY_OVERRIDES += \
327 ro.platform.has.pppoe=true
328endif
329
330#################################################################################
331#
332# DEFAULT LOWMEMORYKILLER CONFIG
333#
334#################################################################################
335BUILD_WITH_LOWMEM_COMMON_CONFIG := true
336
337BOARD_USES_USB_PM := true
338
339PRODUCT_COPY_FILES += \
340 $(LOCAL_PATH)/Third_party_apk_camera.xml:$(TARGET_COPY_OUT_VENDOR)/etc/Third_party_apk_camera.xml \
341
342include device/amlogic/common/software.mk
343ifeq ($(TARGET_BUILD_GOOGLE_ATV),true)
344PRODUCT_PROPERTY_OVERRIDES += \
345 ro.sf.lcd_density=320
346else
347PRODUCT_PROPERTY_OVERRIDES += \
348 ro.sf.lcd_density=240
349endif
350
351
352#########################################################################
353#
354# A/B update
355#
356#########################################################################
357ifeq ($(AB_OTA_UPDATER),true)
358PRODUCT_PACKAGES += \
359 bootctrl.amlogic \
360 bootctl
361
362PRODUCT_PACKAGES += \
363 update_engine \
364 update_engine_client \
365 update_verifier \
366 delta_generator \
367 brillo_update_payload \
368 android.hardware.boot@1.0-impl \
369 android.hardware.boot@1.0-service
370endif
371#########################################################################
372#
373# OpenGLES Version
374#
375#########################################################################
376PRODUCT_PROPERTY_OVERRIDES += \
377 ro.opengles.version=131072
378