Skip to content

Commit 9f861ac

Browse files
committed
Infinix-X682C: Initial TWRP device tree
Made with SebaUbuntu's TWRP device tree generator Arch: arm64 Manufacturer: infinix Model: Infinix Script version: 1.3.0 Signed-off-by: Sebastiano Barezzi <[email protected]>
0 parents  commit 9f861ac

File tree

12 files changed

+349
-0
lines changed

12 files changed

+349
-0
lines changed

Android.mk

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#
2+
# Copyright (C) 2020 The Android Open Source Project
3+
# Copyright (C) 2020 The TWRP Open Source Project
4+
# Copyright (C) 2020 SebaUbuntu's TWRP device tree generator
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
LOCAL_PATH := $(call my-dir)
20+
21+
ifeq ($(TARGET_DEVICE), Infinix-X682C)
22+
include $(call all-subdir-makefiles,$(LOCAL_PATH))
23+
endif

AndroidProducts.mk

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

BoardConfig.mk

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
#
2+
# Copyright (C) 2020 The Android Open Source Project
3+
# Copyright (C) 2020 The TWRP Open Source Project
4+
# Copyright (C) 2020 SebaUbuntu's TWRP device tree generator
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
DEVICE_PATH := device/infinix/Infinix-X682C
20+
21+
# For building with minimal manifest
22+
ALLOW_MISSING_DEPENDENCIES := true
23+
24+
# Architecture
25+
TARGET_ARCH := arm64
26+
TARGET_ARCH_VARIANT := armv8-a
27+
TARGET_CPU_ABI := arm64-v8a
28+
TARGET_CPU_ABI2 :=
29+
TARGET_CPU_VARIANT := generic
30+
31+
TARGET_2ND_ARCH := arm
32+
TARGET_2ND_ARCH_VARIANT := armv7-a-neon
33+
TARGET_2ND_CPU_ABI := armeabi-v7a
34+
TARGET_2ND_CPU_ABI2 := armeabi
35+
TARGET_2ND_CPU_VARIANT := generic
36+
TARGET_BOARD_SUFFIX := _64
37+
TARGET_USES_64_BIT_BINDER := true
38+
39+
# Assert
40+
TARGET_OTA_ASSERT_DEVICE := Infinix-X682C
41+
42+
# Bootloader"
43+
TARGET_BOOTLOADER_BOARD_NAME := CY-X682C-H694-C
44+
45+
# File systems
46+
BOARD_HAS_LARGE_FILESYSTEM := true
47+
#BOARD_RECOVERYIMAGE_PARTITION_SIZE := 33554432 # This is the maximum known partition size, but it can be higher, so we just omit it
48+
BOARD_SYSTEMIMAGE_PARTITION_TYPE := ext4
49+
BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4
50+
BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
51+
TARGET_USERIMAGES_USE_EXT4 := true
52+
TARGET_USERIMAGES_USE_F2FS := true
53+
TARGET_COPY_OUT_VENDOR := vendor
54+
55+
# Kernel
56+
BOARD_KERNEL_CMDLINE := bootopt=64S3,32N2,64N2 buildvariant=user
57+
TARGET_PREBUILT_KERNEL := $(DEVICE_PATH)/prebuilt/Image.gz
58+
TARGET_PREBUILT_DTB := $(DEVICE_PATH)/prebuilt/dtb.img
59+
BOARD_PREBUILT_DTBOIMAGE := $(DEVICE_PATH)/prebuilt/dtbo.img
60+
BOARD_INCLUDE_RECOVERY_DTBO := true
61+
BOARD_BOOTIMG_HEADER_VERSION := 2
62+
BOARD_KERNEL_BASE := 0x40078000
63+
BOARD_KERNEL_PAGESIZE := 2048
64+
BOARD_RAMDISK_OFFSET := 0x07c08000
65+
BOARD_KERNEL_TAGS_OFFSET := 0x0bc08000
66+
BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
67+
BOARD_MKBOOTIMG_ARGS += --ramdisk_offset $(BOARD_RAMDISK_OFFSET)
68+
BOARD_MKBOOTIMG_ARGS += --tags_offset $(BOARD_KERNEL_TAGS_OFFSET)
69+
BOARD_MKBOOTIMG_ARGS += --dtb $(TARGET_PREBUILT_DTB)
70+
BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOTIMG_HEADER_VERSION)
71+
BOARD_KERNEL_IMAGE_NAME := Image.gz
72+
TARGET_KERNEL_ARCH := arm64
73+
TARGET_KERNEL_HEADER_ARCH := arm64
74+
TARGET_KERNEL_SOURCE := kernel/infinix/Infinix-X682C
75+
TARGET_KERNEL_CONFIG := Infinix-X682C_defconfig
76+
77+
# Platform
78+
TARGET_BOARD_PLATFORM := mt6768
79+
80+
# Hack: prevent anti rollback
81+
PLATFORM_SECURITY_PATCH := 2099-12-31
82+
VENDOR_SECURITY_PATCH := 2099-12-31
83+
PLATFORM_VERSION := 16.1.0
84+
85+
# TWRP Configuration
86+
TW_THEME := portrait_hdpi
87+
TW_EXTRA_LANGUAGES := true
88+
TW_SCREEN_BLANK_ON_BOOT := true
89+
TW_INPUT_BLACKLIST := "hbtp_vm"
90+
TW_USE_TOOLBOX := true

