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