fix bootdevice symlink
[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 ALLOW_MISSING_DEPENDENCIES=true
27
28 # Architecture
29 TARGET_ARCH := arm64
30 TARGET_ARCH_VARIANT := armv8-a
31 TARGET_CPU_ABI := arm64-v8a
32 TARGET_CPU_ABI2 :=
33 TARGET_CPU_VARIANT := cortex-a73
34
35 TARGET_2ND_ARCH := arm
36 TARGET_2ND_ARCH_VARIANT := armv8-a
37 TARGET_2ND_CPU_ABI := armeabi-v7a
38 TARGET_2ND_CPU_ABI2 := armeabi
39 TARGET_2ND_CPU_VARIANT := cortex-a53
40
41 ENABLE_CPUSETS := true
42 ENABLE_SCHEDBOOST := true
43
44 # Bootloader
45 TARGET_BOOTLOADER_BOARD_NAME := exynos5
46 TARGET_NO_BOOTLOADER := false
47 TARGET_USES_UEFI := true
48
49 # Kernel
50 BOARD_KERNEL_CMDLINE := loop.max_part=7 androidboot.selinux=permissive
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
57 TARGET_PREBUILT_KERNEL := device/motorola/troika/prebuilt/Image
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)
63
64 # Platform
65 TARGET_BOARD_PLATFORM := exynos5
66 TARGET_BOARD_PLATFORM_GPU := mali-g72
67
68 PRODUCT_SOONG_NAMESPACES += device/motorola/troika
69 TARGET_RECOVERY_DEVICE_MODULES += android.hardware.boot@1.0-impl.exynos
70
71 # Partitions
72 BOARD_FLASH_BLOCK_SIZE := 262144
73
74 BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864
75 BOARD_RECOVERYIMAGE_PARTITION_SIZE := 67108864
76 BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472
77 BOARD_SYSTEMIMAGE_JOURNAL_SIZE := 0
78 BOARD_SYSTEMIMAGE_EXTFS_INODE_COUNT := 4096
79 BOARD_USERDATAIMAGE_PARTITION_SIZE := 118974455808
80 BOARD_USERDATAIMAGE_FILE_SYSTEM_TYPE := ext4
81 BOARD_VENDORIMAGE_PARTITION_SIZE := 805306368
82 TARGET_USERIMAGES_USE_EXT4 := true
83 TARGET_USERIMAGES_USE_F2FS := true
84
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
90 # Partitions (listed in the file) to be wiped under recovery.
91 TARGET_RECOVERY_WIPE := device/motorola/troika/recovery.wipe
92 TARGET_RECOVERY_FSTAB := device/motorola/troika/recovery.fstab
93
94
95 # Workaround for error copying vendor files to recovery ramdisk
96 BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
97 TARGET_COPY_OUT_VENDOR := vendor
98
99 #Init
100 TARGET_INIT_VENDOR_LIB := libinit_troika
101 TARGET_RECOVERY_DEVICE_MODULES := libinit_troika
102 TARGET_PLATFORM_DEVICE_BASE := /devices/soc/
103
104 # Recovery
105 BOARD_HAS_LARGE_FILESYSTEM := true
106 BOARD_HAS_NO_SELECT_BUTTON := true
107
108 # TWRP specific build flags
109 BOARD_HAS_NO_REAL_SDCARD := true
110 RECOVERY_SDCARD_ON_DATA := true
111 TW_BRIGHTNESS_PATH := "/sys/devices/platform/148e0000.dsim/brightness"
112 TW_EXCLUDE_DEFAULT_USB_INIT := true
113 TW_EXCLUDE_SUPERSU := true
114 TW_EXTRA_LANGUAGES := true
115 TW_INCLUDE_NTFS_3G := true
116 AB_OTA_UPDATER := true
117 TW_MAX_BRIGHTNESS := 255
118 TW_DEFAULT_BRIGHTNESS := 163
119 TW_THEME := portrait_hdpi
120 TW_NO_HAPTICS := true
121 TARGET_RECOVERY_DEVICE_MODULES += android.hardware.boot@1.0
122 TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888
123 TW_USE_TOOLBOX := true
124
125 # Use mke2fs to create ext4 images
126 TARGET_USES_MKE2FS := true
127
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
138 # Extras
139 BOARD_SUPPRESS_SECURE_ERASE := true
140 #TW_USE_LEDS_HAPTICS := true
141 USE_RECOVERY_INSTALLER := true
142 RECOVERY_INSTALLER_PATH := device/motorola/troika/installer
143 TW_EXCLUDE_TWRPAPP := true
144 TW_INCLUDE_REPACKTOOLS := true
145 TWRP_INCLUDE_LOGCAT := true
146 TARGET_USES_LOGD := true
147 #TW_NO_USB_STORAGE := true