universal8895: copy media configs to device tree
[GitHub/exynos8895/android_device_samsung_universal8895-common.git] / BoardConfigCommon.mk
1 #
2 # Copyright (C) 2018 The LineageOS 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 LOCAL_PATH := device/samsung/universal8895-common
18
19 BUILD_BROKEN_DUP_RULES := true
20
21 # Include path
22 TARGET_SPECIFIC_HEADER_PATH := $(LOCAL_PATH)/include
23
24 # Audio
25 USE_XML_AUDIO_POLICY_CONF := 1
26
27 # Bluetooth
28 BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_PATH)/bluetooth
29
30 # Firmware
31 TARGET_NO_BOOTLOADER := true
32 TARGET_NO_RADIOIMAGE := true
33
34 # Platform
35 TARGET_BOARD_PLATFORM := exynos5
36 TARGET_SOC := exynos8895
37 TARGET_BOOTLOADER_BOARD_NAME := universal8895
38 BOARD_VENDOR := samsung
39
40 # Architecture
41 TARGET_ARCH := arm64
42 TARGET_ARCH_VARIANT := armv8-a
43 TARGET_CPU_ABI := arm64-v8a
44 TARGET_CPU_ABI2 :=
45 TARGET_CPU_VARIANT := generic
46
47 # Secondary Architecture
48 TARGET_2ND_ARCH := arm
49 TARGET_2ND_ARCH_VARIANT := armv8-a
50 TARGET_2ND_CPU_ABI := armeabi-v7a
51 TARGET_2ND_CPU_ABI2 := armeabi
52 TARGET_2ND_CPU_VARIANT := cortex-a53.a57
53
54 # Binder
55 TARGET_USES_64_BIT_BINDER := true
56
57 # Apex
58 DEXPREOPT_GENERATE_APEX_IMAGE := true
59
60 # Extracted with libbootimg
61 BOARD_CUSTOM_BOOTIMG := true
62 BOARD_CUSTOM_BOOTIMG_MK := hardware/samsung/mkbootimg.mk
63 BOARD_MKBOOTIMG_ARGS := --kernel_offset 0x00008000 --ramdisk_offset 0x01000000 --tags_offset 0x00000100
64 BOARD_KERNEL_BASE := 0x10000000
65 BOARD_KERNEL_PAGESIZE := 2048
66 BOARD_KERNEL_IMAGE_NAME := Image
67 #BOARD_KERNEL_CMDLINE := The bootloader ignores the cmdline from the boot.img
68 BOARD_KERNEL_SEPARATED_DT := true
69 TARGET_CUSTOM_DTBTOOL := dtbhtoolExynos
70 BOARD_ROOT_EXTRA_FOLDERS += efs cpefs
71 TARGET_KERNEL_CLANG_COMPILE := true
72
73 # Kernel
74 TARGET_KERNEL_ARCH := arm64
75 TARGET_KERNEL_HEADER_ARCH := arm64
76
77 # Kernel config
78 TARGET_KERNEL_SOURCE := kernel/samsung/universal8895
79
80 # Use these flags if the board has a ext4 partition larger than 2gb
81 BOARD_HAS_LARGE_FILESYSTEM := true
82 TARGET_USERIMAGES_USE_EXT4 := true
83 TARGET_USERIMAGES_USE_F2FS := true
84 BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4
85
86 # Partitions
87 BOARD_BOOTIMAGE_PARTITION_SIZE := 41943040 #(40960 sda7)
88 BOARD_RECOVERYIMAGE_PARTITION_SIZE := 48234496 #(47104 sda8)
89 BOARD_SYSTEMIMAGE_PARTITION_SIZE := 4508876800 #(4454400 sda17)
90 BOARD_USERDATAIMAGE_PARTITION_SIZE := 58556678144 #(57184256 sda24)
91 BOARD_CACHEIMAGE_PARTITION_SIZE := 524288000 #(512000 sda18)
92 BOARD_FLASH_BLOCK_SIZE := 4096
93
94 # Manifest
95 PRODUCT_ENFORCE_VINTF_MANIFEST_OVERRIDE := true
96 DEVICE_MANIFEST_FILE := $(LOCAL_PATH)/manifest.xml
97
98 # Exclude AudioFX
99 TARGET_EXCLUDES_AUDIOFX := true
100
101 # Vendor separation
102 TARGET_COPY_OUT_VENDOR := system/vendor
103
104 # Device Tree
105 BOARD_USES_DT := true
106
107 # Renderscript
108 OVERRIDE_RS_DRIVER := libRSDriverArm.so
109
110 # Samsung HALs
111 TARGET_POWERHAL_VARIANT := samsung
112
113 # Bluetooth
114 BOARD_CUSTOM_BT_CONFIG := $(LOCAL_PATH)/bluetooth/libbt_vndcfg.txt
115 BOARD_HAVE_BLUETOOTH := true
116
117 # Backlight
118 BACKLIGHT_PATH := "/sys/class/backlight/panel/brightness"
119
120 # Recovery
121 TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/ramdisk/etc/fstab.samsungexynos8895
122
123 # Wifi
124 TARGET_USES_64_BIT_BCMDHD := true
125 BOARD_WLAN_DEVICE := bcmdhd
126 WPA_SUPPLICANT_VERSION := VER_0_8_X
127 BOARD_WPA_SUPPLICANT_DRIVER := NL80211
128 BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_bcmdhd
129 WPA_SUPPLICANT_USE_HIDL := true
130 BOARD_HOSTAPD_DRIVER := NL80211
131 BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_bcmdhd
132 WIFI_DRIVER_FW_PATH_PARAM := "/sys/module/dhd/parameters/firmware_path"
133 WIFI_DRIVER_NVRAM_PATH_PARAM := "/sys/module/dhd/parameters/nvram_path"
134 WIFI_DRIVER_NVRAM_PATH := "/vendor/etc/wifi/nvram_net.txt"
135 WIFI_DRIVER_FW_PATH_STA := "/vendor/etc/wifi/bcmdhd_sta.bin"
136 WIFI_DRIVER_FW_PATH_AP := "/vendor/etc/wifi/bcmdhd_apsta.bin"
137 WIFI_BAND := 802_11_ABG
138 WIFI_HIDL_FEATURE_DUAL_INTERFACE := true
139
140 # MACLOADER
141 BOARD_HAVE_SAMSUNG_WIFI := true
142
143 BOARD_SEPOLICY_DIRS += device/samsung/universal8895-common/sepolicy
144 BOARD_SEPOLICY_VERS := $(PLATFORM_SDK_VERSION).0
145
146 # Shims
147 TARGET_LD_SHIM_LIBS += \
148 /system/lib/libexynoscamera.so|/vendor/lib/libexynoscamera_shim.so \
149 /system/lib64/libexynoscamera.so|/vendor/lib64/libexynoscamera_shim.so \
150 /system/vendor/lib/libsec-ril.so|/vendor/lib/libcutils_shim.so \
151 /system/vendor/lib64/libsec-ril.so|/vendor/lib64/libcutils_shim.so \
152 /system/vendor/lib/libsec-ril-dsds.so|/vendor/lib/libcutils_shim.so \
153 /system/vendor/lib64/libsec-ril-dsds.so|/vendor/lib64/libcutils_shim.so
154
155 # Soong namespaces
156 PRODUCT_SOONG_NAMESPACES += $(LOCAL_PATH)