Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 1 | FORCE_32_BIT := true |
| 2 | |
| 3 | -include vendor/samsung/gprimeltecan/BoardConfigVendor.mk |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 4 | |
| 5 | LOCAL_PATH := device/samsung/gprimeltecan |
| 6 | |
| 7 | # Inherit from common |
| 8 | -include device/samsung/qcom-common/BoardConfigCommon.mk |
| 9 | |
| 10 | TARGET_SPECIFIC_HEADER_PATH := $(LOCAL_PATH)/include |
| 11 | |
| 12 | # ANT+ |
| 13 | BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease" |
| 14 | |
| 15 | # Platform |
| 16 | TARGET_ARCH := arm |
Zvikomborero VIncent Zvikaramba | a4ae2bf | 2016-07-25 00:41:06 -0400 | [diff] [blame] | 17 | TARGET_BOARD_PLATFORM := msm8916 |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 18 | TARGET_CPU_ABI := armeabi-v7a |
| 19 | TARGET_CPU_ABI2 := armeabi |
| 20 | TARGET_ARCH_VARIANT := armv7-a-neon |
Zvikomborero VIncent Zvikaramba | a4ae2bf | 2016-07-25 00:41:06 -0400 | [diff] [blame] | 21 | TARGET_BOARD_PLATFORM_GPU := qcom-adreno306 |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 22 | #ARCH_ARM_HAVE_TLS_REGISTER := true |
| 23 | |
| 24 | # Architecture |
| 25 | TARGET_CPU_SMP := true |
| 26 | TARGET_CPU_VARIANT := cortex-a53 |
| 27 | TARGET_GLOBAL_CFLAGS += -mfpu=neon -mfloat-abi=softfp |
| 28 | TARGET_GLOBAL_CPPFLAGS += -mfpu=neon -mfloat-abi=softfp |
| 29 | |
| 30 | # Audio |
| 31 | AUDIO_FEATURE_LOW_LATENCY_PRIMARY := true |
| 32 | BOARD_USES_ALSA_AUDIO := true |
| 33 | |
| 34 | # Asserts |
| 35 | TARGET_OTA_ASSERT_DEVICE := gprimeltevl,gprimeltecan,samsung_sm_g530w |
| 36 | |
| 37 | # Bluetooth |
| 38 | BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_PATH)/bluetooth |
| 39 | BOARD_HAVE_BLUETOOTH := true |
| 40 | BOARD_HAVE_BLUETOOTH_QCOM := true |
| 41 | BLUETOOTH_HCI_USE_MCT := true |
| 42 | |
Zvikomborero VIncent Zvikaramba | a4ae2bf | 2016-07-25 00:41:06 -0400 | [diff] [blame] | 43 | # Custom RIL class |
Zvikomborero VIncent Zvikaramba | 46818ce | 2016-07-25 19:59:57 -0400 | [diff] [blame] | 44 | BOARD_RIL_CLASS := ../../../device/samsung/gprimeltecan/ril |
Zvikomborero VIncent Zvikaramba | a4ae2bf | 2016-07-25 00:41:06 -0400 | [diff] [blame] | 45 | PROTOBUF_SUPPORTED := true |
| 46 | |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 47 | # Bootloader |
| 48 | TARGET_BOOTLOADER_BOARD_NAME := MSM8916 |
| 49 | |
| 50 | # Camera |
| 51 | TARGET_USE_VENDOR_CAMERA_EXT := true |
Zvikomborero VIncent Zvikaramba | 323d316 | 2016-07-25 03:15:09 -0400 | [diff] [blame] | 52 | TARGET_PROVIDES_CAMERA_HAL := true |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 53 | USE_DEVICE_SPECIFIC_CAMERA := true |
| 54 | |
| 55 | # Charger |
| 56 | # BOARD_CHARGER_ENABLE_SUSPEND := true |
Zvikomborero VIncent Zvikaramba | 081e3a0 | 2016-07-26 06:07:53 -0400 | [diff] [blame] | 57 | BOARD_CHARGER_SHOW_PERCENTAGE := true |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 58 | |
Zvikomborero VIncent Zvikaramba | 50c5cb3 | 2016-07-23 01:50:09 -0400 | [diff] [blame] | 59 | #sec_s3fwrn5 <- NFC HAL |
| 60 | |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 61 | # CMHW |
| 62 | BOARD_HARDWARE_CLASS += $(LOCAL_PATH)/cmhw |
| 63 | |
| 64 | # Crypto |
| 65 | TARGET_HW_DISK_ENCRYPTION := true |
| 66 | |
| 67 | # default.prop |
| 68 | ADDITIONAL_DEFAULT_PROPERTIES += \ |
| 69 | camera2.portability.force_api=1 |
| 70 | |
| 71 | # Display |
| 72 | MAX_EGL_CACHE_KEY_SIZE := 12*1024 |
| 73 | MAX_EGL_CACHE_SIZE := 2048*1024 |
| 74 | NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 |
Zvikomborero Vincent Zvikaramba | 94239f9 | 2016-07-28 03:48:03 -0400 | [diff] [blame] | 75 | OVERRIDE_RS_DRIVER := libRSDriver.so |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 76 | TARGET_CONTINUOUS_SPLASH_ENABLED := true |
| 77 | TARGET_HAVE_NEW_GRALLOC := true |
| 78 | |
| 79 | # Encryption |
| 80 | TARGET_SWV8_DISK_ENCRYPTION := true |
| 81 | |
| 82 | # FM |
| 83 | AUDIO_FEATURE_ENABLED_FM := true |
| 84 | TARGET_QCOM_NO_FM_FIRMWARE := true |
| 85 | |
| 86 | # Fonts |
| 87 | EXTENDED_FONT_FOOTPRINT := true |
| 88 | |
| 89 | # GPS |
Vincent Zvikaramba | fe30ac6 | 2016-07-27 12:08:03 -0400 | [diff] [blame] | 90 | #TARGET_GPS_HAL_PATH := $(LOCAL_PATH)/gps |
| 91 | #TARGET_NO_RPC := true |
Zvikomborero VIncent Zvikaramba | 46818ce | 2016-07-25 19:59:57 -0400 | [diff] [blame] | 92 | |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 93 | # Init |
| 94 | TARGET_INIT_VENDOR_LIB := libinit_msm |
| 95 | TARGET_LIBINIT_DEFINES_FILE := $(LOCAL_PATH)/init/init_gprimeltecan.cpp |
| 96 | TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/ |
| 97 | TARGET_UNIFIED_DEVICE := true |
| 98 | TARGET_PROVIDES_INIT_RC := true |
| 99 | |
| 100 | # Kernel |
| 101 | BOARD_CUSTOM_BOOTIMG_MK := $(LOCAL_PATH)/mkbootimg.mk |
| 102 | BOARD_KERNEL_BASE := 0x80000000 |
Vincent Zvikaramba | fe30ac6 | 2016-07-27 12:08:03 -0400 | [diff] [blame] | 103 | BOARD_KERNEL_CMDLINE := console=null androidboot.hardware=qcom user_debug=23 msm_rtb.filter=0x3F ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 104 | BOARD_KERNEL_PAGESIZE := 2048 |
| 105 | BOARD_KERNEL_SEPARATED_DT := true |
| 106 | BOARD_KERNEL_TAGS_OFFSET := 0x01E00000 |
| 107 | BOARD_RAMDISK_OFFSET := 0x02000000 |
Zvikomborero VIncent Zvikaramba | 6a393df | 2016-08-02 01:18:34 -0400 | [diff] [blame] | 108 | TARGET_KERNEL_CONFIG := msm8916_sec_defconfig |
| 109 | TARGET_KERNEL_VARIANT_CONFIG := msm8916_sec_fortuna_can_defconfig |
| 110 | TARGET_KERNEL_SELINUX_CONFIG := selinux_defconfig |
Zvikomborero VIncent Zvikaramba | d6daffd | 2016-08-03 21:54:18 -0400 | [diff] [blame] | 111 | TARGET_KERNEL_SELINUX_LOG_CONFIG := selinux_log_defconfig |
Zvikomborero VIncent Zvikaramba | 6a393df | 2016-08-02 01:18:34 -0400 | [diff] [blame] | 112 | TARGET_KERNEL_SOURCE := kernel/samsung/gprimeltecan |
Zvikomborero VIncent Zvikaramba | d6daffd | 2016-08-03 21:54:18 -0400 | [diff] [blame] | 113 | #TARGET_PREBUILT_KERNEL := $(LOCAL_PATH)/kernel |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 114 | |
| 115 | # Lights |
Zvikomborero VIncent Zvikaramba | 50c5cb3 | 2016-07-23 01:50:09 -0400 | [diff] [blame] | 116 | TARGET_PROVIDES_LIBLIGHT := false |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 117 | |
| 118 | # malloc implementation |
| 119 | MALLOC_IMPL := dlmalloc |
| 120 | |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 121 | # Partition sizes |
| 122 | TARGET_USERIMAGES_USE_EXT4 := true |
| 123 | BOARD_BOOTIMAGE_PARTITION_SIZE := 13631488 |
| 124 | BOARD_RECOVERYIMAGE_PARTITION_SIZE := 15728640 |
| 125 | BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2359296000 |
| 126 | BOARD_SYSTEMIMAGE_PARTITION_TPE := ext4 |
| 127 | BOARD_CACHEIMAGE_PARTITION_SIZE := 314572800 |
| 128 | BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 |
| 129 | BOARD_PERSISTIMAGE_PARTITION_SIZE := 8388608 |
| 130 | BOARD_PERSISTIMAGE_FILE_SYSTEM_TYPE := ext4 |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 131 | BOARD_USERDATAIMAGE_PARTITION_SIZE := 4942966784 |
| 132 | BOARD_FLASH_BLOCK_SIZE := 131072 |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 133 | |
| 134 | # Power |
| 135 | TARGET_POWERHAL_VARIANT := qcom |
| 136 | |
| 137 | # Qualcomm support |
| 138 | TARGET_USES_QCOM_BSP := true |
| 139 | COMMON_GLOBAL_CFLAGS += -DQCOM_HARDWARE -DQCOM_BSP |
| 140 | |
| 141 | # Recovery |
| 142 | BOARD_USE_CUSTOM_RECOVERY_FONT := \"roboto_15x24.h\" |
| 143 | BOARD_SUPPRESS_EMMC_WIPE := true |
| 144 | TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888 |
| 145 | TARGET_RECOVERY_QCOM_RTC_FIX := true |
| 146 | TARGET_USERIMAGES_USE_EXT4 := true |
Vincent Zvikaramba | fe30ac6 | 2016-07-27 12:08:03 -0400 | [diff] [blame] | 147 | TARGET_USERIMAGES_USE_F2FS := false |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 148 | |
| 149 | # RIL |
| 150 | TARGET_RIL_VARIANT := caf |
Zvikomborero VIncent Zvikaramba | d8c6066 | 2016-07-26 01:29:33 -0400 | [diff] [blame] | 151 | #override to enable audio. |
Zvikomborero VIncent Zvikaramba | 081e3a0 | 2016-07-26 06:07:53 -0400 | [diff] [blame] | 152 | BOARD_PROVIDES_LIBRIL := false |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 153 | |
| 154 | # SELinux |
| 155 | include device/qcom/sepolicy/sepolicy.mk |
Zvikomborero VIncent Zvikaramba | 8b4bdcb | 2016-07-22 01:42:16 -0400 | [diff] [blame] | 156 | include vendor/cm/sepolicy/sepolicy.mk |
| 157 | include vendor/cm/sepolicy/qcom/sepolicy.mk |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 158 | |
| 159 | BOARD_SEPOLICY_DIRS += \ |
| 160 | device/samsung/gprimeltecan/sepolicy |
| 161 | |
| 162 | BOARD_SEPOLICY_UNION += \ |
Zvikomborero VIncent Zvikaramba | a4ae2bf | 2016-07-25 00:41:06 -0400 | [diff] [blame] | 163 | ueventd.te \ |
| 164 | file.te \ |
| 165 | shell.te \ |
| 166 | surfaceflinger.te \ |
| 167 | bluetooth_loader.te \ |
| 168 | wcnss_service.te \ |
| 169 | healthd.te \ |
| 170 | rild.te \ |
| 171 | qseecomd.te \ |
| 172 | system_server.te \ |
| 173 | time_daemon.te \ |
| 174 | sysinit.te \ |
| 175 | mm-qcamerad.te \ |
| 176 | file_contexts \ |
| 177 | init_shell.te \ |
Zvikomborero VIncent Zvikaramba | ec0cfbc | 2016-07-26 01:48:40 -0400 | [diff] [blame] | 178 | init.te \ |
Zvikomborero VIncent Zvikaramba | 541d5a2 | 2016-07-26 02:55:00 -0400 | [diff] [blame] | 179 | lkmd.te \ |
| 180 | qmuxd.te \ |
| 181 | rfs_access.te \ |
| 182 | rmt_storage.te \ |
Zvikomborero VIncent Zvikaramba | a4ae2bf | 2016-07-25 00:41:06 -0400 | [diff] [blame] | 183 | keystore.te \ |
| 184 | perfd.te \ |
| 185 | mediaserver.te \ |
| 186 | property_contexts |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 187 | |
| 188 | # Time services |
| 189 | BOARD_USES_QC_TIME_SERVICES := true |
| 190 | |
| 191 | # TWRP |
| 192 | #RECOVERY_VARIANT := twrp |
| 193 | BOARD_HAS_LARGE_FILESYSTEM := true |
| 194 | BOARD_HAS_NO_SELECT_BUTTON := true |
| 195 | BOARD_SUPPRESS_SECURE_ERASE := true |
| 196 | RECOVERY_GRAPHICS_USE_LINELENGTH := true |
| 197 | RECOVERY_SDCARD_ON_DATA := true |
| 198 | TW_BRIGHTNESS_PATH := "/sys/class/leds/lcd-backlight/brightness" |
| 199 | #TW_SECONDARY_BRIGHTNESS_PATH := "/sys/devices/soc.0/1a00000.qcom\x2cmdss_mdp/qcom\x2cmdss_fb_primary.132/leds/lcd-backlight/brightness" |
| 200 | TW_MAX_BRIGHTNESS := 255 |
| 201 | # TW_CRYPTO_FS_OPTIONS := "nosuid,nodev,noatime,noauto_da_alloc,discard,journal_async_commit,errors=panic wait,check,encryptable=footer" |
| 202 | # TW_CRYPTO_FS_TYPE := "ext4" |
| 203 | # TW_CRYPTO_KEY_LOC := "footer" |
| 204 | # TW_CRYPTO_MNT_POINT := "/data" |
| 205 | # TW_CRYPTO_REAL_BLKDEV := "/dev/block/platform/7824900.sdhci/by-name/userdata" |
| 206 | #TW_EXCLUDE_ENCRYPTED_BACKUPS := true |
| 207 | TW_HAS_DOWNLOAD_MODE := true |
| 208 | #DEVICE_RESOLUTION := 540x960 |
| 209 | TW_HAS_MTP := true |
| 210 | # TW_IGNORE_MAJOR_AXIS_0 := true |
| 211 | TW_INCLUDE_CRYPTO := true |
| 212 | TW_INPUT_BLACKLIST := "accelerometer" |
| 213 | TW_INTERNAL_STORAGE_PATH := "/data/media/0" |
| 214 | #TW_INTERNAL_STORAGE_MOUNT_POINT := "data" |
| 215 | TW_MTP_DEVICE := /dev/usb_mtp_gadget |
| 216 | TW_NEW_ION_HEAP := true |
| 217 | TW_NO_REBOOT_BOOTLOADER := true |
| 218 | TW_NO_SCREEN_TIMEOUT := true |
| 219 | TW_NO_USB_STORAGE := true |
| 220 | TW_TARGET_USES_QCOM_BSP := true |
| 221 | TW_THEME := portrait_hdpi |
| 222 | ifeq ($(TW),) |
| 223 | TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/recovery.fstab |
| 224 | else |
| 225 | TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/recovery/twrp.fstab |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 226 | endif |
| 227 | |
| 228 | # Vold |
| 229 | BOARD_VOLD_DISC_HAS_MULTIPLE_MAJORS := true |
| 230 | BOARD_VOLD_MAX_PARTITIONS := 67 |
| 231 | TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file |
| 232 | |
| 233 | # Wifi |
Zvikomborero VIncent Zvikaramba | d6daffd | 2016-08-03 21:54:18 -0400 | [diff] [blame] | 234 | WLAN_CHIPSET := pronto |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 235 | BOARD_HAS_QCOM_WLAN := true |
| 236 | BOARD_HAS_QCOM_WLAN_SDK := true |
| 237 | BOARD_HAVE_SAMSUNG_WIFI := true |
| 238 | BOARD_HOSTAPD_DRIVER := NL80211 |
| 239 | BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn |
| 240 | BOARD_WLAN_DEVICE := qcwcn |
| 241 | BOARD_WPA_SUPPLICANT_DRIVER := NL80211 |
| 242 | BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn |
| 243 | TARGET_USES_QCOM_WCNSS_QMI := true |
| 244 | TARGET_USES_WCNSS_CTRL := true |
| 245 | WIFI_DRIVER_FW_PATH_AP := "ap" |
| 246 | WIFI_DRIVER_FW_PATH_STA := "sta" |
| 247 | WPA_SUPPLICANT_VERSION := VER_0_8_X |
Zvikomborero VIncent Zvikaramba | d6daffd | 2016-08-03 21:54:18 -0400 | [diff] [blame] | 248 | WIFI_DRIVER_MODULE_PATH := "/system/lib/modules/wlan.ko" |
| 249 | WIFI_DRIVER_MODULE_NAME := "wlan" |
Zvikomborero VIncent Zvikaramba | a25011a | 2016-07-21 16:32:35 -0400 | [diff] [blame] | 250 | |
| 251 | # inherit from the proprietary version |
| 252 | -include vendor/samsung/gprimeltecan/BoardConfigVendor.mk |
Zvikomborero VIncent Zvikaramba | d6daffd | 2016-08-03 21:54:18 -0400 | [diff] [blame] | 253 | |
| 254 | #make, move, symlink and strip the wlan kernel module. |
| 255 | KERNEL_EXTERNAL_MODULES: |
| 256 | make -C device/samsung/gprimeltecan/wlan/prima/ WLAN_ROOT=$(ANDROID_BUILD_TOP)/device/samsung/gprimeltecan/wlan/prima/ \ |
| 257 | KERNEL_SOURCE=$(KERNEL_OUT) ARCH="arm" CROSS_COMPILE="arm-eabi-" |
| 258 | mkdir $(KERNEL_MODULES_OUT)/$(WLAN_CHIPSET)/ -p |
| 259 | ln -sf /system/lib/modules/$(WLAN_CHIPSET)/$(WLAN_CHIPSET)_wlan.ko $(TARGET_OUT)/lib/modules/wlan.ko |
| 260 | mv device/samsung/gprimeltecan/wlan/prima/wlan.ko $(KERNEL_MODULES_OUT)/$(WLAN_CHIPSET)/$(WLAN_CHIPSET)_wlan.ko |
| 261 | arm-eabi-strip --strip-debug $(KERNEL_MODULES_OUT)/$(WLAN_CHIPSET)/$(WLAN_CHIPSET)_wlan.ko |
| 262 | |
| 263 | TARGET_KERNEL_MODULES := KERNEL_EXTERNAL_MODULES |