device.mk

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#
2+
# Copyright (C) 2020 The Android Open Source Project
3+
# Copyright (C) 2020 The TWRP Open Source Project
4+
# Copyright (C) 2020 SebaUbuntu's TWRP device tree generator
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
LOCAL_PATH := device/infinix/Infinix-X682C
20+

omni_Infinix-X682C.mk

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#
2+
# Copyright (C) 2020 The Android Open Source Project
3+
# Copyright (C) 2020 The TWRP Open Source Project
4+
# Copyright (C) 2020 SebaUbuntu's TWRP device tree generator
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
# Inherit from those products. Most specific first.
20+
$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
21+
$(call inherit-product-if-exists, $(SRC_TARGET_DIR)/product/embedded.mk)
22+
$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base_telephony.mk)
23+
$(call inherit-product, $(SRC_TARGET_DIR)/product/languages_full.mk)
24+
25+
# Inherit from Infinix-X682C device
26+
$(call inherit-product, device/infinix/Infinix-X682C/device.mk)
27+
28+
# Inherit some common Omni stuff.
29+
$(call inherit-product, vendor/omni/config/common.mk)
30+
$(call inherit-product, vendor/omni/config/gsm.mk)
31+
32+
# Device identifier. This must come after all inclusions
33+
PRODUCT_DEVICE := Infinix-X682C
34+
PRODUCT_NAME := omni_Infinix-X682C
35+
PRODUCT_BRAND := Infinix
36+
PRODUCT_MODEL := Infinix
37+
PRODUCT_MANUFACTURER := infinix
38+
PRODUCT_RELEASE_NAME := Infinix Infinix

prebuilt/Image.gz

8.83 MB
Binary file not shown.

prebuilt/dtb.img

109 KB
Binary file not shown.

prebuilt/dtbo.img

64.3 KB
Binary file not shown.

