-
Notifications
You must be signed in to change notification settings - Fork 0
/
device.mk
executable file
·233 lines (193 loc) · 9.5 KB
/
device.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
#
# 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.
#
# Set system properties identifying the chipset
PRODUCT_VENDOR_PROPERTIES += ro.soc.model=RK3288
PRODUCT_PACKAGES += \
WallpaperPicker \
Launcher3
PRODUCT_PACKAGES += \
RockchipPinnerService \
VoltageDetectService
#$_rbox_$_modify_$_zhengyang: add displayd
PRODUCT_PACKAGES += \
displayd \
libion
# Enable this for support f2fs with data partion
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
# This ensures the needed build tools are available.
# TODO: make non-linux builds happy with external/f2fs-tool; system/extras/f2fs_utils
ifeq ($(HOST_OS), linux)
TARGET_USERIMAGES_USE_F2FS := true
endif
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/init.tinker_board.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.tinker_board.rc \
$(LOCAL_PATH)/ueventd.tinker_board.rc:$(TARGET_COPY_OUT_VENDOR)/etc/ueventd.rc \
$(LOCAL_PATH)/init.connectivity.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.connectivity.rc \
$(LOCAL_PATH)/init.rk3288.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.rk3288.rc \
$(LOCAL_PATH)/init.rk3288.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/hw/init.rk3288.usb.rc \
$(LOCAL_PATH)/wake_lock_filter.xml:system/etc/wake_lock_filter.xml \
device/rockchip/$(TARGET_BOARD_PLATFORM)/package_performance.xml:$(TARGET_COPY_OUT_ODM)/etc/package_performance.xml \
device/asus/tinker_board/Tinker_Board/media_profiles_default.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
device/asus/tinker_board/Tinker_Board/media_profiles_imx219.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_imx219.xml
ifeq ($(BOARD_CAMERA_SUPPORT),true)
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.camera.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.xml \
frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml
PRODUCT_PACKAGES += \
librkisp_aec \
librkisp_awb \
librkisp_af
endif
ifeq ($(BOARD_CAMERA_SUPPORT_EXT),true)
PRODUCT_COPY_FILES += \
device/rockchip/$(TARGET_BOARD_PLATFORM)/external_camera_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/external_camera_config.xml \
frameworks/native/data/etc/android.hardware.camera.external.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.external.xml
PRODUCT_PACKAGES += \
android.hardware.camera.provider@2.4-external-service
endif
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/init.recovery.rk30board.rc:recovery/root/init.recovery.rk30board.rc \
vendor/rockchip/common/bin/$(TARGET_ARCH)/busybox:recovery/root/sbin/busybox \
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.opengles.aep.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.opengles.aep.xml
ifeq ($(BUILD_WITH_GOOGLE_MARKET),false)
# copy xml files for Vulkan features.
PRODUCT_COPY_FILES += \
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.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level-1.xml \
frameworks/native/data/etc/android.hardware.vulkan.version-1_0_3.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version-1_0_3.xml
endif
# update realtek bluetooth configs
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/bluetooth/rtkbt.conf:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth/rtkbt.conf
# setup dalvik vm configs.
$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
$(call inherit-product-if-exists, vendor/rockchip/$(TARGET_BOARD_PLATFORM)/device-vendor.mk)
PRODUCT_COPY_FILES += \
device/rockchip/rk3288/public.libraries.txt:vendor/etc/public.libraries.txt
BOARD_SEPOLICY_DIRS += \
device/asus/tinker_board/sepolicy/VoltageDetectService \
device/asus/tinker_board/sepolicy/AsusDebugger
# Touch
PRODUCT_COPY_FILES += \
device/asus/tinker_board/touch/fts_ts.idc:system/usr/idc/fts_ts.idc
# led
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/led/led.sh:$(TARGET_COPY_OUT_VENDOR)/bin/led.sh
BOARD_SEPOLICY_DIRS += \
device/asus/tinker_board/sepolicy/led
#
## setup boot-shutdown animation configs.
#
HAVE_BOOT_ANIMATION := $(shell test -f $(TARGET_DEVICE_DIR)/bootanimation.zip && echo true)
HAVE_SHUTDOWN_ANIMATION := $(shell test -f $(TARGET_DEVICE_DIR)/shutdownanimation.zip && echo true)
ifeq ($(HAVE_BOOT_ANIMATION), true)
PRODUCT_COPY_FILES += $(TARGET_DEVICE_DIR)/bootanimation.zip:$(TARGET_COPY_OUT_ODM)/media/bootanimation.zip
endif
ifeq ($(HAVE_SHUTDOWN_ANIMATION), true)
PRODUCT_COPY_FILES += $(TARGET_DEVICE_DIR)/shutdownanimation.zip:$(TARGET_COPY_OUT_ODM)/media/shutdownanimation.zip
endif
#
## setup oem-content configs.
#
HAVE_PRESET_CONTENT := $(shell test -d $(TARGET_DEVICE_DIR)/pre_set && echo true)
HAVE_PRESET_DEL_CONTENT := $(shell test -d $(TARGET_DEVICE_DIR)/pre_set_del && echo true)
ifeq ($(HAVE_PRESET_DEL_CONTENT), true)
PRODUCT_COPY_FILES += \
$(call find-copy-subdir-files,*,$(TARGET_DEVICE_DIR)/pre_set_del,$(TARGET_COPY_OUT_ODM)/pre_set_del)
PRODUCT_PROPERTY_OVERRIDES += ro.boot.copy_oem=true
endif
ifeq ($(HAVE_PRESET_CONTENT), true)
PRODUCT_COPY_FILES += \
$(call find-copy-subdir-files,*,$(TARGET_DEVICE_DIR)/pre_set,$(TARGET_COPY_OUT_ODM)/pre_set)
PRODUCT_PROPERTY_OVERRIDES += ro.boot.copy_oem=true
endif
# hdmi cec
ifneq ($(filter atv box tablet, $(strip $(TARGET_BOARD_PLATFORM_PRODUCT))), )
BOARD_SHOW_HDMI_SETTING := true
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.hardware.hdmi.cec.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.hdmi.cec.xml \
$(LOCAL_PATH)/tv/permissions/privapp-permissions-tv-common.xml:system/etc/permissions/privapp-permissions-tv-common.xml
PRODUCT_PROPERTY_OVERRIDES += ro.hdmi.device_type=4
PRODUCT_PACKAGES += \
hdmi_cec.$(TARGET_BOARD_PLATFORM)
# HDMI CEC HAL
PRODUCT_PACKAGES += \
android.hardware.tv.cec@1.0-impl \
android.hardware.tv.cec@1.0-service
endif
# Include thermal HAL module
BOARD_ROCKCHIP_THERMAL := true
#
# add Rockchip properties here
#
PRODUCT_PROPERTY_OVERRIDES += \
ro.ril.ecclist=112,911 \
ro.opengles.version=196610 \
wifi.interface=wlan0 \
rild.libpath=/system/lib/libril-rk29-dataonly.so \
rild.libargs=-d /dev/ttyACM0 \
persist.tegra.nvmmlite = 1 \
ro.audio.monitorOrientation=true \
debug.nfc.fw_download=false \
debug.nfc.se=false \
ro.rk.screenoff_time=60000 \
ro.rk.screenshot_enable=true \
ro.rk.def_brightness=200 \
ro.rk.homepage_base=http://www.google.com/webhp?client={CID}&source=android-home \
ro.rk.install_non_market_apps=false \
vendor.hwc.compose_policy=6 \
sys.wallpaper.rgb565=0 \
sf.power.control=2073600 \
sys.rkadb.root=0 \
ro.sf.fakerotation=false \
ro.sf.hwrotation=0 \
ro.rk.MassStorage=false \
ro.rk.systembar.voiceicon=true \
ro.rk.systembar.tabletUI=false \
ro.rk.LowBatteryBrightness=false \
ro.tether.denied=false \
sys.resolution.changed=false \
ro.default.size=100 \
ro.product.usbfactory=rockchip_usb \
wifi.supplicant_scan_interval=15 \
ro.factory.tool=0 \
ro.kernel.android.checkjni=0 \
ro.build.shutdown_timeout=6 \
persist.enable_task_snapshots=false \
ro.adb.secure=0 \
ro.rk.displayd.enable=false \
persist.spdif_sounds=0 \
vendor.hwc.device.primary=HDMI-A \
vendor.gralloc.no_afbc_for_fb_target_layer=1 \
vendor.gralloc.no_afbc_for_sf_client_layer=1
#add properties for tcp adb
PRODUCT_PROPERTY_OVERRIDES += persist.adb.tcp.port = 5555
PRODUCT_COPY_FILES += \
vendor/rockchip/common/bin/$(TARGET_ARCH)/e2fsck:recovery/root/sbin/e2fsck \
vendor/rockchip/common/bin/$(TARGET_ARCH)/resize2fs:recovery/root/sbin/resize2fs \
device/asus/common/bin/$(TARGET_ARCH)/parted:recovery/root/sbin/parted \
device/asus/common/bin/$(TARGET_ARCH)/sgdisk:recovery/root/sbin/sgdisk
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/recovery.fstab.emmc:recovery/root/system/etc/recovery.fstab.emmc \
$(LOCAL_PATH)/fstab.rk30board.emmc:$(TARGET_COPY_OUT_RAMDISK)/fstab.rk30board.emmc \
$(LOCAL_PATH)/fstab.rk30board.emmc:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.rk30board.emmc \
$(LOCAL_PATH)/recovery.fstab.sd:recovery/root/system/etc/recovery.fstab.sd \
$(LOCAL_PATH)/fstab.rk30board.sd:$(TARGET_COPY_OUT_RAMDISK)/fstab.rk30board.sd \
$(LOCAL_PATH)/fstab.rk30board.sd:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.rk30board.sd \
$(LOCAL_PATH)/fstab.rk30board.no_sdmmc:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.rk30board
BOARD_SEPOLICY_DIRS += \
device/asus/tinker_board/sepolicy/dtoverlay