b485b59ef7160024ae220f6e2a237777595eb32c
[GitHub/moto-9609/twrp_device_motorola_troika.git] / BoardConfig.mk
1 #
2 # Copyright 2017 The Android Open Source 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
17 # This contains the module build definitions for the hardware-specific
18 # components for this device.
19 #
20 # As much as possible, those components should be built unconditionally,
21 # with device-specific names to avoid collisions, to avoid device-specific
22 # bitrot and build breakages. Building a component unconditionally does
23 # *not* include it on all devices, so it is safe even with hardware-specific
24 # components.
25
26 # Architecture
27 TARGET_ARCH := arm64
28 TARGET_ARCH_VARIANT := armv8-a
29 TARGET_CPU_ABI := arm64-v8a
30 TARGET_CPU_ABI2 :=
31 TARGET_CPU_VARIANT := kryo
32
33 TARGET_2ND_ARCH := arm
34 TARGET_2ND_ARCH_VARIANT := armv7-a-neon
35 TARGET_2ND_CPU_ABI := armeabi-v7a
36 TARGET_2ND_CPU_ABI2 := armeabi
37 TARGET_2ND_CPU_VARIANT := cortex-a53
38
39 ENABLE_CPUSETS := true
40 ENABLE_SCHEDBOOST := true
41
42 # Bootloader
43 TARGET_BOOTLOADER_BOARD_NAME := sdm845
44 TARGET_NO_BOOTLOADER := true
45 TARGET_USES_UEFI := true
46
47 # Kernel
48 BOARD_KERNEL_CMDLINE := androidboot.hardware=qcom androidboot.console=ttyMSM0 video=vfb:640x400,bpp=32,memsize=3072000 msm_rtb.filter=0x237 ehci-hcd.park=3 lpm_levels.sleep_disabled=1 service_locator.enable=1 swiotlb=2048 androidboot.configfs=true androidboot.usbcontroller=a600000.dwc3 firmware_class.path=/vendor/firmware_mnt/image loop.max_part=7
49 BOARD_KERNEL_CMDLINE += skip_override androidboot.fastboot=1
50 BOARD_KERNEL_BASE := 0x00000000
51 BOARD_KERNEL_PAGESIZE := 4096
52 TARGET_PREBUILT_KERNEL := device/oneplus/fajita/prebuilt/Image.gz-dtb
53
54 # Platform
55 TARGET_BOARD_PLATFORM := sdm845
56 TARGET_BOARD_PLATFORM_GPU := qcom-adreno630
57
58 # Partitions
59 BOARD_FLASH_BLOCK_SIZE := 262144
60
61 BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
62 BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
63 BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2998927360
64 BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0
65 BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := 4096
66 BOARD_USERDATAIMAGE_PARTITION_SIZE := 118112366592
67 BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := f2fs
68 BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824
69 TARGET_USERIMAGES_USE_EXT4 := true
70 TARGET_USERIMAGES_USE_F2FS := true
71
72 TARGET_NO_KERNEL := false
73 TARGET_NO_RECOVERY := false
74 BOARD_USES_RECOVERY_AS_BOOT := true
75 BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
76
77 # Partitions (listed in the file) to be wiped under recovery.
78 TARGET_RECOVERY_WIPE := device/oneplus/fajita/recovery.wipe
79 TARGET_RECOVERY_FSTAB := device/oneplus/fajita/fstab.hardware
80
81 # Workaround for error copying vendor files to recovery ramdisk
82 BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
83 TARGET_COPY_OUT_VENDOR := vendor
84
85 # Recovery
86 BOARD_HAS_LARGE_FILESYSTEM := true
87 BOARD_HAS_NO_SELECT_BUTTON := true
88
89 # TWRP specific build flags
90 BOARD_HAS_NO_REAL_SDCARD := true
91 RECOVERY_SDCARD_ON_DATA := true
92 TARGET_RECOVERY_QCOM_RTC_FIX := true
93 TW_BRIGHTNESS_PATH := "/sys/class/backlight/panel0-backlight/brightness"
94 TW_EXCLUDE_DEFAULT_USB_INIT := true
95 TW_EXCLUDE_SUPERSU := true
96 TW_EXTRA_LANGUAGES := true
97 TW_INCLUDE_NTFS_3G := true
98 AB_OTA_UPDATER := true
99 BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
100 TW_INPUT_BLACKLIST := "hbtp_vm"
101 TW_MAX_BRIGHTNESS := 1023
102 TW_DEFAULT_BRIGHTNESS := 420
103 # set portrait_hdpi_notch to use the notch theme (and finally see the clock)
104 TW_THEME := portrait_hdpi_notch
105 TARGET_RECOVERY_DEVICE_MODULES += android.hardware.boot@1.0
106 #TW_RECOVERY_ADDITIONAL_RELINK_FILES := ${OUT}/system/lib64/android.hardware.boot@1.0.so
107 TARGET_USE_CUSTOM_LUN_FILE_PATH := "/config/usb_gadget/g1/functions/mass_storage.0/lun.%d/file"
108 TARGET_RECOVERY_PIXEL_FORMAT := BGRA_8888
109 TW_NO_SCREEN_BLANK := true
110 TW_USE_TOOLBOX := true
111 TW_NO_LEGACY_PROPS := true
112
113 # Use mke2fs to create ext4 images
114 TARGET_USES_MKE2FS := true
115
116 # A/B updater updatable partitions list. Keep in sync with the partition list
117 # with "_a" and "_b" variants in the device. Note that the vendor can add more
118 # more partitions to this list for the bootloader and radio.
119 AB_OTA_PARTITIONS += \
120 boot \
121 system \
122 vendor \
123 vbmeta \
124 dtbo
125
126 # Encryption
127 PLATFORM_SECURITY_PATCH := 2025-12-31
128 TW_INCLUDE_CRYPTO := true
129 TW_INCLUDE_CRYPTO_FBE := true
130
131 # Extras
132 BOARD_SUPPRESS_SECURE_ERASE := true
133 TW_USE_LEDS_HAPTICS := true
134 TW_EXCLUDE_TWRPAPP := true
135 USE_RECOVERY_INSTALLER := true
136 RECOVERY_INSTALLER_PATH := device/oneplus/fajita/installer