recovery.fstab

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# mount point fstype device flags
2+
/system ext4 system flags=display="System";backup=1;logical;
3+
/system_image emmc system flags=display="System image";backup=1;flashimg=1;logical;
4+
/vendor ext4 vendor flags=display="Vendor";backup=1;logical;
5+
/vendor_image emmc vendor flags=display="Vendor image";backup=1;flashimg=1;logical;
6+
/product ext4 product flags=display="Product";backup=1;logical;
7+
/product_image emmc product flags=display="Product image";backup=1;flashimg=1;logical;
8+
/metadata ext4 /dev/block/platform/bootdevice/by-name/md_udc flags=display="Metadata";
9+
/data f2fs /dev/block/platform/bootdevice/by-name/userdata flags=display="Data";
10+
/cache ext4 /dev/block/platform/bootdevice/by-name/cache flags=display="Cache";
11+
/tranfs ext4 /dev/block/platform/bootdevice/by-name/tranfs flags=display="Tranfs";
12+
/protect_f ext4 /dev/block/platform/bootdevice/by-name/protect1 flags=display="Protect_f";
13+
/protect_s ext4 /dev/block/platform/bootdevice/by-name/protect2 flags=display="Protect_s";
14+
/nvdata ext4 /dev/block/platform/bootdevice/by-name/nvdata flags=display="Nvdata";
15+
/nvcfg ext4 /dev/block/platform/bootdevice/by-name/nvcfg flags=display="Nvcfg";
16+
/persist ext4 /dev/block/platform/bootdevice/by-name/persist flags=display="Persist";
17+
/persist_image emmc /dev/block/platform/bootdevice/by-name/persist flags=display="Persist image";backup=1;flashimg=1;
18+
/externdevice* auto auto flags=display="Externdevice*";logical;
19+
/mt_usb* auto vfat flags=display="Mt_usb*";logical;
20+
/persistent emmc /dev/block/platform/bootdevice/by-name/frp flags=display="Persistent";
21+
/nvram emmc /dev/block/platform/bootdevice/by-name/nvram flags=display="Nvram";
22+
/proinfo emmc /dev/block/platform/bootdevice/by-name/proinfo flags=display="Proinfo";
23+
/bootloader emmc /dev/block/platform/bootdevice/by-name/lk flags=display="Bootloader";
24+
/bootloader2 emmc /dev/block/platform/bootdevice/by-name/lk2 flags=display="Bootloader2";
25+
/misc emmc /dev/block/platform/bootdevice/by-name/misc flags=display="Misc";backup=1;flashimg=1;
26+
/para emmc /dev/block/platform/bootdevice/by-name/para flags=display="Para";
27+
/recovery emmc /dev/block/platform/bootdevice/by-name/recovery flags=display="Recovery";backup=1;flashimg=1;
28+
/boot emmc /dev/block/platform/bootdevice/by-name/boot flags=display="Boot";backup=1;flashimg=1;
29+
/vbmeta_vendor emmc /dev/block/platform/bootdevice/by-name/vbmeta_vendor flags=display="Vbmeta_vendor";
30+
/vbmeta_system emmc /dev/block/platform/bootdevice/by-name/vbmeta_system flags=display="Vbmeta_system";
31+
/logo emmc /dev/block/platform/bootdevice/by-name/logo flags=display="Logo";
32+
/expdb emmc /dev/block/platform/bootdevice/by-name/expdb flags=display="Expdb";
33+
/seccfg emmc /dev/block/platform/bootdevice/by-name/seccfg flags=display="Seccfg";
34+
/tee1 emmc /dev/block/platform/bootdevice/by-name/tee1 flags=display="Tee1";
35+
/tee2 emmc /dev/block/platform/bootdevice/by-name/tee2 flags=display="Tee2";
36+
/scp1 emmc /dev/block/platform/bootdevice/by-name/scp1 flags=display="Scp1";
37+
/scp2 emmc /dev/block/platform/bootdevice/by-name/scp2 flags=display="Scp2";
38+
/sspm_1 emmc /dev/block/platform/bootdevice/by-name/sspm_1 flags=display="Sspm_1";
39+
/sspm_2 emmc /dev/block/platform/bootdevice/by-name/sspm_2 flags=display="Sspm_2";
40+
/md1img emmc /dev/block/platform/bootdevice/by-name/md1img flags=display="Md1img";
41+
/md1dsp emmc /dev/block/platform/bootdevice/by-name/md1dsp flags=display="Md1dsp";
42+
/gz1 emmc /dev/block/platform/bootdevice/by-name/gz1 flags=display="Gz1";
43+
/gz2 emmc /dev/block/platform/bootdevice/by-name/gz2 flags=display="Gz2";
44+
/spmfw emmc /dev/block/platform/bootdevice/by-name/spmfw flags=display="Spmfw";
45+
/boot_para emmc /dev/block/platform/bootdevice/by-name/boot_para flags=display="Boot_para";
46+
/dtbo emmc /dev/block/platform/bootdevice/by-name/dtbo flags=display="Dtbo";backup=1;flashimg=1;
47+
/otp emmc /dev/block/platform/bootdevice/by-name/otp flags=display="Otp";
48+
/vbmeta emmc /dev/block/platform/bootdevice/by-name/vbmeta flags=display="Vbmeta";
49+
/tkv emmc /dev/block/platform/bootdevice/by-name/tkv flags=display="Tkv";

