Skip to content
This repository was archived by the owner on Aug 25, 2024. It is now read-only.

Commit 279536e

Browse files
author
Peter Nyilas
committed
initial commit for Mi 4i device tree
0 parents  commit 279536e

File tree

102 files changed

+18969
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+18969
-0
lines changed

Diff for: Android.mk

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#
2+
# Copyright (C) 2015 The CyanogenMod Project
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
LOCAL_PATH := $(call my-dir)
17+
18+
ifeq ($(TARGET_DEVICE),ferrari)
19+
include $(call all-makefiles-under,$(LOCAL_PATH))
20+
21+
KM_IMAGES := \
22+
keymaste.b00 keymaste.b01 keymaste.b02 keymaste.b03 keymaste.mdt
23+
24+
KM_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(KM_IMAGES)))
25+
$(KM_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
26+
@echo "Keymaster firmware link: $@"
27+
@mkdir -p $(dir $@)
28+
@rm -rf $@
29+
$(hide) ln -sf /firmware/image/$(notdir $@) $@
30+
31+
ALL_DEFAULT_INSTALLED_MODULES += $(KM_SYMLINKS)
32+
33+
WCNSS_IMAGES := \
34+
wcnss.b00 wcnss.b01 wcnss.b02 wcnss.b04 wcnss.b06 \
35+
wcnss.b09 wcnss.b10 wcnss.b11 wcnss.mdt
36+
37+
WCNSS_SYMLINKS := $(addprefix $(TARGET_OUT_ETC)/firmware/,$(notdir $(WCNSS_IMAGES)))
38+
$(WCNSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
39+
@echo "WCNSS firmware link: $@"
40+
@mkdir -p $(dir $@)
41+
@rm -rf $@
42+
$(hide) ln -sf /firmware/image/$(notdir $@) $@
43+
44+
ALL_DEFAULT_INSTALLED_MODULES += $(WCNSS_SYMLINKS)
45+
46+
# Create a link for the WCNSS config file, which ends up as a writable
47+
# version in /data/misc/wifi
48+
$(shell mkdir -p $(TARGET_OUT)/etc/firmware/wlan/prima; \
49+
ln -sf /data/misc/wifi/WCNSS_qcom_cfg.ini \
50+
$(TARGET_OUT)/etc/firmware/wlan/prima/WCNSS_qcom_cfg.ini)
51+
52+
# same as for wcd9306 files
53+
$(shell mkdir -p $(TARGET_OUT)/etc/firmware/wcd9306; \
54+
ln -sf /data/misc/audio/wcd9320_anc.bin \
55+
$(TARGET_OUT)/etc/firmware/wcd9306/wcd9306_anc.bin; \
56+
ln -sf /data/misc/audio/mbhc.bin \
57+
$(TARGET_OUT)/etc/firmware/wcd9306/wcd9306_mbhc.bin;)
58+
59+
endif

Diff for: AndroidProducts.mk

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#
2+
# Copyright (C) 2014 The CyanogenMod Project
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
PRODUCT_MAKEFILES := \
17+
$(LOCAL_DIR)/full_ferrari.mk

Diff for: BoardConfig.mk

+234
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
#
2+
# Copyright (C) 2014 The CyanogenMod Project
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
BOARD_VENDOR := xiaomi
17+
18+
FERRARI_PATH := device/xiaomi/ferrari
19+
20+
# Include path
21+
TARGET_SPECIFIC_HEADER_PATH := $(FERRARI_PATH)/include
22+
23+
# ANT+
24+
BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease"
25+
26+
# Audio
27+
BOARD_USES_ALSA_AUDIO := true
28+
TARGET_USES_QCOM_MM_AUDIO := true
29+
AUDIO_FEATURE_ENABLED_FM := true
30+
AUDIO_FEATURE_ENABLED_MULTI_VOICE_SESSIONS := true
31+
32+
# Bluetooth
33+
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(FERRARI_PATH)/bluetooth
34+
BOARD_HAVE_BLUETOOTH := true
35+
BOARD_HAVE_BLUETOOTH_QCOM := true
36+
QCOM_BT_USE_SMD_TTY := true
37+
BLUETOOTH_HCI_USE_MCT := true
38+
39+
# Bootloader
40+
TARGET_BOARD_PLATFORM := msm8916
41+
TARGET_BOOTLOADER_BOARD_NAME := msm8916
42+
43+
TARGET_NO_BOOTLOADER := false
44+
TARGET_NO_KERNEL := false
45+
46+
# Charger
47+
BOARD_CHARGER_SHOW_PERCENTAGE := true
48+
49+
# FM
50+
TARGET_QCOM_NO_FM_FIRMWARE := true
51+
52+
# Fonts
53+
EXTENDED_FONT_FOOTPRINT := true
54+
55+
# Init
56+
TARGET_INIT_VENDOR_LIB := libinit_msm
57+
58+
# Lights
59+
TARGET_PROVIDES_LIBLIGHT := true
60+
61+
# Power
62+
TARGET_POWERHAL_VARIANT := qcom
63+
64+
# QCOM hardware
65+
BOARD_USES_QCOM_HARDWARE := true
66+
67+
# Time services
68+
BOARD_USES_QC_TIME_SERVICES := true
69+
70+
# Vold
71+
BOARD_VOLD_EMMC_SHARES_DEV_MAJOR := true
72+
TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun0/file
73+
74+
# Video
75+
TARGET_HAVE_SIGNED_VENUS_FW := true
76+
77+
# Wifi
78+
BOARD_HAS_QCOM_WLAN := true
79+
BOARD_WLAN_DEVICE := qcwcn
80+
BOARD_HOSTAPD_DRIVER := NL80211
81+
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn
82+
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
83+
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn
84+
WIFI_DRIVER_MODULE_NAME := wlan
85+
WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/wlan.ko"
86+
WIFI_DRIVER_FW_PATH_AP := "ap"
87+
WIFI_DRIVER_FW_PATH_STA := "sta"
88+
WPA_SUPPLICANT_VERSION := VER_0_8_X
89+
TARGET_USES_QCOM_WCNSS_QMI := true
90+
91+
# Releasetools
92+
TARGET_RELEASETOOLS_EXTENSIONS := $(VENDOR_PATH)
93+
94+
# RIL
95+
PROTOBUF_SUPPORTED := true
96+
TARGET_RIL_VARIANT := caf
97+
98+
# SELinux
99+
include device/qcom/sepolicy/sepolicy.mk
100+
101+
# SELinux
102+
BOARD_SEPOLICY_DIRS += \
103+
device/xiaomi/ferrari/sepolicy
104+
105+
BOARD_SEPOLICY_UNION += \
106+
file.te \
107+
file_contexts \
108+
system_app.te \
109+
system_server.te \
110+
system.te \
111+
wcnss_service.te
112+
113+
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
114+
TARGET_ARCH := arm64
115+
TARGET_ARCH_VARIANT := armv8-a
116+
TARGET_CPU_ABI := arm64-v8a
117+
TARGET_CPU_ABI2 :=
118+
TARGET_CPU_VARIANT := generic
119+
120+
TARGET_2ND_ARCH := arm
121+
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
122+
TARGET_2ND_CPU_ABI := armeabi-v7a
123+
TARGET_2ND_CPU_ABI2 := armeabi
124+
TARGET_2ND_CPU_VARIANT := cortex-a53
125+
126+
TARGET_NO_BOOTLOADER := false
127+
TARGET_NO_KERNEL := false
128+
129+
MALLOC_IMPL := dlmalloc
130+
131+
# Power
132+
TARGET_POWERHAL_VARIANT := qcom
133+
134+
# Qualcomm support
135+
BOARD_USES_QC_TIME_SERVICES := true
136+
ifneq ($(QCPATH),)
137+
BOARD_USES_QCNE := true
138+
endif
139+
BOARD_USES_QCOM_HARDWARE := true
140+
141+
TARGET_USERIMAGES_USE_EXT4 := true
142+
BOARD_BOOTIMAGE_PARTITION_SIZE := 0x02000000
143+
BOARD_RECOVERYIMAGE_PARTITION_SIZE := 0x02000000
144+
BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1744830464
145+
BOARD_USERDATAIMAGE_PARTITION_SIZE := 13144931840
146+
BOARD_CACHEIMAGE_PARTITION_SIZE := 402653184
147+
BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
148+
BOARD_PERSISTIMAGE_PARTITION_SIZE := 33554432
149+
BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
150+
BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
151+
152+
# Added to indicate that protobuf-c is supported in this build
153+
PROTOBUF_SUPPORTED := true
154+
155+
TARGET_USES_ION := true
156+
TARGET_USES_NEW_ION_API :=true
157+
TARGET_USES_QCOM_BSP := true
158+
TARGET_NO_RPC := true
159+
160+
# kernel
161+
BOARD_CUSTOM_BOOTIMG_MK := $(FERRARI_PATH)/mkbootimg.mk
162+
BOARD_MKBOOTIMG_ARGS := --ramdisk_offset 0x02000000 --tags_offset 0x01E00000
163+
BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1 earlyprintk
164+
BOARD_KERNEL_SEPARATED_DT := true
165+
166+
BOARD_KERNEL_BASE := 0x80000000
167+
BOARD_KERNEL_PAGESIZE := 2048
168+
BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
169+
BOARD_RAMDISK_OFFSET := 0x02000000
170+
171+
TARGET_KERNEL_ARCH := arm64
172+
TARGET_KERNEL_HEADER_ARCH := arm64
173+
TARGET_KERNEL_CROSS_COMPILE_PREFIX := aarch64-linux-android-
174+
TARGET_USES_UNCOMPRESSED_KERNEL := true
175+
TARGET_KERNEL_SOURCE := kernel/xiaomi/ferrari
176+
TARGET_KERNEL_CONFIG := ferrari_debug_defconfig
177+
178+
# Shader cache config options
179+
# Maximum size of the GLES Shaders that can be cached for reuse.
180+
# Increase the size if shaders of size greater than 12KB are used.
181+
MAX_EGL_CACHE_KEY_SIZE := 12*1024
182+
183+
# Maximum GLES shader cache size for each app to store the compiled shader
184+
# binaries. Decrease the size if RAM or Flash Storage size is a limitation
185+
# of the device.
186+
MAX_EGL_CACHE_SIZE := 2048*1024
187+
188+
BOARD_EGL_CFG := $(FERRARI_PATH)/configs/egl.cfg
189+
USE_OPENGL_RENDERER := true
190+
TARGET_USES_C2D_COMPOSITION := true
191+
TARGET_GRALLOC_USES_ASHMEM := false
192+
TARGET_USES_ION := true
193+
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
194+
HAVE_ADRENO_SOURCE:= false
195+
VSYNC_EVENT_PHASE_OFFSET_NS := 7500000
196+
SF_VSYNC_EVENT_PHASE_OFFSET_NS := 5000000
197+
198+
TARGET_USE_ION_COMPAT := true
199+
200+
TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/
201+
# Add NON-HLOS files for ota upgrade
202+
ADD_RADIO_FILES := true
203+
204+
#Enable HW based full disk encryption
205+
TARGET_HW_DISK_ENCRYPTION := true
206+
207+
#Enable SW based full disk encryption
208+
TARGET_SWV8_DISK_ENCRYPTION := true
209+
210+
TARGET_USES_LOGD := false
211+
212+
# Recovery
213+
RECOVERY_FSTAB_VERSION := 2
214+
TARGET_RECOVERY_FSTAB := $(FERRARI_PATH)/rootdir/root/fstab.qcom
215+
BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_23x41.h\"
216+
TARGET_RECOVERY_PIXEL_FORMAT := "RGBX_8888"
217+
TARGET_RECOVERY_LCD_BACKLIGHT_PATH := \"/sys/class/leds/lcd-backlight/brightness\"
218+
219+
# ANT+
220+
BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease"
221+
222+
# Include an expanded selection of fonts
223+
EXTENDED_FONT_FOOTPRINT := true
224+
225+
# Flags
226+
COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD
227+
228+
# Charger
229+
BOARD_CHARGER_ENABLE_SUSPEND := true
230+
231+
BOARD_HAS_NO_SELECT_BUTTON := true
232+
233+
# inherit from the proprietary version
234+
-include vendor/xiaomi/ferrari/BoardConfigVendor.mk

Diff for: audio/acdb/MTP/MTP_Bluetooth_cal.acdb

41.5 KB
Binary file not shown.

Diff for: audio/acdb/MTP/MTP_General_cal.acdb

12.7 KB
Binary file not shown.

Diff for: audio/acdb/MTP/MTP_Global_cal.acdb

2.35 KB
Binary file not shown.

Diff for: audio/acdb/MTP/MTP_Handset_cal.acdb

155 KB
Binary file not shown.

Diff for: audio/acdb/MTP/MTP_Hdmi_cal.acdb

1.29 KB
Binary file not shown.

Diff for: audio/acdb/MTP/MTP_Headset_cal.acdb

74.5 KB
Binary file not shown.

Diff for: audio/acdb/MTP/MTP_Speaker_cal.acdb

173 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.29 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

Diff for: audio/acdb/QRD/QRD_Bluetooth_cal.acdb

69.1 KB
Binary file not shown.

Diff for: audio/acdb/QRD/QRD_General_cal.acdb

13.2 KB
Binary file not shown.

Diff for: audio/acdb/QRD/QRD_Global_cal.acdb

2.84 KB
Binary file not shown.

Diff for: audio/acdb/QRD/QRD_Handset_cal.acdb

308 KB
Binary file not shown.

Diff for: audio/acdb/QRD/QRD_Hdmi_cal.acdb

1.42 KB
Binary file not shown.

Diff for: audio/acdb/QRD/QRD_Headset_cal.acdb

150 KB
Binary file not shown.

Diff for: audio/acdb/QRD/QRD_Speaker_cal.acdb

334 KB
Binary file not shown.

0 commit comments

Comments
 (0)