forked from rock64-android/device-rockchip-common
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathBoardConfig.mk
executable file
·315 lines (250 loc) · 8.19 KB
/
BoardConfig.mk
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
#
# Copyright 2014 The Android Open-Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Use the non-open-source parts, if they're present
-include vendor/rockchip/common/BoardConfigVendor.mk
TARGET_NO_KERNEL ?= false
TARGET_PREBUILT_KERNEL ?= kernel/arch/arm/boot/zImage
TARGET_PREBUILT_RESOURCE ?= kernel/resource.img
TARGET_BOARD_PLATFORM ?= rk3288
TARGET_BOARD_HARDWARE ?= rk30board
# value: tablet,box,phone
# It indicates whether to be tablet platform or not
ifneq ($(filter %box, $(TARGET_PRODUCT)), )
TARGET_BOARD_PLATFORM_PRODUCT ?= box
else
ifneq ($(filter %vr, $(TARGET_PRODUCT)), )
TARGET_BOARD_PLATFORM_PRODUCT ?= vr
else
TARGET_BOARD_PLATFORM_PRODUCT ?= tablet
endif
endif
# CPU feature configration
ifeq ($(strip $(TARGET_BOARD_HARDWARE)), rk30board)
TARGET_ARCH ?= arm
TARGET_ARCH_VARIANT ?= armv7-a-neon
ARCH_ARM_HAVE_TLS_REGISTER ?= true
TARGET_CPU_ABI ?= armeabi-v7a
TARGET_CPU_ABI2 ?= armeabi
TARGET_CPU_VARIANT ?= cortex-a9
TARGET_CPU_SMP ?= true
else
TARGET_ARCH ?= x86
TARGET_ARCH_VARIANT ?= silvermont
TARGET_CPU_ABI ?= x86
TARGET_CPU_ABI2 ?=
TARGET_CPU_SMP ?= true
endif
# GPU configration
TARGET_BOARD_PLATFORM_GPU ?= mali-t760
BOARD_USE_LCDC_COMPOSER ?= false
GRAPHIC_MEMORY_PROVIDER ?= ump
USE_OPENGL_RENDERER ?= true
TARGET_DISABLE_TRIPLE_BUFFERING ?= false
TARGET_RUNNING_WITHOUT_SYNC_FRAMEWORK ?= false
DEVICE_HAVE_LIBRKVPU ?= true
#rotate screen to 0, 90, 180, 270
#0: rotate_0
#90: rotate_90
#180: rotate_180
#270: rotate_270
ROTATE_SCREEN ?= rotate_0
#Screen to Double, Single
#YES: Screen to Double
#NO: Screen to single
DOUBLE_SCREEN ?= NO
ifeq ($(strip $(TARGET_BOARD_PLATFORM_GPU)), mali400)
BOARD_EGL_CFG := vendor/rockchip/common/gpu/Mali400/lib/arm/egl.cfg
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_GPU)), mali450)
BOARD_EGL_CFG := vendor/rockchip/common/gpu/Mali450/lib/x86/egl.cfg
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_GPU)), mali-t860)
BOARD_EGL_CFG := vendor/rockchip/common/gpu/MaliT860/etc/egl.cfg
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_GPU)), mali-t760)
BOARD_EGL_CFG := vendor/rockchip/common/gpu/MaliT760/etc/egl.cfg
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_GPU)), mali-t720)
BOARD_EGL_CFG := vendor/rockchip/common/gpu/MaliT720/etc/egl.cfg
endif
ifeq ($(strip $(TARGET_BOARD_PLATFORM_GPU)), PVR540)
BOARD_EGL_CFG ?= vendor/rockchip/common/gpu/PVR540/egl.cfg
endif
TARGET_BOOTLOADER_BOARD_NAME ?= rk30sdk
TARGET_NO_BOOTLOADER ?= true
BOARD_USE_LOW_MEM ?= false
DEVICE_PACKAGE_OVERLAYS += device/rockchip/common/overlay
#######for target product ########
ifeq ($(TARGET_BOARD_PLATFORM_PRODUCT),box)
DEVICE_PACKAGE_OVERLAYS += device/rockchip/common/overlay_screenoff
ADDITIONAL_DEFAULT_PROPERTIES += \
ro.target.product=box
else ifeq ($(TARGET_BOARD_PLATFORM_PRODUCT),vr)
ADDITIONAL_DEFAULT_PROPERTIES += \
ro.target.product=vr
else ifeq ($(TARGET_BOARD_PLATFORM_PRODUCT),laptop)
ADDITIONAL_DEFAULT_PROPERTIES += \
ro.target.product=laptop
else
ADDITIONAL_DEFAULT_PROPERTIES += \
ro.target.product=tablet
endif
TARGET_RELEASETOOLS_EXTENSIONS := device/rockchip/common
TARGET_PROVIDES_INIT_RC ?= false
#BOARD_HAL_STATIC_LIBRARIES ?= libdumpstate.$(TARGET_PRODUCT) libhealthd.$(TARGET_PRODUCT)
//MAX-SIZE=512M, for generate out/.../system.img
BOARD_SYSTEMIMAGE_PARTITION_SIZE ?= 1073741824
BOARD_CACHEIMAGE_PARTITION_SIZE := 69206016
BOARD_FLASH_BLOCK_SIZE ?= 131072
# Enable dex-preoptimization to speed up first boot sequence
ifeq ($(HOST_OS),linux)
ifeq ($(TARGET_BUILD_VARIANT),user)
ifeq ($(WITH_DEXPREOPT),)
WITH_DEXPREOPT ?= true
endif
endif
endif
ART_USE_HSPACE_COMPACT ?= true
TARGET_USES_LOGD ?= true
# Sepolicy
BOARD_SEPOLICY_DIRS ?= device/rockchip/common/sepolicy
# Recovery
TARGET_NO_RECOVERY ?= false
TARGET_ROCHCHIP_RECOVERY ?= true
# to flip screen in recovery
BOARD_HAS_FLIPPED_SCREEN ?= false
# Auto update package from USB
RECOVERY_AUTO_USB_UPDATE ?= false
# To use bmp as kernel logo, uncomment the line below to use bgra 8888 in recovery
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
TARGET_ROCKCHIP_PCBATEST ?= false
#TARGET_RECOVERY_UI_LIB ?= librecovery_ui_$(TARGET_PRODUCT)
TARGET_USERIMAGES_USE_EXT4 ?= true
TARGET_USERIMAGES_USE_F2FS ?= false
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE ?= ext4
RECOVERY_UPDATEIMG_RSA_CHECK ?= false
RECOVERY_BOARD_ID ?= false
# RECOVERY_BOARD_ID ?= true
# for widevine drm
BOARD_WIDEVINE_OEMCRYPTO_LEVEL := 3
# for drmservice
BUILD_WITH_DRMSERVICE :=true
# for tablet encryption
BUILD_WITH_CRYPTO := false
# Audio
BOARD_USES_GENERIC_AUDIO ?= true
# Wifi&Bluetooth
BOARD_HAVE_BLUETOOTH ?= true
BLUETOOTH_USE_BPLUS ?= false
BOARD_HAVE_BLUETOOTH_BCM ?= false
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR ?= device/rockchip/$(TARGET_BOARD_PLATFORM)/bluetooth
include device/rockchip/common/wifi_bt_common.mk
#Camera flash
BOARD_HAVE_FLASH ?= true
#HDMI support
BOARD_SUPPORT_HDMI ?= true
# google apps
BUILD_BOX_WITH_GOOGLE_MARKET ?= false
BUILD_WITH_GOOGLE_MARKET ?= false
BUILD_WITH_GOOGLE_MARKET_ALL ?= false
BUILD_WITH_GOOGLE_FRP ?= false
# face lock
BUILD_WITH_FACELOCK ?= false
# ebook
BUILD_WITH_RK_EBOOK ?= false
# Sensors
BOARD_SENSOR_ST ?= true
# if use akm8963
#BOARD_SENSOR_COMPASS_AK8963 ?= true
# if need calculation angle between two gsensors
#BOARD_SENSOR_ANGLE ?= true
# if need calibration
#BOARD_SENSOR_CALIBRATION ?= true
# if use mpu
#BOARD_SENSOR_MPU ?= true
#BOARD_USES_GENERIC_INVENSENSE ?= false
# readahead files to improve boot time
# BOARD_BOOT_READAHEAD ?= true
BOARD_BP_AUTO ?= true
# phone pad codec list
BOARD_CODEC_WM8994 ?= false
BOARD_CODEC_RT5625_SPK_FROM_SPKOUT ?= false
BOARD_CODEC_RT5625_SPK_FROM_HPOUT ?= false
BOARD_CODEC_RT3261 ?= false
BOARD_CODEC_RT3224 ?= true
BOARD_CODEC_RT5631 ?= false
BOARD_CODEC_RK616 ?= false
# Vold configrations
# if set to true m-user would be disabled and UMS enabled, if set to disable UMS would be disabled and m-user enabled
BUILD_WITH_UMS ?= false
# if set to true BUILD_WITH_UMS must be false.
BUILD_WITH_CDROM ?= false
BUILD_WITH_CDROM_PATH ?= /system/etc/cd.iso
# multi usb partitions
BUILD_WITH_MULTI_USB_PARTITIONS ?= false
# define tablet support NTFS
BOARD_IS_SUPPORT_NTFS ?= true
# pppoe for cts, you should set this true during pass CTS and which will disable pppoe function.
BOARD_PPPOE_PASS_CTS ?= false
# ethernet
BOARD_HS_ETHERNET ?= true
# manifest
SYSTEM_WITH_MANIFEST ?= true
# no battery
BUILD_WITHOUT_BATTERY ?= false
BOARD_CHARGER_ENABLE_SUSPEND ?= true
CHARGER_ENABLE_SUSPEND ?= true
CHARGER_DISABLE_INIT_BLANK ?= true
BOARD_CHARGER_DISABLE_INIT_BLANK ?= true
#stress test
BOARD_HAS_STRESSTEST_APP ?= true
#boot optimization
BOARD_WITH_BOOT_BOOST ?= false
#optimise mem
BOARD_WITH_MEM_OPTIMISE ?= false
#force app can see udisk
BOARD_FORCE_UDISK_VISIBLE ?= true
# disable safe mode to speed up boot time
BOARD_DISABLE_SAFE_MODE ?= true
#enable 3g dongle
BOARD_ENABLE_3G_DONGLE := true
#for boot and shutdown animation ringing
BOOT_SHUTDOWN_ANIMATION_RINGING ?= false
#for pms multi thead scan
BOARD_ENABLE_PMS_MULTI_THREAD_SCAN ?= false
#for optee support
PRODUCT_HAVE_OPTEE ?= true
#for WV keybox provision
ENABLE_KEYBOX_PROVISION ?= false
# product has follow sensors or not,if had override it in product's BoardConfig
BOARD_HAS_GPS ?= false
BOARD_NFC_SUPPORT ?= false
BOARD_GRAVITY_SENSOR_SUPPORT ?= false
BOARD_COMPASS_SENSOR_SUPPORT ?= false
BOARD_GYROSCOPE_SENSOR_SUPPORT ?= false
BOARD_PROXIMITY_SENSOR_SUPPORT ?= false
BOARD_LIGHT_SENSOR_SUPPORT ?= false
BOARD_OPENGL_AEP ?= false
BOARD_PRESSURE_SENSOR_SUPPORT ?= false
BOARD_TEMPERATURE_SENSOR_SUPPORT ?= false
BOARD_USB_HOST_SUPPORT ?= false
BOARD_USB_ACCESSORY_SUPPORT ?= true
BOARD_CAMERA_SUPPORT ?= false
USE_CLANG_PLATFORM_BUILD ?= true
# Zoom out recovery ui of box by two percent.
ifeq ($(TARGET_BOARD_PLATFORM_PRODUCT),box)
TARGET_RECOVERY_OVERSCAN_PERCENT := 2
endif