recovery/root/init.recovery.mt6768.rc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
on init
2+
setprop sys.usb.configfs 1
3+
setprop sys.usb.ffs.aio_compat 1
4+
5+
on fs && property:ro.debuggable=0
6+
# distinguish USB shoulde connect or not, i.e. CDP vs SDP
7+
write /sys/class/udc/musb-hdrc/device/cmode 2
8+
# set charging free due to it wait for USB activation
9+
start adbd
10+
11+
on post-fs
12+
# Support A/B feature for EMMC and UFS boot region
13+
symlink /dev/block/sda /dev/block/mmcblk0boot0
14+
symlink /dev/block/sdb /dev/block/mmcblk0boot1
15+
symlink /dev/block/mmcblk0boot0 /dev/block/platform/bootdevice/by-name/preloader_a
16+
symlink /dev/block/mmcblk0boot1 /dev/block/platform/bootdevice/by-name/preloader_b

recovery/root/ueventd.rc

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
firmware_directories /etc/firmware/ /odm/firmware/ /vendor/firmware/ /firmware/image/
2+
uevent_socket_rcvbuf_size 16M
3+
4+
subsystem graphics
5+
devname uevent_devpath
6+
dirname /dev/graphics
7+
8+
subsystem drm
9+
devname uevent_devpath
10+
dirname /dev/dri
11+
12+
subsystem input
13+
devname uevent_devpath
14+
dirname /dev/input
15+
16+
subsystem sound
17+
devname uevent_devpath
18+
dirname /dev/snd
19+
20+
# ueventd can only set permissions on device nodes and their associated
21+
# sysfs attributes, not on arbitrary paths.
22+
#
23+
# format for /dev rules: devname mode uid gid
24+
# format for /sys rules: nodename attr mode uid gid
25+
# shortcut: "mtd@NN" expands to "/dev/mtd/mtdNN"
26+
27+
/dev/null 0666 root root
28+
/dev/zero 0666 root root
29+
/dev/full 0666 root root
30+
/dev/ptmx 0666 root root
31+
/dev/tty 0666 root root
32+
/dev/random 0666 root root
33+
/dev/urandom 0666 root root
34+
# Make HW RNG readable by group system to let EntropyMixer read it.
35+
/dev/hw_random 0440 root system
36+
/dev/ashmem 0666 root root
37+
/dev/binder 0666 root root
38+
/dev/hwbinder 0666 root root
39+
/dev/vndbinder 0666 root root
40+
41+
/dev/pmsg0 0222 root log
42+
43+
# kms driver for drm based gpu
44+
/dev/dri/* 0666 root graphics
45+
46+
# these should not be world writable
47+
/dev/uhid 0660 uhid uhid
48+
/dev/uinput 0660 uhid uhid
49+
/dev/rtc0 0640 system system
50+
/dev/tty0 0660 root system
51+
/dev/graphics/* 0660 root graphics
52+
/dev/input/* 0660 root input
53+
/dev/v4l-touch* 0660 root input
54+
/dev/snd/* 0660 system audio
55+
/dev/bus/usb/* 0660 root usb
56+
/dev/mtp_usb 0660 root mtp
57+
/dev/usb_accessory 0660 root usb
58+
/dev/tun 0660 system vpn
59+
60+
# CDMA radio interface MUX
61+
/dev/ppp 0660 radio vpn
62+
63+
# sysfs properties
64+
/sys/devices/platform/trusty.* trusty_version 0440 root log
65+
/sys/devices/virtual/input/input* enable 0660 root input
66+
/sys/devices/virtual/input/input* poll_delay 0660 root input
67+
/sys/devices/virtual/usb_composite/* enable 0664 root system
68+
/sys/devices/system/cpu/cpu* cpufreq/scaling_max_freq 0664 system system
69+
/sys/devices/system/cpu/cpu* cpufreq/scaling_min_freq 0664 system system
70+
71+
#SPD: add by yu.zhou2 for Bringup system monitor feature. @Start
72+
/dev/ensignal 0666 root root
73+
#SPD: add by yu.zhou2 for Bringup system monitor feature. @End

vendorsetup.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#
2+
# Copyright (C) 2020 The Android Open Source Project
3+
# Copyright (C) 2020 The TWRP Open Source Project
4+
# Copyright (C) 2020 SebaUbuntu's TWRP device tree generator
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
#
18+
19+
add_lunch_combo omni_Infinix-X682C-userdebug
20+
add_lunch_combo omni_Infinix-X682C-eng

0 commit comments

Comments
 (0)