blob: efc3cbba3a2bbd88b4a6c14eb4c84feded5ae591 [file] [log] [blame]
David Ng716698c2018-03-23 12:30:23 -07001# config.mk
2#
3# Product-specific compile-time definitions.
4#
5
David Ng716698c2018-03-23 12:30:23 -07006TARGET_ARCH := arm64
Vinay Verma50afdee2021-02-01 10:47:51 +05307TARGET_ARCH_VARIANT := armv8-a-branchprot
David Ng716698c2018-03-23 12:30:23 -07008TARGET_CPU_ABI := arm64-v8a
9TARGET_CPU_ABI2 :=
Smita Ghoshaaafcc72018-11-30 16:12:53 -080010TARGET_CPU_VARIANT := generic
David Ng716698c2018-03-23 12:30:23 -070011
12TARGET_2ND_ARCH := arm
ysr7bdf0d42021-12-01 23:17:55 -080013TARGET_2ND_ARCH_VARIANT := armv8-2a
David Ng716698c2018-03-23 12:30:23 -070014TARGET_2ND_CPU_ABI := armeabi-v7a
15TARGET_2ND_CPU_ABI2 := armeabi
16TARGET_2ND_CPU_VARIANT := cortex-a9
17
Smita Ghoshaaafcc72018-11-30 16:12:53 -080018TARGET_HW_DISK_ENCRYPTION := true
19TARGET_HW_DISK_ENCRYPTION_PERF := true
David Ng716698c2018-03-23 12:30:23 -070020
Smita Ghoshaaafcc72018-11-30 16:12:53 -080021BOARD_SECCOMP_POLICY := device/qcom/$(TARGET_BOARD_PLATFORM)/seccomp
David Ng716698c2018-03-23 12:30:23 -070022
P.Adarsh Reddybe6c09d2020-06-26 18:28:45 +053023BOARD_SYSTEMSDK_VERSIONS:= $(SHIPPING_API_LEVEL)
Vinay Verma55d0bf62019-07-04 20:11:08 +053024
padarshr42919bc2019-04-19 16:02:39 +053025TARGET_NO_BOOTLOADER := true
David Ng716698c2018-03-23 12:30:23 -070026TARGET_USES_UEFI := true
Mulugeta Engdaw9938f132020-02-10 15:25:07 -080027TARGET_NO_KERNEL := true
David Ng716698c2018-03-23 12:30:23 -070028
Vinayak Soniaa944cc2019-03-26 18:59:17 -070029# Disable DLKMs compilation for lunch qssi builds.
30TARGET_KERNEL_DLKM_DISABLE := true
31
Vinayak Soni3e453c72018-12-10 00:35:58 -080032-include $(QCPATH)/common/msmnile/BoardConfigVendor.mk
33
David Ng716698c2018-03-23 12:30:23 -070034USE_OPENGL_RENDERER := true
35BOARD_USE_LEGACY_UI := true
36
padarshr0f476a12019-01-14 19:44:35 +053037ifeq ($(ENABLE_AB), true)
David Ng716698c2018-03-23 12:30:23 -070038# Defines for enabling A/B builds
39AB_OTA_UPDATER := true
40# Full A/B partition update set
41# AB_OTA_PARTITIONS := xbl rpm tz hyp pmic modem abl boot keymaster cmnlib cmnlib64 system bluetooth
42
43# Minimum partition set for automation to test recovery generation code
44# Packages generated by using just the below flag cannot be used for updating a device. You must pass
45# in the full set mentioned above as part of your make commandline
David Ng716698c2018-03-23 12:30:23 -070046TARGET_NO_RECOVERY := true
padarshr0f476a12019-01-14 19:44:35 +053047else
48TARGET_NO_RECOVERY := true
49# Enable System As Root even for non-A/B
padarshr0f476a12019-01-14 19:44:35 +053050# Add the below cache settings for /cache mountpoint, although we don't need the resultant cache image
51# from within Qssi.
52BOARD_CACHEIMAGE_PARTITION_SIZE := 268435456
53BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
David Ng716698c2018-03-23 12:30:23 -070054endif
55
Vinayak Soni48a17b22019-04-23 21:10:25 -070056# Define BOARD_USES_METADATA_PARTITION to create metadata mount point in system image
padarshr4f4c7e02019-04-17 20:08:33 +053057BOARD_USES_METADATA_PARTITION := true
padarshr4f4c7e02019-04-17 20:08:33 +053058
David Ng716698c2018-03-23 12:30:23 -070059#Enable split vendor image
60ENABLE_VENDOR_IMAGE := true
David Ng716698c2018-03-23 12:30:23 -070061BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4
62TARGET_COPY_OUT_VENDOR := vendor
63BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true
padarshr563490e2019-01-14 19:51:22 +053064
David Ng716698c2018-03-23 12:30:23 -070065TARGET_USERIMAGES_USE_EXT4 := true
Smita Ghoshaaafcc72018-11-30 16:12:53 -080066BOARD_BOOTIMAGE_PARTITION_SIZE := 0x06000000
David Ng716698c2018-03-23 12:30:23 -070067BOARD_FLASH_BLOCK_SIZE := 131072 # (BOARD_KERNEL_PAGESIZE * 64)
68
David Ng716698c2018-03-23 12:30:23 -070069MAX_EGL_CACHE_KEY_SIZE := 12*1024
70MAX_EGL_CACHE_SIZE := 2048*1024
71
David Ng716698c2018-03-23 12:30:23 -070072BOARD_USES_GENERIC_AUDIO := true
73BOARD_QTI_CAMERA_32BIT_ONLY := true
74TARGET_NO_RPC := true
75
76TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/
77TARGET_INIT_VENDOR_LIB := libinit_msm
78
Prakruthi Deepak Heragu47fdff52019-06-13 14:58:28 -070079#Disable appended dtb.
80TARGET_KERNEL_APPEND_DTB := false
David Ng716698c2018-03-23 12:30:23 -070081
Prakruthi Deepak Heragu47fdff52019-06-13 14:58:28 -070082#Enable dtb in boot image and boot image header version 2 support.
Prakruthi Deepak Heragu47fdff52019-06-13 14:58:28 -070083BOARD_BOOTIMG_HEADER_VERSION := 2
84BOARD_MKBOOTIMG_ARGS := --header_version $(BOARD_BOOTIMG_HEADER_VERSION)
85
David Ng716698c2018-03-23 12:30:23 -070086#Enable PD locater/notifier
87TARGET_PD_SERVICE_ENABLED := true
88
89#Enable peripheral manager
90TARGET_PER_MGR_ENABLED := true
91
92# Enable dex pre-opt to speed up initial boot
93ifeq ($(HOST_OS),linux)
94 ifeq ($(WITH_DEXPREOPT),)
95 WITH_DEXPREOPT := true
96 WITH_DEXPREOPT_PIC := true
97 ifneq ($(TARGET_BUILD_VARIANT),user)
98 # Retain classes.dex in APK's for non-user builds
99 DEX_PREOPT_DEFAULT := nostripping
100 endif
101 endif
102endif
103
David Ng716698c2018-03-23 12:30:23 -0700104# Enable sensor multi HAL
105USE_SENSOR_MULTI_HAL := true
106
David Ng716698c2018-03-23 12:30:23 -0700107#Enable INTERACTION_BOOST
108TARGET_USES_INTERACTION_BOOST := true
109
David Ng716698c2018-03-23 12:30:23 -0700110#Enable DRM plugins 64 bit compilation
111TARGET_ENABLE_MEDIADRM_64 := true
112
Smita Ghoshaaafcc72018-11-30 16:12:53 -0800113ifeq ($(ENABLE_VENDOR_IMAGE), false)
Jignesh Mehta7b8b0142021-02-02 01:13:55 -0800114 $(error "Vendor Image is mandatory !!")
Smita Ghoshaaafcc72018-11-30 16:12:53 -0800115endif
116
Smita Ghoshaaafcc72018-11-30 16:12:53 -0800117BUILD_BROKEN_DUP_RULES := true
118
Divya Sharmadaa9a362020-01-15 13:02:43 -0800119# KEYSTONE(I1056bb73cc2f8796ed941b5dd7b333ef15c60891,b/147756744)
Paresh Purabhiya58783d42020-02-04 20:48:24 +0530120BUILD_BROKEN_NINJA_USES_ENV_VARS := SDCLANG_AE_CONFIG SDCLANG_CONFIG SDCLANG_CONFIG_AOSP SDCLANG_SA_ENABLED
Divya Sharmadaa9a362020-01-15 13:02:43 -0800121BUILD_BROKEN_NINJA_USES_ENV_VARS += TEMPORARY_DISABLE_PATH_RESTRICTIONS
P.Adarsh Reddy1491cd62020-03-09 12:16:37 +0530122BUILD_BROKEN_USES_BUILD_HOST_SHARED_LIBRARY := true
123BUILD_BROKEN_USES_BUILD_HOST_EXECUTABLE := true
124BUILD_BROKEN_USES_BUILD_COPY_HEADERS := true
125BUILD_BROKEN_USES_BUILD_HOST_STATIC_LIBRARY := true
Divya Sharmadaa9a362020-01-15 13:02:43 -0800126
Smita Ghoshaaafcc72018-11-30 16:12:53 -0800127#Enable VNDK Compliance
128BOARD_VNDK_VERSION:=current
vivek mehta13711022021-05-20 23:08:36 -0700129RECOVERY_SNAPSHOT_VERSION := current
130RAMDISK_SNAPSHOT_VERSION := current
Smita Ghoshaaafcc72018-11-30 16:12:53 -0800131Q_BU_DISABLE_MODULE := true
132
Vinay Vermaca210fb2019-04-11 20:59:07 +0530133###### Dynamic Partition Handling ####
134ifneq ($(strip $(BOARD_DYNAMIC_PARTITION_ENABLE)),true)
135BOARD_BUILD_SYSTEM_ROOT_IMAGE := true
136BOARD_VENDORIMAGE_PARTITION_SIZE := 1073741824
137BOARD_SYSTEMIMAGE_PARTITION_SIZE := 3221225472
Mulugeta Engdaw0a6d9202019-05-29 12:11:40 -0700138BOARD_PRODUCTIMAGE_PARTITION_SIZE := 838860800
139ifeq ($(ENABLE_AB), true)
140AB_OTA_PARTITIONS ?= system
141endif
Vinay Vermaca210fb2019-04-11 20:59:07 +0530142else
Mulugeta Engdaw0a6d9202019-05-29 12:11:40 -0700143TARGET_COPY_OUT_PRODUCT := product
Mohamed Moussa48117032020-04-15 03:00:38 -0700144TARGET_COPY_OUT_SYSTEM_EXT := system_ext
Mulugeta Engdaw0a6d9202019-05-29 12:11:40 -0700145BOARD_USES_PRODUCTIMAGE := true
146BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE := ext4
Mohamed Moussa48117032020-04-15 03:00:38 -0700147BOARD_SYSTEM_EXTIMAGE_FILE_SYSTEM_TYPE := ext4
Vinay Vermaca210fb2019-04-11 20:59:07 +0530148BOARD_BUILD_SYSTEM_ROOT_IMAGE := false
Divya Sharma415749b2019-09-10 14:51:09 -0700149BOARD_SUPER_PARTITION_SIZE := 12884901888
Vinay Vermaca210fb2019-04-11 20:59:07 +0530150BOARD_SUPER_PARTITION_GROUPS := qti_dynamic_partitions
Mohamed Moussa48117032020-04-15 03:00:38 -0700151BOARD_QTI_DYNAMIC_PARTITIONS_PARTITION_LIST := system system_ext product
Divya Sharma415749b2019-09-10 14:51:09 -0700152BOARD_QTI_DYNAMIC_PARTITIONS_SIZE := 6438256640
padarshr9712f012019-07-01 19:48:07 +0530153BOARD_EXT4_SHARE_DUP_BLOCKS := true
Mulugeta Engdaw0a6d9202019-05-29 12:11:40 -0700154ifeq ($(ENABLE_AB), true)
Mohamed Moussa48117032020-04-15 03:00:38 -0700155AB_OTA_PARTITIONS ?= system system_ext product vbmeta_system
Vinay Vermaca210fb2019-04-11 20:59:07 +0530156endif
Mohamed Moussa48117032020-04-15 03:00:38 -0700157endif
Vinay Vermaca210fb2019-04-11 20:59:07 +0530158###### Dynamic Partition Handling ####
padarshr1ebabf02018-12-14 19:20:10 +0530159
Roopesh Nataraja7bce0ee2021-08-03 16:58:43 -0700160# Use sha256 for dm-verity partitions
161BOARD_AVB_SYSTEM_ADD_HASHTREE_FOOTER_ARGS += --hash_algorithm sha256
162BOARD_AVB_SYSTEM_EXT_ADD_HASHTREE_FOOTER_ARGS += --hash_algorithm sha256
163BOARD_AVB_PRODUCT_ADD_HASHTREE_FOOTER_ARGS += --hash_algorithm sha256
164
vivek mehta13711022021-05-20 23:08:36 -0700165DIRECTED_VENDOR_SNAPSHOT := true
166DIRECTED_RECOVERY_SNAPSHOT := true
167DIRECTED_RAMDISK_SNAPSHOT := true
P.Adarsh Reddy36f458b2021-07-13 16:27:05 +0530168-include vendor/qcom/configs/snapshot_modules/*/*.mk
vivek mehta13711022021-05-20 23:08:36 -0700169
padarshr1ebabf02018-12-14 19:20:10 +0530170#################################################################################
171# This is the End of BoardConfig.mk file.
172# Now, Pickup other split Board.mk files:
173#################################################################################
174-include vendor/qcom/defs/board-defs/system/*.mk
175#################################################################################
Suresh Reddy Yellala2fbf5322019-08-28 12:19:56 -0700176include device/qcom/sepolicy/SEPolicy.mk