switch to modular layout

Change-Id: If375e683b32d1509ffab49989d5bd89985d262e4
This commit is contained in:
PythonLimited 2018-02-18 13:36:47 +01:00
parent 79da828b11
commit 6b76d51966
18 changed files with 92 additions and 88 deletions

View file

@ -17,109 +17,23 @@
VENDOR_PATH := device/samsung/msm8226-common
include device/samsung/msm8226-common/board/*.mk
TARGET_SPECIFIC_HEADER_PATH := $(VENDOR_PATH)/include
# Architecture
TARGET_CPU_MEMCPY_BASE_OPT_DISABLE := true
TARGET_CPU_VARIANT := krait
# Audio
AUDIO_FEATURE_ENABLED_LOW_LATENCY_CAPTURE := true
BOARD_USES_ALSA_AUDIO := true
# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_PATH)/bluetooth
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_QCOM := true
BLUETOOTH_HCI_USE_MCT := true
# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := MSM8226
# Camera
TARGET_PROVIDES_CAMERA_HAL := true
USE_DEVICE_SPECIFIC_CAMERA := true
TARGET_USE_COMPAT_GRALLOC_ALIGN := true
TARGET_HAS_LEGACY_CAMERA_HAL1 := true
# Charger
BOARD_BATTERY_DEVICE_NAME := "battery"
BOARD_CHARGING_CMDLINE_NAME := "androidboot.mode"
BOARD_CHARGING_CMDLINE_VALUE := "charger"
BOARD_CHARGER_ENABLE_SUSPEND := true
BOARD_CHARGER_SHOW_PERCENTAGE := true
# CMHW
BOARD_HARDWARE_CLASS += $(VENDOR_PATH)/cmhw
# Custom RIL class
BOARD_RIL_CLASS := ../../../$(VENDOR_PATH)/ril
# Display
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
# Shader cache config options
# Maximum size of the GLES Shaders that can be cached for reuse.
# Increase the size if shaders of size greater than 12KB are used.
MAX_EGL_CACHE_KEY_SIZE := 12*1024
# Maximum GLES shader cache size for each app to store the compiled shader
# binaries. Decrease the size if RAM or Flash Storage size is a limitation
# of the device.
MAX_EGL_CACHE_SIZE := 2048*1024
# FM
AUDIO_FEATURE_ENABLED_FM := true
TARGET_QCOM_NO_FM_FIRMWARE := true
# Fonts
EXTENDED_FONT_FOOTPRINT := true
# Init
TARGET_INIT_VENDOR_LIB := libinit_msm
# Memory
MALLOC_SVELTE := true
# Partitions and Vold
BOARD_VOLD_EMMC_SHARES_DEV_MAJOR := true
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file
# Platform
TARGET_BOARD_PLATFORM := msm8226
TARGET_BOARD_PLATFORM_GPU := qcom-adreno305
USE_CLANG_PLATFORM_BUILD := true
# Properties (reset them here, include more in device if needed)
TARGET_SYSTEM_PROP := $(VENDOR_PATH)/system.prop
# Basic dexpreopt
ifeq ($(HOST_OS),linux)
ifneq ($(TARGET_BUILD_VARIANT),eng)
ifeq ($(WITH_DEXPREOPT),)
WITH_DEXPREOPT := true
WITH_DEXPREOPT_BOOT_IMG_ONLY := true
endif
endif
endif
# SELinux
-include device/qcom/sepolicy/sepolicy.mk
BOARD_SEPOLICY_DIRS += $(VENDOR_PATH)/sepolicy
# Wifi
BOARD_HAS_QCOM_WLAN := true
BOARD_HAS_QCOM_WLAN_SDK := true
BOARD_WLAN_DEVICE := qcwcn
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
TARGET_PROVIDES_WCNSS_QMI := true
TARGET_USES_QCOM_WCNSS_QMI := true
TARGET_USES_WCNSS_CTRL := true
WPA_SUPPLICANT_VERSION := VER_0_8_X
WIFI_DRIVER_FW_PATH_STA := "sta"
WIFI_DRIVER_FW_PATH_AP := "ap"

3
board/audio.mk Normal file
View file

@ -0,0 +1,3 @@
# Audio
AUDIO_FEATURE_ENABLED_LOW_LATENCY_CAPTURE := true
BOARD_USES_ALSA_AUDIO := true

5
board/bluetooth.mk Normal file
View file

@ -0,0 +1,5 @@
# Bluetooth
BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_PATH)/bluetooth
BOARD_HAVE_BLUETOOTH := true
BOARD_HAVE_BLUETOOTH_QCOM := true
BLUETOOTH_HCI_USE_MCT := true

2
board/bootloader.mk Normal file
View file

@ -0,0 +1,2 @@
# Bootloader
TARGET_BOOTLOADER_BOARD_NAME := MSM8226

8
board/camera.mk Normal file
View file

@ -0,0 +1,8 @@
# Camera
BOARD_CAMERA_SENSORS := s5k4h5_8196 imx175 # Dont know if s5k4h5_8226 exists
BOARD_GLOBAL_CFLAGS += -DCAMERA_VENDOR_L_COMPAT # Do we really need this???
TARGET_NEEDS_PLATFORM_TEXT_RELOCATIONS := true
TARGET_USE_VENDOR_CAMERA_EXT := true # Dont know what this does but everyone else uses it :)
USE_DEVICE_SPECIFIC_CAMERA := true
TARGET_HAS_LEGACY_CAMERA_HAL1 := true

6
board/charger.mk Normal file
View file

@ -0,0 +1,6 @@
# Charger
BOARD_BATTERY_DEVICE_NAME := "battery"
BOARD_CHARGING_CMDLINE_NAME := "androidboot.mode"
BOARD_CHARGING_CMDLINE_VALUE := "charger"
BOARD_CHARGER_ENABLE_SUSPEND := true
BOARD_CHARGER_SHOW_PERCENTAGE := true

6
board/dexpreopt.mk Normal file
View file

@ -0,0 +1,6 @@
# Basic dexpreopt
ifeq ($(HOST_OS),linux)
#We need this otherwise WIFI causes a bootloop on each connect!
WITH_DEXPREOPT := true
endif

13
board/display.mk Normal file
View file

@ -0,0 +1,13 @@
# Display
NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
# Shader cache config options
# Maximum size of the GLES Shaders that can be cached for reuse.
# Increase the size if shaders of size greater than 12KB are used.
MAX_EGL_CACHE_KEY_SIZE := 12*1024
# Maximum GLES shader cache size for each app to store the compiled shader
# binaries. Decrease the size if RAM or Flash Storage size is a limitation
# of the device.
MAX_EGL_CACHE_SIZE := 2048*1024

4
board/fm.mk Normal file
View file

@ -0,0 +1,4 @@
# FM
AUDIO_FEATURE_ENABLED_FM := true
TARGET_QCOM_NO_FM_FIRMWARE := true

4
board/gpu.mk Normal file
View file

@ -0,0 +1,4 @@
# GPU
TARGET_BOARD_PLATFORM := msm8226
TARGET_BOARD_PLATFORM_GPU := qcom-adreno305
USE_CLANG_PLATFORM_BUILD := true

2
board/init.mk Normal file
View file

@ -0,0 +1,2 @@
# Init
TARGET_INIT_VENDOR_LIB := libinit_msm

3
board/kernel.mk Normal file
View file

@ -0,0 +1,3 @@
# Architecture
TARGET_CPU_MEMCPY_BASE_OPT_DISABLE := true
TARGET_CPU_VARIANT := krait

2
board/memory.mk Normal file
View file

@ -0,0 +1,2 @@
# Memory
MALLOC_SVELTE := true

5
board/partitions.mk Normal file
View file

@ -0,0 +1,5 @@
# Partitions and Vold
BOARD_VOLD_EMMC_SHARES_DEV_MAJOR := true
TARGET_USERIMAGES_USE_EXT4 := true
TARGET_USE_CUSTOM_LUN_FILE_PATH := /sys/devices/platform/msm_hsusb/gadget/lun%d/file

8
board/qcom-camera.mk Normal file
View file

@ -0,0 +1,8 @@
# Camera
BOARD_CAMERA_SENSORS := s5k4h5_8226 imx175
BOARD_GLOBAL_CFLAGS += -DCAMERA_VENDOR_L_COMPAT
TARGET_NEEDS_PLATFORM_TEXT_RELOCATIONS := true
TARGET_USE_VENDOR_CAMERA_EXT := true
USE_DEVICE_SPECIFIC_CAMERA := true
TARGET_HAS_LEGACY_CAMERA_HAL1 := true

14
board/wifi.mk Normal file
View file

@ -0,0 +1,14 @@
# Wifi
BOARD_HAS_QCOM_WLAN := true
BOARD_HAS_QCOM_WLAN_SDK := true
BOARD_WLAN_DEVICE := qcwcn
BOARD_HOSTAPD_DRIVER := NL80211
BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
BOARD_WPA_SUPPLICANT_DRIVER := NL80211
BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_$(BOARD_WLAN_DEVICE)
TARGET_PROVIDES_WCNSS_QMI := true
TARGET_USES_QCOM_WCNSS_QMI := true
TARGET_USES_WCNSS_CTRL := true
WPA_SUPPLICANT_VERSION := VER_0_8_X
WIFI_DRIVER_FW_PATH_STA := "sta"
WIFI_DRIVER_FW_PATH_AP := "ap"

View file

@ -1,2 +1,3 @@
allow cameraserver system_data_file:sock_file write;
allow cameraserver camera_socket:sock_file write;
allow cameraserver mpctl_socket:dir search;

View file

@ -4,8 +4,12 @@ allow mm-qcamerad sysfs_camera:file rw_file_perms;
allow mm-qcamerad system_data_file:dir w_dir_perms;
allow mm-qcamerad system_data_file:file open;
#allow mm-qcamerad system_file:file execmod;
allow mm-qcamerad system_data_file:sock_file unlink;
allow mm-qcamerad sensors_socket:sock_file read;
allow mm-qcamerad system_data_file:sock_file rw_file_perms;
allow mm-qcamerad system_data_file:sock_file rw_file_perms;
allow mm-qcamerad system_data_file:dir { add_name remove_name write };
allow mm-qcamerad system_data_file:sock_file { create unlink };
allow mm-qcamerad system_server:unix_stream_socket rw_socket_perms;
allow mm-qcamerad system_data_file:sock_file { create unlink };