blob: 88b438b14bd95e84232dbd341f6a9e89a19ce641 [file] [log] [blame]
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -04001FORCE_32_BIT := true
2
3-include vendor/samsung/gprimeltecan/BoardConfigVendor.mk
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -04004
5LOCAL_PATH := device/samsung/gprimeltecan
6
7# Inherit from common
8-include device/samsung/qcom-common/BoardConfigCommon.mk
9
10TARGET_SPECIFIC_HEADER_PATH := $(LOCAL_PATH)/include
11
12# ANT+
13BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease"
14
15# Platform
16TARGET_ARCH := arm
Zvikomborero VIncent Zvikarambaa4ae2bf2016-07-25 00:41:06 -040017TARGET_BOARD_PLATFORM := msm8916
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040018TARGET_CPU_ABI := armeabi-v7a
19TARGET_CPU_ABI2 := armeabi
20TARGET_ARCH_VARIANT := armv7-a-neon
Zvikomborero VIncent Zvikarambaa4ae2bf2016-07-25 00:41:06 -040021TARGET_BOARD_PLATFORM_GPU := qcom-adreno306
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040022#ARCH_ARM_HAVE_TLS_REGISTER := true
23
24# Architecture
25TARGET_CPU_SMP := true
26TARGET_CPU_VARIANT := cortex-a53
27TARGET_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp
28TARGET_GLOBAL_CPPFLAGS += -mfpu=neon -mfloat-abi=softfp
29
30# Audio
31AUDIO_FEATURE_LOW_LATENCY_PRIMARY := true
32BOARD_USES_ALSA_AUDIO := true
33
34# Asserts
Zvikomborero VIncent Zvikarambaeb9334e2016-08-19 11:13:11 -040035TARGET_OTA_ASSERT_DEVICE := gprimeltecan,gprimeltevl,samsung_sm_g530w,g530w
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040036
37# Bluetooth
38BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_PATH)/bluetooth
39BOARD_HAVE_BLUETOOTH := true
40BOARD_HAVE_BLUETOOTH_QCOM := true
41BLUETOOTH_HCI_USE_MCT := true
42
Zvikomborero VIncent Zvikarambaa4ae2bf2016-07-25 00:41:06 -040043# Custom RIL class
Zvikomborero VIncent Zvikaramba46818ce2016-07-25 19:59:57 -040044BOARD_RIL_CLASS := ../../../device/samsung/gprimeltecan/ril
Zvikomborero VIncent Zvikarambaa4ae2bf2016-07-25 00:41:06 -040045PROTOBUF_SUPPORTED := true
46
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040047# Bootloader
48TARGET_BOOTLOADER_BOARD_NAME := MSM8916
49
50# Camera
51TARGET_USE_VENDOR_CAMERA_EXT := true
Zvikomborero VIncent Zvikaramba323d3162016-07-25 03:15:09 -040052TARGET_PROVIDES_CAMERA_HAL := true
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040053USE_DEVICE_SPECIFIC_CAMERA := true
54
55# Charger
Zvikomborero VIncent Zvikarambaa6955802016-08-18 13:51:49 -040056BOARD_CHARGER_ENABLE_SUSPEND := true
Zvikomborero VIncent Zvikaramba081e3a02016-07-26 06:07:53 -040057BOARD_CHARGER_SHOW_PERCENTAGE := true
Zvikomborero VIncent Zvikarambaa6955802016-08-18 13:51:49 -040058BOARD_CHARGING_MODE_BOOTING_LPM := /sys/class/power_supply/battery/batt_lp_charging
59
60# Enable QCOM FM feature
Zvikomborero VIncent Zvikarambabb189a92016-08-18 21:18:15 -040061AUDIO_FEATURE_ENABLED_FM := true
62BOARD_HAVE_QCOM_FM := true
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040063
Zvikomborero VIncent Zvikaramba50c5cb32016-07-23 01:50:09 -040064#sec_s3fwrn5 <- NFC HAL
65
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040066# CMHW
Zvikomborero VIncent Zvikaramba74ee0902016-08-31 17:31:24 -040067BOARD_USES_CYANOGEN_HARDWARE := true
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040068BOARD_HARDWARE_CLASS += $(LOCAL_PATH)/cmhw
69
70# Crypto
71TARGET_HW_DISK_ENCRYPTION := true
72
73# default.prop
74ADDITIONAL_DEFAULT_PROPERTIES += \
75 camera2.portability.force_api=1
76
77# Display
78MAX_EGL_CACHE_KEY_SIZE := 12*1024
79MAX_EGL_CACHE_SIZE := 2048*1024
80NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
Zvikomborero Vincent Zvikaramba94239f92016-07-28 03:48:03 -040081OVERRIDE_RS_DRIVER := libRSDriver.so
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040082TARGET_CONTINUOUS_SPLASH_ENABLED := true
83TARGET_HAVE_NEW_GRALLOC := true
84
85# Encryption
86TARGET_SWV8_DISK_ENCRYPTION := true
87
88# FM
89AUDIO_FEATURE_ENABLED_FM := true
90TARGET_QCOM_NO_FM_FIRMWARE := true
91
92# Fonts
93EXTENDED_FONT_FOOTPRINT := true
94
95# GPS
Vincent Zvikarambafe30ac62016-07-27 12:08:03 -040096#TARGET_GPS_HAL_PATH := $(LOCAL_PATH)/gps
97#TARGET_NO_RPC := true
Zvikomborero VIncent Zvikaramba46818ce2016-07-25 19:59:57 -040098
Zvikomborero VIncent Zvikarambad9b888a2016-08-18 13:51:47 -040099# Healthd
100BOARD_HAL_STATIC_LIBRARIES := libhealthd.qcom
101
Zvikomborero VIncent Zvikarambac313e052016-08-10 12:57:35 -0400102#ART
Zvikomborero VIncent Zvikarambacd0cc552016-08-10 16:18:52 -0400103#WITH_DEXPREOPT := true
Zvikomborero VIncent Zvikarambac313e052016-08-10 12:57:35 -0400104
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400105# Init
106TARGET_INIT_VENDOR_LIB := libinit_msm
107TARGET_LIBINIT_DEFINES_FILE := $(LOCAL_PATH)/init/init_gprimeltecan.cpp
108TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/
109TARGET_UNIFIED_DEVICE := true
110TARGET_PROVIDES_INIT_RC := true
111
112# Kernel
113BOARD_CUSTOM_BOOTIMG_MK := $(LOCAL_PATH)/mkbootimg.mk
114BOARD_KERNEL_BASE := 0x80000000
Zvikomborero VIncent Zvikaramba2776b1d2016-08-25 01:12:59 -0400115BOARD_KERNEL_CMDLINE := console=null androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci androidboot.selinux=permissive
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400116BOARD_KERNEL_PAGESIZE := 2048
117BOARD_KERNEL_SEPARATED_DT := true
118BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
119BOARD_RAMDISK_OFFSET := 0x02000000
Zvikomborero VIncent Zvikaramba4c443682016-08-12 09:35:35 -0400120TARGET_KERNEL_CONFIG := msm8916_sec_defconfig
121TARGET_KERNEL_VARIANT_CONFIG := msm8916_sec_fortuna_can_defconfig
122TARGET_KERNEL_SELINUX_CONFIG := selinux_defconfig
123TARGET_KERNEL_SELINUX_LOG_CONFIG := selinux_log_defconfig
Zvikomborero VIncent Zvikaramba11a048c2016-08-13 23:53:29 -0400124TARGET_KERNEL_SOURCE := kernel/samsung/grandprime
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400125
126# Lights
Zvikomborero VIncent Zvikaramba50c5cb32016-07-23 01:50:09 -0400127TARGET_PROVIDES_LIBLIGHT := false
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400128
129# malloc implementation
130MALLOC_IMPL := dlmalloc
131
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400132# Partition sizes
133TARGET_USERIMAGES_USE_EXT4 := true
134BOARD_BOOTIMAGE_PARTITION_SIZE := 13631488
135BOARD_RECOVERYIMAGE_PARTITION_SIZE := 15728640
136BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2359296000
137BOARD_SYSTEMIMAGE_PARTITION_TPE := ext4
138BOARD_CACHEIMAGE_PARTITION_SIZE := 314572800
139BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
140BOARD_PERSISTIMAGE_PARTITION_SIZE := 8388608
141BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400142BOARD_USERDATAIMAGE_PARTITION_SIZE := 4942966784
143BOARD_FLASH_BLOCK_SIZE := 131072
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400144
145# Power
146TARGET_POWERHAL_VARIANT := qcom
Zvikomborero VIncent Zvikarambaa6955802016-08-18 13:51:49 -0400147#CM_POWERHAL_EXTENSION := qcom
148
149# Media
150TARGET_QCOM_MEDIA_VARIANT := caf
151TARGET_ENABLE_QC_AV_ENHANCEMENTS := true
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400152
153# Qualcomm support
154TARGET_USES_QCOM_BSP := true
155COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE -DQCOM_BSP
Zvikomborero VIncent Zvikarambadddb2322016-08-30 05:56:16 -0400156HAVE_SYNAPTICS_I2C_RMI4_FW_UPGRADE := true
157USE_DEVICE_SPECIFIC_QCOM_PROPRIETARY := true
158TARGET_USES_NEW_ION_API := true
Zvikomborero VIncent Zvikarambad9b888a2016-08-18 13:51:47 -0400159
160#Includes
161TARGET_SPECIFIC_HEADER_PATH := $(LOCAL_PATH)/include
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400162
163# Recovery
164BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_15x24.h\"
165BOARD_SUPPRESS_EMMC_WIPE := true
166TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888
167TARGET_RECOVERY_QCOM_RTC_FIX := true
168TARGET_USERIMAGES_USE_EXT4 := true
Vincent Zvikarambafe30ac62016-07-27 12:08:03 -0400169TARGET_USERIMAGES_USE_F2FS := false
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400170
171# RIL
172TARGET_RIL_VARIANT := caf
Zvikomborero VIncent Zvikarambad8c60662016-07-26 01:29:33 -0400173#override to enable audio.
Zvikomborero VIncent Zvikaramba081e3a02016-07-26 06:07:53 -0400174BOARD_PROVIDES_LIBRIL := false
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400175
176# SELinux
177include device/qcom/sepolicy/sepolicy.mk
Zvikomborero VIncent Zvikaramba8b4bdcb2016-07-22 01:42:16 -0400178include vendor/cm/sepolicy/sepolicy.mk
Zvikomborero VIncent Zvikaramba2776b1d2016-08-25 01:12:59 -0400179include vendor/samsung/common/sepolicy/sepolicy.mk
Zvikomborero VIncent Zvikaramba8b4bdcb2016-07-22 01:42:16 -0400180include vendor/cm/sepolicy/qcom/sepolicy.mk
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400181
182BOARD_SEPOLICY_DIRS += \
183 device/samsung/gprimeltecan/sepolicy
184
185BOARD_SEPOLICY_UNION += \
Zvikomborero VIncent Zvikaramba07a989e2016-08-19 03:48:37 -0400186 audiod.te \
Zvikomborero VIncent Zvikarambaa4ae2bf2016-07-25 00:41:06 -0400187 ueventd.te \
188 file.te \
189 shell.te \
190 surfaceflinger.te \
Zvikomborero VIncent Zvikaramba112c12b2016-08-19 02:57:37 -0400191 bluetooth.te \
Zvikomborero VIncent Zvikarambaa4ae2bf2016-07-25 00:41:06 -0400192 bluetooth_loader.te \
193 wcnss_service.te \
194 healthd.te \
Zvikomborero VIncent Zvikaramba112c12b2016-08-19 02:57:37 -0400195 kernel.te \
196 property.te \
Zvikomborero VIncent Zvikarambaa4ae2bf2016-07-25 00:41:06 -0400197 rild.te \
198 qseecomd.te \
199 system_server.te \
200 time_daemon.te \
201 sysinit.te \
202 mm-qcamerad.te \
203 file_contexts \
204 init_shell.te \
Zvikomborero VIncent Zvikarambaec0cfbc2016-07-26 01:48:40 -0400205 init.te \
Zvikomborero VIncent Zvikaramba541d5a22016-07-26 02:55:00 -0400206 lkmd.te \
207 qmuxd.te \
208 rfs_access.te \
209 rmt_storage.te \
Zvikomborero VIncent Zvikarambaa4ae2bf2016-07-25 00:41:06 -0400210 keystore.te \
211 perfd.te \
212 mediaserver.te \
Zvikomborero VIncent Zvikaramba112c12b2016-08-19 02:57:37 -0400213 vold.te \
Zvikomborero VIncent Zvikarambaa4ae2bf2016-07-25 00:41:06 -0400214 property_contexts
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400215
216# Time services
217BOARD_USES_QC_TIME_SERVICES := true
218
219# TWRP
220#RECOVERY_VARIANT := twrp
221BOARD_HAS_LARGE_FILESYSTEM := true
222BOARD_HAS_NO_SELECT_BUTTON := true
223BOARD_SUPPRESS_SECURE_ERASE := true
224RECOVERY_GRAPHICS_USE_LINELENGTH := true
225RECOVERY_SDCARD_ON_DATA := true
226TW_BRIGHTNESS_PATH := "/sys/class/leds/lcd-backlight/brightness"
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400227TW_MAX_BRIGHTNESS := 255
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400228TW_HAS_DOWNLOAD_MODE := true
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400229TW_HAS_MTP := true
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400230TW_INCLUDE_CRYPTO := true
231TW_INPUT_BLACKLIST := "accelerometer"
232TW_INTERNAL_STORAGE_PATH := "/data/media/0"
Zvikomborero VIncent Zvikaramba06643e42016-08-28 23:56:30 -0400233TW_MTP_DEVICE := /dev/mtp_usb
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400234TW_NEW_ION_HEAP := true
235TW_NO_REBOOT_BOOTLOADER := true
236TW_NO_SCREEN_TIMEOUT := true
237TW_NO_USB_STORAGE := true
238TW_TARGET_USES_QCOM_BSP := true
239TW_THEME := portrait_hdpi
240ifeq ($(TW),)
241 TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/recovery.fstab
242else
243 TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/recovery/twrp.fstab
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400244endif
245
246# Vold
247BOARD_VOLD_DISC_HAS_MULTIPLE_MAJORS := true
248BOARD_VOLD_MAX_PARTITIONS := 67
249TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file
250
251# Wifi
Zvikomborero VIncent Zvikarambad6daffd2016-08-03 21:54:18 -0400252WLAN_CHIPSET := pronto
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400253BOARD_HAS_QCOM_WLAN := true
254BOARD_HAS_QCOM_WLAN_SDK := true
255BOARD_HAVE_SAMSUNG_WIFI := true
256BOARD_HOSTAPD_DRIVER := NL80211
257BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn
258BOARD_WLAN_DEVICE := qcwcn
259BOARD_WPA_SUPPLICANT_DRIVER := NL80211
260BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn
261TARGET_USES_QCOM_WCNSS_QMI := true
262TARGET_USES_WCNSS_CTRL := true
263WIFI_DRIVER_FW_PATH_AP := "ap"
264WIFI_DRIVER_FW_PATH_STA := "sta"
265WPA_SUPPLICANT_VERSION := VER_0_8_X
Zvikomborero VIncent Zvikarambad6daffd2016-08-03 21:54:18 -0400266WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/wlan.ko"
267WIFI_DRIVER_MODULE_NAME := "wlan"
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400268
269# inherit from the proprietary version
270-include vendor/samsung/gprimeltecan/BoardConfigVendor.mk
Zvikomborero VIncent Zvikarambad6daffd2016-08-03 21:54:18 -0400271
272#make, move, symlink and strip the wlan kernel module.
Zvikomborero VIncent Zvikaramba4c443682016-08-12 09:35:35 -0400273KERNEL_EXTERNAL_MODULES:
Zvikomborero VIncent Zvikaramba69fbcf22016-08-19 01:19:52 -0400274 +$(MAKE) -C device/samsung/$(TARGET_DEVICE)/wlan/prima/ WLAN_ROOT=$(ANDROID_BUILD_TOP)/device/samsung/$(TARGET_DEVICE)/wlan/prima/ \
Zvikomborero VIncent Zvikaramba4c443682016-08-12 09:35:35 -0400275 KERNEL_SOURCE=$(KERNEL_OUT) ARCH="arm" \
276 CROSS_COMPILE="arm-eabi-"
Zvikomborero VIncent Zvikaramba4c443682016-08-12 09:35:35 -0400277 mkdir $(KERNEL_MODULES_OUT)/$(WLAN_CHIPSET)/ -p
278 ln -sf /system/lib/modules/$(WLAN_CHIPSET)/$(WLAN_CHIPSET)_wlan.ko $(TARGET_OUT)/lib/modules/wlan.ko
Zvikomborero VIncent Zvikaramba69fbcf22016-08-19 01:19:52 -0400279 mv device/samsung/$(TARGET_DEVICE)/wlan/prima/wlan.ko $(KERNEL_MODULES_OUT)/$(WLAN_CHIPSET)/$(WLAN_CHIPSET)_wlan.ko
Zvikomborero VIncent Zvikaramba4c443682016-08-12 09:35:35 -0400280 arm-eabi-strip --strip-debug $(KERNEL_MODULES_OUT)/$(WLAN_CHIPSET)/$(WLAN_CHIPSET)_wlan.ko
Zvikomborero VIncent Zvikaramba69fbcf22016-08-19 01:19:52 -0400281 +$(MAKE) -C device/samsung/$(TARGET_DEVICE)/wlan/prima/ clean
Zvikomborero VIncent Zvikaramba4c443682016-08-12 09:35:35 -0400282TARGET_KERNEL_MODULES := KERNEL_EXTERNAL_MODULES