fix adb
[GitHub/moto-9609/twrp_device_motorola_troika.git] / BoardConfig.mk
CommitLineData
d52e70d1
SJ
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
64fd4135 26ALLOW_MISSING_DEPENDENCIES=true
27
d52e70d1
SJ
28# Architecture
29TARGET_ARCH := arm64
467c5ea6 30TARGET_ARCH_VARIANT := armv8-a
d52e70d1
SJ
31TARGET_CPU_ABI := arm64-v8a
32TARGET_CPU_ABI2 :=
467c5ea6 33TARGET_CPU_VARIANT := cortex-a73
c5ff77ee 34
d52e70d1 35TARGET_2ND_ARCH := arm
41b3d004 36TARGET_2ND_ARCH_VARIANT := armv8-a
d52e70d1
SJ
37TARGET_2ND_CPU_ABI := armeabi-v7a
38TARGET_2ND_CPU_ABI2 := armeabi
467c5ea6 39TARGET_2ND_CPU_VARIANT := cortex-a53
d52e70d1
SJ
40
41ENABLE_CPUSETS := true
42ENABLE_SCHEDBOOST := true
43
44# Bootloader
467c5ea6 45TARGET_BOOTLOADER_BOARD_NAME := exynos5
64fd4135 46TARGET_NO_BOOTLOADER := false
d52e70d1
SJ
47TARGET_USES_UEFI := true
48
d52e70d1 49# Kernel
9b18614d 50BOARD_KERNEL_CMDLINE := loop.max_part=7 androidboot.selinux=permissive
64fd4135 51BOARD_KERNEL_BASE := 0x10000000
52BOARD_KERNEL_OFFSET := 0x00008000
53BOARD_RAMDISK_OFFSET := 0x00000000
54BOARD_TAGS_OFFSET := 0x00000000
55BOARD_SECOND_OFFSET := 0x00000000
56BOARD_KERNEL_PAGESIZE := 2048
2125174d 57TARGET_PREBUILT_KERNEL := device/motorola/troika/prebuilt/Image
64fd4135 58INSTALLED_2NDBOOTLOADER_TARGET := device/motorola/troika/prebuilt/second.img
59BOARD_BOOTIMG_HEADER_VERSION := 1
60BOARD_HEADER_SIZE := 1648
61
62BOARD_MKBOOTIMG_ARGS := --base $(BOARD_KERNEL_BASE) --pagesize $(BOARD_KERNEL_PAGESIZE) --kernel_offset $(BOARD_KERNEL_OFFSET) --ramdisk_offset $(BOARD_RAMDISK_OFFSET) --second_offset $(BOARD_SECOND_OFFSET) --tags_offset $(BOARD_TAGS_OFFSET) --header_version $(BOARD_BOOTIMG_HEADER_VERSION) --second $(INSTALLED_2NDBOOTLOADER_TARGET)
d52e70d1 63
c5ff77ee 64# Platform
467c5ea6 65TARGET_BOARD_PLATFORM := exynos5
66TARGET_BOARD_PLATFORM_GPU := mali-g72
c5ff77ee 67
89ba5902 68PRODUCT_SOONG_NAMESPACES += device/motorola/troika
69TARGET_RECOVERY_DEVICE_MODULES += android.hardware.boot@1.0-impl.exynos
70
d52e70d1 71# Partitions
80d272c6 72BOARD_FLASH_BLOCK_SIZE := 262144
caf65763 73
467c5ea6 74BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
75BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
76BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472
6178f87f 77BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0
78BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := 4096
467c5ea6 79BOARD_USERDATAIMAGE_PARTITION_SIZE := 118974455808
17c91b8c 80BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4
467c5ea6 81BOARD_VENDORIMAGE_PARTITION_SIZE := 805306368
caf65763
SS
82TARGET_USERIMAGES_USE_EXT4 := true
83TARGET_USERIMAGES_USE_F2FS := true
c5ff77ee 84
af762776 85TARGET_NO_KERNEL := false
86TARGET_NO_RECOVERY := false
87BOARD_USES_RECOVERY_AS_BOOT := true
88BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
89
6969ac25 90# Partitions (listed in the file) to be wiped under recovery.
467c5ea6 91TARGET_RECOVERY_WIPE := device/motorola/troika/recovery.wipe
92TARGET_RECOVERY_FSTAB := device/motorola/troika/recovery.fstab
6969ac25 93
41b3d004 94
c5ff77ee 95# Workaround for error copying vendor files to recovery ramdisk
caf65763
SS
96BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
97TARGET_COPY_OUT_VENDOR := vendor
78cb5f12 98
e93a0c47 99#Init
467c5ea6 100TARGET_INIT_VENDOR_LIB := libinit_troika
101TARGET_RECOVERY_DEVICE_MODULES := libinit_troika
e93a0c47 102TARGET_PLATFORM_DEVICE_BASE := /devices/soc/
103
d52e70d1
SJ
104# Recovery
105BOARD_HAS_LARGE_FILESYSTEM := true
c5ff77ee 106BOARD_HAS_NO_SELECT_BUTTON := true
c99dbeb1 107
d52e70d1 108# TWRP specific build flags
16c951e1 109BOARD_HAS_NO_REAL_SDCARD := true
d8bcc3d9 110RECOVERY_SDCARD_ON_DATA := true
507ac078 111TW_BRIGHTNESS_PATH := "/sys/devices/platform/148e0000.dsim/brightness"
caf65763
SS
112TW_EXCLUDE_DEFAULT_USB_INIT := true
113TW_EXCLUDE_SUPERSU := true
114TW_EXTRA_LANGUAGES := true
bd2a0a16 115TW_INCLUDE_NTFS_3G := true
db1518aa 116AB_OTA_UPDATER := true
507ac078
JA
117TW_MAX_BRIGHTNESS := 255
118TW_DEFAULT_BRIGHTNESS := 163
3bc4b259 119TW_THEME := portrait_hdpi
1e0e6fa6 120TW_NO_HAPTICS := true
8dde1ce7 121TARGET_RECOVERY_DEVICE_MODULES += android.hardware.boot@1.0
296e07b7 122TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888
c5c70837 123TW_USE_TOOLBOX := true
db1518aa 124
1bce1ff4 125# Use mke2fs to create ext4 images
126TARGET_USES_MKE2FS := true
127
6969ac25 128# A/B updater updatable partitions list. Keep in sync with the partition list
129# with "_a" and "_b" variants in the device. Note that the vendor can add more
130# more partitions to this list for the bootloader and radio.
131AB_OTA_PARTITIONS += \
132 boot \
133 system \
134 vendor \
135 vbmeta \
136 dtbo
137
80d272c6 138# Extras
139BOARD_SUPPRESS_SECURE_ERASE := true
467c5ea6 140#TW_USE_LEDS_HAPTICS := true
42e2e80d 141USE_RECOVERY_INSTALLER := true
467c5ea6 142RECOVERY_INSTALLER_PATH := device/motorola/troika/installer
41b3d004 143TW_EXCLUDE_TWRPAPP := true
3bc4b259 144TW_INCLUDE_REPACKTOOLS := true
ee44b684 145TWRP_INCLUDE_LOGCAT := true
146TARGET_USES_LOGD := true
467c5ea6 147#TW_NO_USB_STORAGE := true