blob: ff43bcdd55f4f78c880c90dccc65e431d528698f [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
35TARGET_OTA_ASSERT_DEVICE := gprimeltevl,gprimeltecan,samsung_sm_g530w
36
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
56# BOARD_CHARGER_ENABLE_SUSPEND := true
Zvikomborero VIncent Zvikaramba081e3a02016-07-26 06:07:53 -040057BOARD_CHARGER_SHOW_PERCENTAGE := true
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040058
Zvikomborero VIncent Zvikaramba50c5cb32016-07-23 01:50:09 -040059#sec_s3fwrn5 <- NFC HAL
60
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040061# CMHW
62BOARD_HARDWARE_CLASS += $(LOCAL_PATH)/cmhw
63
64# Crypto
65TARGET_HW_DISK_ENCRYPTION := true
66
67# default.prop
68ADDITIONAL_DEFAULT_PROPERTIES += \
69 camera2.portability.force_api=1
70
71# Display
72MAX_EGL_CACHE_KEY_SIZE := 12*1024
73MAX_EGL_CACHE_SIZE := 2048*1024
74NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
Zvikomborero Vincent Zvikaramba94239f92016-07-28 03:48:03 -040075OVERRIDE_RS_DRIVER := libRSDriver.so
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040076TARGET_CONTINUOUS_SPLASH_ENABLED := true
77TARGET_HAVE_NEW_GRALLOC := true
78
79# Encryption
80TARGET_SWV8_DISK_ENCRYPTION := true
81
82# FM
83AUDIO_FEATURE_ENABLED_FM := true
84TARGET_QCOM_NO_FM_FIRMWARE := true
85
86# Fonts
87EXTENDED_FONT_FOOTPRINT := true
88
89# GPS
Vincent Zvikarambafe30ac62016-07-27 12:08:03 -040090#TARGET_GPS_HAL_PATH := $(LOCAL_PATH)/gps
91#TARGET_NO_RPC := true
Zvikomborero VIncent Zvikaramba46818ce2016-07-25 19:59:57 -040092
Zvikomborero VIncent Zvikarambac313e052016-08-10 12:57:35 -040093#ART
Zvikomborero VIncent Zvikarambacd0cc552016-08-10 16:18:52 -040094#WITH_DEXPREOPT := true
Zvikomborero VIncent Zvikarambac313e052016-08-10 12:57:35 -040095
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -040096# Init
97TARGET_INIT_VENDOR_LIB := libinit_msm
98TARGET_LIBINIT_DEFINES_FILE := $(LOCAL_PATH)/init/init_gprimeltecan.cpp
99TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/
100TARGET_UNIFIED_DEVICE := true
101TARGET_PROVIDES_INIT_RC := true
102
103# Kernel
104BOARD_CUSTOM_BOOTIMG_MK := $(LOCAL_PATH)/mkbootimg.mk
105BOARD_KERNEL_BASE := 0x80000000
Vincent Zvikarambafe30ac62016-07-27 12:08:03 -0400106BOARD_KERNEL_CMDLINE := console=null androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400107BOARD_KERNEL_PAGESIZE := 2048
108BOARD_KERNEL_SEPARATED_DT := true
109BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
110BOARD_RAMDISK_OFFSET := 0x02000000
Zvikomborero VIncent Zvikaramba4c443682016-08-12 09:35:35 -0400111TARGET_KERNEL_CONFIG := msm8916_sec_defconfig
112TARGET_KERNEL_VARIANT_CONFIG := msm8916_sec_fortuna_can_defconfig
113TARGET_KERNEL_SELINUX_CONFIG := selinux_defconfig
114TARGET_KERNEL_SELINUX_LOG_CONFIG := selinux_log_defconfig
Zvikomborero VIncent Zvikaramba6a393df2016-08-02 01:18:34 -0400115TARGET_KERNEL_SOURCE := kernel/samsung/gprimeltecan
Zvikomborero VIncent Zvikaramba4c443682016-08-12 09:35:35 -0400116#TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400117
118# Lights
Zvikomborero VIncent Zvikaramba50c5cb32016-07-23 01:50:09 -0400119TARGET_PROVIDES_LIBLIGHT := false
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400120
121# malloc implementation
122MALLOC_IMPL := dlmalloc
123
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400124# Partition sizes
125TARGET_USERIMAGES_USE_EXT4 := true
126BOARD_BOOTIMAGE_PARTITION_SIZE := 13631488
127BOARD_RECOVERYIMAGE_PARTITION_SIZE := 15728640
128BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2359296000
129BOARD_SYSTEMIMAGE_PARTITION_TPE := ext4
130BOARD_CACHEIMAGE_PARTITION_SIZE := 314572800
131BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
132BOARD_PERSISTIMAGE_PARTITION_SIZE := 8388608
133BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400134BOARD_USERDATAIMAGE_PARTITION_SIZE := 4942966784
135BOARD_FLASH_BLOCK_SIZE := 131072
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400136
137# Power
138TARGET_POWERHAL_VARIANT := qcom
139
140# Qualcomm support
141TARGET_USES_QCOM_BSP := true
142COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE -DQCOM_BSP
143
144# Recovery
145BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_15x24.h\"
146BOARD_SUPPRESS_EMMC_WIPE := true
147TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888
148TARGET_RECOVERY_QCOM_RTC_FIX := true
149TARGET_USERIMAGES_USE_EXT4 := true
Vincent Zvikarambafe30ac62016-07-27 12:08:03 -0400150TARGET_USERIMAGES_USE_F2FS := false
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400151
152# RIL
153TARGET_RIL_VARIANT := caf
Zvikomborero VIncent Zvikarambad8c60662016-07-26 01:29:33 -0400154#override to enable audio.
Zvikomborero VIncent Zvikaramba081e3a02016-07-26 06:07:53 -0400155BOARD_PROVIDES_LIBRIL := false
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400156
157# SELinux
158include device/qcom/sepolicy/sepolicy.mk
Zvikomborero VIncent Zvikaramba8b4bdcb2016-07-22 01:42:16 -0400159include vendor/cm/sepolicy/sepolicy.mk
160include vendor/cm/sepolicy/qcom/sepolicy.mk
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400161
162BOARD_SEPOLICY_DIRS += \
163 device/samsung/gprimeltecan/sepolicy
164
165BOARD_SEPOLICY_UNION += \
Zvikomborero VIncent Zvikarambaa4ae2bf2016-07-25 00:41:06 -0400166 ueventd.te \
167 file.te \
168 shell.te \
169 surfaceflinger.te \
170 bluetooth_loader.te \
171 wcnss_service.te \
172 healthd.te \
173 rild.te \
174 qseecomd.te \
175 system_server.te \
176 time_daemon.te \
177 sysinit.te \
178 mm-qcamerad.te \
179 file_contexts \
180 init_shell.te \
Zvikomborero VIncent Zvikarambaec0cfbc2016-07-26 01:48:40 -0400181 init.te \
Zvikomborero VIncent Zvikaramba541d5a22016-07-26 02:55:00 -0400182 lkmd.te \
183 qmuxd.te \
184 rfs_access.te \
185 rmt_storage.te \
Zvikomborero VIncent Zvikarambaa4ae2bf2016-07-25 00:41:06 -0400186 keystore.te \
187 perfd.te \
188 mediaserver.te \
189 property_contexts
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400190
191# Time services
192BOARD_USES_QC_TIME_SERVICES := true
193
194# TWRP
195#RECOVERY_VARIANT := twrp
196BOARD_HAS_LARGE_FILESYSTEM := true
197BOARD_HAS_NO_SELECT_BUTTON := true
198BOARD_SUPPRESS_SECURE_ERASE := true
199RECOVERY_GRAPHICS_USE_LINELENGTH := true
200RECOVERY_SDCARD_ON_DATA := true
201TW_BRIGHTNESS_PATH := "/sys/class/leds/lcd-backlight/brightness"
202#TW_SECONDARY_BRIGHTNESS_PATH := "/sys/devices/soc.0/1a00000.qcom\x2cmdss_mdp/qcom\x2cmdss_fb_primary.132/leds/lcd-backlight/brightness"
203TW_MAX_BRIGHTNESS := 255
204# TW_CRYPTO_FS_OPTIONS := "nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check,encryptable=footer"
205# TW_CRYPTO_FS_TYPE := "ext4"
206# TW_CRYPTO_KEY_LOC := "footer"
207# TW_CRYPTO_MNT_POINT := "/data"
208# TW_CRYPTO_REAL_BLKDEV := "/dev/block/platform/7824900.sdhci/by-name/userdata"
209#TW_EXCLUDE_ENCRYPTED_BACKUPS := true
210TW_HAS_DOWNLOAD_MODE := true
211#DEVICE_RESOLUTION := 540x960
212TW_HAS_MTP := true
213# TW_IGNORE_MAJOR_AXIS_0 := true
214TW_INCLUDE_CRYPTO := true
215TW_INPUT_BLACKLIST := "accelerometer"
216TW_INTERNAL_STORAGE_PATH := "/data/media/0"
217#TW_INTERNAL_STORAGE_MOUNT_POINT := "data"
218TW_MTP_DEVICE := /dev/usb_mtp_gadget
219TW_NEW_ION_HEAP := true
220TW_NO_REBOOT_BOOTLOADER := true
221TW_NO_SCREEN_TIMEOUT := true
222TW_NO_USB_STORAGE := true
223TW_TARGET_USES_QCOM_BSP := true
224TW_THEME := portrait_hdpi
225ifeq ($(TW),)
226 TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/recovery.fstab
227else
228 TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/recovery/twrp.fstab
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400229endif
230
231# Vold
232BOARD_VOLD_DISC_HAS_MULTIPLE_MAJORS := true
233BOARD_VOLD_MAX_PARTITIONS := 67
234TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file
235
236# Wifi
Zvikomborero VIncent Zvikarambad6daffd2016-08-03 21:54:18 -0400237WLAN_CHIPSET := pronto
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400238BOARD_HAS_QCOM_WLAN := true
239BOARD_HAS_QCOM_WLAN_SDK := true
240BOARD_HAVE_SAMSUNG_WIFI := true
241BOARD_HOSTAPD_DRIVER := NL80211
242BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn
243BOARD_WLAN_DEVICE := qcwcn
244BOARD_WPA_SUPPLICANT_DRIVER := NL80211
245BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn
246TARGET_USES_QCOM_WCNSS_QMI := true
247TARGET_USES_WCNSS_CTRL := true
248WIFI_DRIVER_FW_PATH_AP := "ap"
249WIFI_DRIVER_FW_PATH_STA := "sta"
250WPA_SUPPLICANT_VERSION := VER_0_8_X
Zvikomborero VIncent Zvikarambad6daffd2016-08-03 21:54:18 -0400251WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/wlan.ko"
252WIFI_DRIVER_MODULE_NAME := "wlan"
Zvikomborero VIncent Zvikarambaa25011a2016-07-21 16:32:35 -0400253
254# inherit from the proprietary version
255-include vendor/samsung/gprimeltecan/BoardConfigVendor.mk
Zvikomborero VIncent Zvikarambad6daffd2016-08-03 21:54:18 -0400256
257#make, move, symlink and strip the wlan kernel module.
Zvikomborero VIncent Zvikaramba4c443682016-08-12 09:35:35 -0400258KERNEL_EXTERNAL_MODULES:
259 make -C device/samsung/gprimeltecan/wlan/prima/ WLAN_ROOT=$(ANDROID_BUILD_TOP)/device/samsung/gprimeltecan/wlan/prima/ \
260 KERNEL_SOURCE=$(KERNEL_OUT) ARCH="arm" \
261 CROSS_COMPILE="arm-eabi-"
262# CROSS_COMPILE=$(ANDROID_BUILD_TOP)/prebuilts/gcc/linux-x86/arm/arm-eabi-4.8/bin/arm-eabi-
263 mkdir $(KERNEL_MODULES_OUT)/$(WLAN_CHIPSET)/ -p
264 ln -sf /system/lib/modules/$(WLAN_CHIPSET)/$(WLAN_CHIPSET)_wlan.ko $(TARGET_OUT)/lib/modules/wlan.ko
265 mv device/samsung/gprimeltecan/wlan/prima/wlan.ko $(KERNEL_MODULES_OUT)/$(WLAN_CHIPSET)/$(WLAN_CHIPSET)_wlan.ko
266 arm-eabi-strip --strip-debug $(KERNEL_MODULES_OUT)/$(WLAN_CHIPSET)/$(WLAN_CHIPSET)_wlan.ko
Zvikomborero VIncent Zvikarambad6daffd2016-08-03 21:54:18 -0400267
Zvikomborero VIncent Zvikaramba4c443682016-08-12 09:35:35 -0400268TARGET_KERNEL_MODULES := KERNEL_EXTERNAL_MODULES