aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEthan Chen <intervigil@gmail.com>2016-05-09 17:54:42 -0700
committerEthan Chen <intervigil@gmail.com>2016-05-31 08:12:04 -0700
commit5b195b15d7fa55ad43c720218279c63482cf34b5 (patch)
tree215d8651752100d28ed9b5223f792046f3b22ff1
parenta2119cee4941b0cd5d8300483274c679038c813b (diff)
msm8916: Shift to new device fragment model
* Use make fragments for various subsystems * Move init.qcom.ssr.rc to common repo * Move dexopt flags to device Change-Id: I7ea1bac08993484ef2c74eaf338e93c19b527220
-rw-r--r--BoardConfigCommon.mk151
-rw-r--r--board/00-qcom-platform-msm8916.mk38
-rw-r--r--board/ant.mk1
-rw-r--r--board/bootloader.mk3
-rw-r--r--board/filesystem.mk1
-rw-r--r--board/hardware.mk2
-rw-r--r--board/kernel.mk18
-rw-r--r--board/qcom-audio.mk4
-rw-r--r--board/qcom-bluetooth.mk3
-rw-r--r--board/qcom-cne.mk5
-rw-r--r--board/qcom-crypto.mk2
-rw-r--r--board/qcom-display.mk12
-rw-r--r--board/qcom-fm.mk2
-rw-r--r--board/qcom-media.mk1
-rw-r--r--board/qcom-sepolicy.mk1
-rw-r--r--board/qcom-wlan.mk18
-rw-r--r--board/recovery.mk2
-rw-r--r--board/releasetools.mk1
-rw-r--r--board/sepolicy.mk1
-rw-r--r--msm8916.mk158
-rw-r--r--msm8916.prop5
-rw-r--r--msm8939.prop6
-rw-r--r--product/ant.mk4
-rw-r--r--product/audio.mk9
-rw-r--r--product/charger.mk3
-rw-r--r--product/init.mk11
-rw-r--r--product/media.mk10
-rw-r--r--product/perf.mk9
-rw-r--r--product/qcom-audio.mk20
-rw-r--r--product/qcom-bluetooth.mk12
-rw-r--r--product/qcom-cne.mk8
-rw-r--r--product/qcom-display.mk31
-rw-r--r--product/qcom-fm.mk4
-rw-r--r--product/qcom-keystore.mk5
-rw-r--r--product/qcom-media.mk24
-rw-r--r--product/qcom-perf.mk24
-rw-r--r--product/qcom-radio.mk21
-rw-r--r--product/qcom-wifi.mk29
-rw-r--r--product/recovery.mk3
-rw-r--r--product/touchscreen.mk3
-rw-r--r--product/usb.mk7
-rw-r--r--rootdir/Android.mk8
-rw-r--r--rootdir/etc/init.qcom.rc1
-rw-r--r--rootdir/etc/init.qcom.ssr.rc22
-rw-r--r--system.prop68
45 files changed, 389 insertions, 382 deletions
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index b3c824a..2239bf7 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2014 The CyanogenMod Project
+# Copyright (C) 2016 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -13,150 +13,5 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-VENDOR_PATH := device/cyanogen/msm8916-common
-
-TARGET_SPECIFIC_HEADER_PATH := $(VENDOR_PATH)/include
-
-# Architecture
-ifneq ($(FORCE_32_BIT),true)
-TARGET_BOARD_SUFFIX := _64
-TARGET_ARCH := arm64
-TARGET_ARCH_VARIANT := armv8-a
-TARGET_CPU_ABI := arm64-v8a
-TARGET_CPU_ABI2 :=
-TARGET_CPU_VARIANT := cortex-a53
-
-TARGET_2ND_ARCH := arm
-TARGET_2ND_ARCH_VARIANT := armv7-a-neon
-TARGET_2ND_CPU_ABI := armeabi-v7a
-TARGET_2ND_CPU_ABI2 := armeabi
-TARGET_2ND_CPU_VARIANT := cortex-a53
-
-TARGET_USES_64_BIT_BINDER := true
-else
-TARGET_BOARD_SUFFIX := _32
-TARGET_ARCH := arm
-TARGET_ARCH_VARIANT := armv7-a-neon
-TARGET_CPU_ABI := armeabi-v7a
-TARGET_CPU_ABI2 := armeabi
-TARGET_CPU_VARIANT := cortex-a53
-endif
-
-TARGET_BOARD_PLATFORM := msm8916
-
-# Properties (reset them here, include more in device if needed)
-TARGET_SYSTEM_PROP := $(VENDOR_PATH)/system.prop
-TARGET_SYSTEM_PROP += $(VENDOR_PATH)/$(TARGET_BOARD_PLATFORM_VARIANT).prop
-
-# Bootloader
-TARGET_BOOTLOADER_BOARD_NAME := MSM8916
-TARGET_NO_BOOTLOADER := true
-
-# Kernel
-BOARD_DTBTOOL_ARGS := -2
-BOARD_KERNEL_BASE := 0x80000000
-BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1
-BOARD_KERNEL_PAGESIZE := 2048
-BOARD_KERNEL_SEPARATED_DT := true
-BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
-BOARD_RAMDISK_OFFSET := 0x02000000
-TARGET_KERNEL_SOURCE := kernel/cyanogen/msm8916
-ifneq ($(FORCE_32_BIT),true)
-TARGET_KERNEL_ARCH := arm64
-TARGET_KERNEL_CROSS_COMPILE_PREFIX := aarch64-linux-android-
-TARGET_KERNEL_HEADER_ARCH := arm64
-TARGET_USES_UNCOMPRESSED_KERNEL := true
-else
-TARGET_KERNEL_ARCH := arm
-endif
-
-# ANT+
-BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease"
-
-# Audio
-AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
-AUDIO_FEATURE_ENABLED_NEW_SAMPLE_RATE := true
-BOARD_USES_ALSA_AUDIO := true
-USE_CUSTOM_AUDIO_POLICY := 1
-
-# Bluetooth
-BOARD_HAVE_BLUETOOTH := true
-BOARD_HAVE_BLUETOOTH_QCOM := true
-BLUETOOTH_HCI_USE_MCT := true
-
-# CMHW
-BOARD_USES_CYANOGEN_HARDWARE := true
-BOARD_HARDWARE_CLASS += hardware/cyanogen/cmhw
-
-# Crypto
-TARGET_HW_DISK_ENCRYPTION := true
-
-# Display
-MAX_EGL_CACHE_KEY_SIZE := 12*1024
-MAX_EGL_CACHE_SIZE := 2048*1024
-NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
-OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
-TARGET_CONTINUOUS_SPLASH_ENABLED := true
-TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true
-TARGET_USES_C2D_COMPOSITION := true
-TARGET_USES_ION := true
-USE_OPENGL_RENDERER := true
-
-# FM
-AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
-TARGET_QCOM_NO_FM_FIRMWARE := true
-
-# Init
-TARGET_INIT_VENDOR_LIB := libinit_msm8916
-TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/
-TARGET_RECOVERY_DEVICE_MODULES := libinit_msm8916
-
-# Keymaster
-TARGET_KEYMASTER_WAIT_FOR_QSEE := true
-
-# Malloc
-MALLOC_IMPL := dlmalloc
-
-# Power
-TARGET_POWERHAL_VARIANT := qcom
-
-# Qualcomm support
-BOARD_USES_QC_TIME_SERVICES := true
-ifneq ($(QCPATH),)
-BOARD_USES_QCNE := true
-TARGET_LDPRELOAD := libNimsWrap.so
-endif
-BOARD_USES_QCOM_HARDWARE := true
-
-# Recovery
-TARGET_USERIMAGES_USE_EXT4 := true
-TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_cm
-
-# Releasetools
-TARGET_RELEASETOOLS_EXTENSIONS := $(VENDOR_PATH)
-
-# RIL
-TARGET_RIL_VARIANT := caf
-
-# SELinux
-include device/qcom/sepolicy/sepolicy.mk
-
-BOARD_SEPOLICY_DIRS += \
- $(VENDOR_PATH)/sepolicy
-
-# Video
-TARGET_HAVE_SIGNED_VENUS_FW := true
-
-# Wifi
-BOARD_HAS_QCOM_WLAN := true
-BOARD_HAS_QCOM_WLAN_SDK := true
-BOARD_HOSTAPD_DRIVER := NL80211
-BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn
-BOARD_WLAN_DEVICE := qcwcn
-BOARD_WPA_SUPPLICANT_DRIVER := NL80211
-BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn
-TARGET_USES_QCOM_WCNSS_QMI := true
-TARGET_USES_WCNSS_CTRL := true
-WIFI_DRIVER_FW_PATH_AP := "ap"
-WIFI_DRIVER_FW_PATH_STA := "sta"
-WPA_SUPPLICANT_VERSION := VER_0_8_X
+# Include board config fragments
+include device/cyanogen/msm8916-common/board/*.mk
diff --git a/board/00-qcom-platform-msm8916.mk b/board/00-qcom-platform-msm8916.mk
new file mode 100644
index 0000000..79c0a11
--- /dev/null
+++ b/board/00-qcom-platform-msm8916.mk
@@ -0,0 +1,38 @@
+# Platform
+TARGET_BOARD_PLATFORM := msm8916
+
+# Architecture
+ifneq ($(FORCE_32_BIT),true)
+TARGET_BOARD_SUFFIX := _64
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-a
+TARGET_CPU_ABI := arm64-v8a
+TARGET_CPU_ABI2 :=
+TARGET_CPU_VARIANT := cortex-a53
+
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv7-a-neon
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+TARGET_2ND_CPU_VARIANT := cortex-a53
+
+TARGET_USES_64_BIT_BINDER := true
+else
+TARGET_BOARD_SUFFIX := _32
+TARGET_ARCH := arm
+TARGET_ARCH_VARIANT := armv7-a-neon
+TARGET_CPU_ABI := armeabi-v7a
+TARGET_CPU_ABI2 := armeabi
+TARGET_CPU_VARIANT := cortex-a53
+endif
+
+# Init
+TARGET_INIT_VENDOR_LIB := libinit_msm8916
+TARGET_PLATFORM_DEVICE_BASE := /devices/soc.0/
+TARGET_RECOVERY_DEVICE_MODULES := libinit_msm8916
+
+# Qualcomm support
+BOARD_USES_QCOM_HARDWARE := true
+BOARD_USES_QC_TIME_SERVICES := true
+TARGET_POWERHAL_VARIANT := qcom
+TARGET_RIL_VARIANT := caf
diff --git a/board/ant.mk b/board/ant.mk
new file mode 100644
index 0000000..8de7ba5
--- /dev/null
+++ b/board/ant.mk
@@ -0,0 +1 @@
+BOARD_ANT_WIRELESS_DEVICE := "vfs-prerelease"
diff --git a/board/bootloader.mk b/board/bootloader.mk
new file mode 100644
index 0000000..a447d63
--- /dev/null
+++ b/board/bootloader.mk
@@ -0,0 +1,3 @@
+TARGET_BOOTLOADER_BOARD_NAME := MSM8916
+
+TARGET_NO_BOOTLOADER := true
diff --git a/board/filesystem.mk b/board/filesystem.mk
new file mode 100644
index 0000000..384e59b
--- /dev/null
+++ b/board/filesystem.mk
@@ -0,0 +1 @@
+TARGET_USERIMAGES_USE_EXT4 := true
diff --git a/board/hardware.mk b/board/hardware.mk
new file mode 100644
index 0000000..6c26031
--- /dev/null
+++ b/board/hardware.mk
@@ -0,0 +1,2 @@
+BOARD_HARDWARE_CLASS += hardware/cyanogen/cmhw
+BOARD_USES_CYANOGEN_HARDWARE := true
diff --git a/board/kernel.mk b/board/kernel.mk
new file mode 100644
index 0000000..0ec9a3e
--- /dev/null
+++ b/board/kernel.mk
@@ -0,0 +1,18 @@
+BOARD_DTBTOOL_ARGS := -2
+
+BOARD_KERNEL_BASE := 0x80000000
+BOARD_KERNEL_CMDLINE := console=ttyHSL0,115200,n8 androidboot.console=ttyHSL0 androidboot.hardware=qcom msm_rtb.filter=0x237 ehci-hcd.park=3 androidboot.bootdevice=7824900.sdhci lpm_levels.sleep_disabled=1
+BOARD_KERNEL_PAGESIZE := 2048
+BOARD_KERNEL_SEPARATED_DT := true
+BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
+BOARD_RAMDISK_OFFSET := 0x02000000
+
+TARGET_KERNEL_SOURCE := kernel/cyanogen/msm8916
+ifneq ($(FORCE_32_BIT),true)
+TARGET_KERNEL_ARCH := arm64
+TARGET_KERNEL_CROSS_COMPILE_PREFIX := aarch64-linux-android-
+TARGET_KERNEL_HEADER_ARCH := arm64
+TARGET_USES_UNCOMPRESSED_KERNEL := true
+else
+TARGET_KERNEL_ARCH := arm
+endif
diff --git a/board/qcom-audio.mk b/board/qcom-audio.mk
new file mode 100644
index 0000000..9612d37
--- /dev/null
+++ b/board/qcom-audio.mk
@@ -0,0 +1,4 @@
+AUDIO_FEATURE_ENABLED_KPI_OPTIMIZE := true
+AUDIO_FEATURE_ENABLED_NEW_SAMPLE_RATE := true
+BOARD_USES_ALSA_AUDIO := true
+USE_CUSTOM_AUDIO_POLICY := 1
diff --git a/board/qcom-bluetooth.mk b/board/qcom-bluetooth.mk
new file mode 100644
index 0000000..dd516c7
--- /dev/null
+++ b/board/qcom-bluetooth.mk
@@ -0,0 +1,3 @@
+BOARD_HAVE_BLUETOOTH := true
+BOARD_HAVE_BLUETOOTH_QCOM := true
+BLUETOOTH_HCI_USE_MCT := true
diff --git a/board/qcom-cne.mk b/board/qcom-cne.mk
new file mode 100644
index 0000000..e83beb8
--- /dev/null
+++ b/board/qcom-cne.mk
@@ -0,0 +1,5 @@
+# CNE
+ifneq ($(QCPATH),)
+BOARD_USES_QCNE := true
+TARGET_LDPRELOAD := libNimsWrap.so
+endif
diff --git a/board/qcom-crypto.mk b/board/qcom-crypto.mk
new file mode 100644
index 0000000..4039ab7
--- /dev/null
+++ b/board/qcom-crypto.mk
@@ -0,0 +1,2 @@
+TARGET_HW_DISK_ENCRYPTION := true
+TARGET_KEYMASTER_WAIT_FOR_QSEE := true
diff --git a/board/qcom-display.mk b/board/qcom-display.mk
new file mode 100644
index 0000000..af75722
--- /dev/null
+++ b/board/qcom-display.mk
@@ -0,0 +1,12 @@
+MAX_EGL_CACHE_KEY_SIZE := 12*1024
+MAX_EGL_CACHE_SIZE := 2048*1024
+
+NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3
+
+OVERRIDE_RS_DRIVER := libRSDriver_adreno.so
+
+TARGET_CONTINUOUS_SPLASH_ENABLED := true
+TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS := true
+TARGET_USES_C2D_COMPOSITION := true
+TARGET_USES_ION := true
+USE_OPENGL_RENDERER := true
diff --git a/board/qcom-fm.mk b/board/qcom-fm.mk
new file mode 100644
index 0000000..90ce087
--- /dev/null
+++ b/board/qcom-fm.mk
@@ -0,0 +1,2 @@
+AUDIO_FEATURE_ENABLED_FM_POWER_OPT := true
+TARGET_QCOM_NO_FM_FIRMWARE := true
diff --git a/board/qcom-media.mk b/board/qcom-media.mk
new file mode 100644
index 0000000..4f06152
--- /dev/null
+++ b/board/qcom-media.mk
@@ -0,0 +1 @@
+TARGET_HAVE_SIGNED_VENUS_FW := true
diff --git a/board/qcom-sepolicy.mk b/board/qcom-sepolicy.mk
new file mode 100644
index 0000000..7130c36
--- /dev/null
+++ b/board/qcom-sepolicy.mk
@@ -0,0 +1 @@
+include device/qcom/sepolicy/sepolicy.mk
diff --git a/board/qcom-wlan.mk b/board/qcom-wlan.mk
new file mode 100644
index 0000000..3594ff8
--- /dev/null
+++ b/board/qcom-wlan.mk
@@ -0,0 +1,18 @@
+BOARD_HAS_QCOM_WLAN := true
+BOARD_HAS_QCOM_WLAN_SDK := true
+
+BOARD_HOSTAPD_DRIVER := NL80211
+BOARD_HOSTAPD_PRIVATE_LIB := lib_driver_cmd_qcwcn
+
+BOARD_WLAN_DEVICE := qcwcn
+
+BOARD_WPA_SUPPLICANT_DRIVER := NL80211
+BOARD_WPA_SUPPLICANT_PRIVATE_LIB := lib_driver_cmd_qcwcn
+
+TARGET_USES_QCOM_WCNSS_QMI := true
+TARGET_USES_WCNSS_CTRL := true
+
+WIFI_DRIVER_FW_PATH_AP := "ap"
+WIFI_DRIVER_FW_PATH_STA := "sta"
+
+WPA_SUPPLICANT_VERSION := VER_0_8_X
diff --git a/board/recovery.mk b/board/recovery.mk
new file mode 100644
index 0000000..c32be25
--- /dev/null
+++ b/board/recovery.mk
@@ -0,0 +1,2 @@
+# Recovery
+TARGET_RECOVERY_UPDATER_LIBS := librecovery_updater_cm
diff --git a/board/releasetools.mk b/board/releasetools.mk
new file mode 100644
index 0000000..bc1a595
--- /dev/null
+++ b/board/releasetools.mk
@@ -0,0 +1 @@
+TARGET_RELEASETOOLS_EXTENSIONS := device/cyanogen/msm8916-common
diff --git a/board/sepolicy.mk b/board/sepolicy.mk
new file mode 100644
index 0000000..9650039
--- /dev/null
+++ b/board/sepolicy.mk
@@ -0,0 +1 @@
+BOARD_SEPOLICY_DIRS += device/cyanogen/msm8916-common/sepolicy
diff --git a/msm8916.mk b/msm8916.mk
index 74fef11..52991ce 100644
--- a/msm8916.mk
+++ b/msm8916.mk
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2015 The CyanogenMod Project
+# Copyright (C) 2016 The CyanogenMod Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -17,157 +17,5 @@
# Overlay
DEVICE_PACKAGE_OVERLAYS += $(LOCAL_PATH)/overlay
-# Permissions
-PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.hardware.audio.low_latency.xml:system/etc/permissions/android.hardware.audio.low_latency.xml \
- frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \
- frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml \
- frameworks/native/data/etc/android.hardware.camera.flash-autofocus.xml:system/etc/permissions/android.hardware.camera.flash-autofocus.xml \
- frameworks/native/data/etc/android.hardware.camera.front.xml:system/etc/permissions/android.hardware.camera.front.xml \
- frameworks/native/data/etc/android.hardware.location.gps.xml:system/etc/permissions/android.hardware.location.gps.xml \
- frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
- frameworks/native/data/etc/android.hardware.telephony.cdma.xml:system/etc/permissions/android.hardware.telephony.cdma.xml \
- frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml \
- frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml \
- frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \
- frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml \
- frameworks/native/data/etc/android.software.midi.xml:system/etc/permissions/android.software.midi.xml \
- frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
-
-ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8939)
-PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.hardware.opengles.aep.xml:system/etc/permissions/android.hardware.opengles.aep.xml
-endif
-
-# Audio
-PRODUCT_PACKAGES += \
- audiod \
- audio.a2dp.default \
- audio.primary.msm8916 \
- audio.r_submix.default \
- audio.usb.default \
- libqcompostprocbundle \
- libqcomvisualizer \
- libqcomvoiceprocessing \
- tinymix
-
-# Audio configuration
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/audio/audio_effects.conf:system/vendor/etc/audio_effects.conf
-
-# ANT+
-PRODUCT_PACKAGES += \
- AntHalService \
- com.dsi.ant.antradio_library \
- libantradio
-
-# Charger
-PRODUCT_PACKAGES += \
- charger_res_images
-
-# Connectivity Engine support
-PRODUCT_PACKAGES += \
- libcnefeatureconfig
-
-ifeq ($(BOARD_USES_QCNE),true)
-PRODUCT_PROPERTY_OVERRIDES += \
- persist.cne.feature=4
-endif
-
-# Display
-PRODUCT_PACKAGES += \
- copybit.msm8916 \
- gralloc.msm8916 \
- hwcomposer.msm8916 \
- libtinyxml \
- memtrack.msm8916
-
-# FM
-PRODUCT_PACKAGES += \
- FMRadio \
- libfmjni
-
-# IRSC
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/configs/sec_config:system/etc/sec_config
-
-# IRQ balance
-ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8939)
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/configs/msm_irqbalance.conf:system/vendor/etc/msm_irqbalance.conf
-endif
-
-# Keystore
-PRODUCT_PACKAGES += \
- keystore.msm8916
-
-# Media
-PRODUCT_COPY_FILES += \
- frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_video_le.xml:system/etc/media_codecs_google_video_le.xml \
- $(LOCAL_PATH)/configs/media_codecs_$(TARGET_BOARD_PLATFORM_VARIANT).xml:system/etc/media_codecs.xml
-
-PRODUCT_PACKAGES += \
- libextmedia_jni \
- libOmxAacEnc \
- libOmxAmrEnc \
- libOmxCore \
- libOmxEvrcEnc \
- libOmxQcelp13Enc \
- libOmxVdec \
- libOmxVenc \
- libstagefrighthw
-
-ifneq ($(QCPATH),)
-PRODUCT_PACKAGES += libOmxVdecHevc
-endif
-
-# Power HAL
-PRODUCT_PACKAGES += \
- power.msm8916
-
-# Ramdisk
-PRODUCT_PACKAGES += \
- init.qcom.bt.sh
-
-PRODUCT_PACKAGES += \
- init.qcom.rc \
- init.qcom.power.rc \
- init.qcom.usb.rc \
- init.recovery.qcom.rc \
- ueventd.qcom.rc
-
-# Recovery
-PRODUCT_PACKAGES += \
- librecovery_updater_cm
-
-# RIL
-PRODUCT_PACKAGES += \
- librmnetctl \
- libxml2
-
-# Wifi
-PRODUCT_PACKAGES += \
- libqsap_sdk \
- libQWiFiSoftApCfg \
- libwpa_client \
- hostapd \
- dhcpcd.conf \
- wpa_supplicant \
- wpa_supplicant.conf \
- libwcnss_qmi \
- wcnss_service
-
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/configs/hostapd.accept:system/etc/hostapd/hostapd.accept \
- $(LOCAL_PATH)/configs/hostapd.conf:system/etc/hostapd/hostapd_default.conf \
- $(LOCAL_PATH)/configs/hostapd.deny:system/etc/hostapd/hostapd.deny \
- $(LOCAL_PATH)/configs/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf \
- $(LOCAL_PATH)/configs/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf
-
-# WiFi Display
-ifneq ($(QCPATH),)
-PRODUCT_BOOT_JARS += WfdCommon
-endif
+# Include package config fragments
+include $(LOCAL_PATH)/product/*.mk
diff --git a/msm8916.prop b/msm8916.prop
deleted file mode 100644
index 4ba6057..0000000
--- a/msm8916.prop
+++ /dev/null
@@ -1,5 +0,0 @@
-# Display
-ro.opengles.version=196608
-
-# Perf
-ro.min_freq_0=800000
diff --git a/msm8939.prop b/msm8939.prop
deleted file mode 100644
index 8d9217c..0000000
--- a/msm8939.prop
+++ /dev/null
@@ -1,6 +0,0 @@
-# Display
-ro.opengles.version=196609
-
-# Perf
-ro.min_freq_0=960000
-ro_min_freq_4=800000
diff --git a/product/ant.mk b/product/ant.mk
new file mode 100644
index 0000000..73e2927
--- /dev/null
+++ b/product/ant.mk
@@ -0,0 +1,4 @@
+PRODUCT_PACKAGES += \
+ AntHalService \
+ com.dsi.ant.antradio_library \
+ libantradio
diff --git a/product/audio.mk b/product/audio.mk
new file mode 100644
index 0000000..f992067
--- /dev/null
+++ b/product/audio.mk
@@ -0,0 +1,9 @@
+# Audio
+PRODUCT_PACKAGES += \
+ audio.a2dp.default \
+ audio.r_submix.default \
+ audio.usb.default \
+ tinymix
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.software.midi.xml:system/etc/permissions/android.software.midi.xml
diff --git a/product/charger.mk b/product/charger.mk
new file mode 100644
index 0000000..ec8724f
--- /dev/null
+++ b/product/charger.mk
@@ -0,0 +1,3 @@
+# Charger
+PRODUCT_PACKAGES += \
+ charger_res_images
diff --git a/product/init.mk b/product/init.mk
new file mode 100644
index 0000000..8579969
--- /dev/null
+++ b/product/init.mk
@@ -0,0 +1,11 @@
+# Init scripts
+PRODUCT_PACKAGES += \
+ init.qcom.rc \
+ init.qcom.power.rc \
+ init.recovery.qcom.rc \
+ ueventd.qcom.rc
+
+ifeq ($(TARGET_BUILD_VARIANT),user)
+PRODUCT_PACKAGES += \
+ init.qcom.ssr.rc
+endif
diff --git a/product/media.mk b/product/media.mk
new file mode 100644
index 0000000..eda41a8
--- /dev/null
+++ b/product/media.mk
@@ -0,0 +1,10 @@
+# Media
+PRODUCT_COPY_FILES += \
+ frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_video_le.xml:system/etc/media_codecs_google_video_le.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml
+
+# Properties
+PRODUCT_PROPERTY_OVERRIDES += \
+ media.aac_51_output_enabled=true
diff --git a/product/perf.mk b/product/perf.mk
new file mode 100644
index 0000000..f8fac25
--- /dev/null
+++ b/product/perf.mk
@@ -0,0 +1,9 @@
+# Properties
+ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8939)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.sys.fw.dex2oat_thread_count=4
+endif
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.config.max_starting_bg=8 \
+ ro.sys.fw.use_trim_settings=true
diff --git a/product/qcom-audio.mk b/product/qcom-audio.mk
new file mode 100644
index 0000000..f7b5fcc
--- /dev/null
+++ b/product/qcom-audio.mk
@@ -0,0 +1,20 @@
+# Audio
+PRODUCT_PACKAGES += \
+ audiod \
+ audio.primary.msm8916 \
+ libqcompostprocbundle \
+ libqcomvisualizer \
+ libqcomvoiceprocessing
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/audio/audio_effects.conf:system/vendor/etc/audio_effects.conf
+
+# Properties
+PRODUCT_PROPERTY_OVERRIDES += \
+ av.streaming.offload.enable=true \
+ audio.offload.buffer.size.kb=64 \
+ audio.offload.gapless.enabled=true \
+ audio.offload.min.duration.secs=30 \
+ audio.offload.pcm.16bit.enable=false \
+ audio.offload.pcm.24bit.enable=true \
+ use.voice.path.for.pcm.voip=true
diff --git a/product/qcom-bluetooth.mk b/product/qcom-bluetooth.mk
new file mode 100644
index 0000000..0d423b7
--- /dev/null
+++ b/product/qcom-bluetooth.mk
@@ -0,0 +1,12 @@
+# Init
+PRODUCT_PACKAGES += \
+ init.qcom.bt.sh
+
+# Permissions
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \
+ frameworks/native/data/etc/android.hardware.bluetooth_le.xml:system/etc/permissions/android.hardware.bluetooth_le.xml
+
+# Properties
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.qualcomm.bt.hci_transport=smd
diff --git a/product/qcom-cne.mk b/product/qcom-cne.mk
new file mode 100644
index 0000000..c33e912
--- /dev/null
+++ b/product/qcom-cne.mk
@@ -0,0 +1,8 @@
+# CNE
+PRODUCT_PACKAGES += \
+ libcnefeatureconfig
+
+ifeq ($(BOARD_USES_QCNE),true)
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.cne.feature=4
+endif
diff --git a/product/qcom-display.mk b/product/qcom-display.mk
new file mode 100644
index 0000000..ce64a90
--- /dev/null
+++ b/product/qcom-display.mk
@@ -0,0 +1,31 @@
+# Display
+PRODUCT_PACKAGES += \
+ copybit.msm8916 \
+ gralloc.msm8916 \
+ hwcomposer.msm8916 \
+ libtinyxml \
+ memtrack.msm8916
+
+# Permissions
+ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8939)
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.opengles.aep.xml:system/etc/permissions/android.hardware.opengles.aep.xml
+endif
+
+# Properties
+PRODUCT_PROPERTY_OVERRIDES += \
+ debug.composition.type=c2d \
+ debug.mdpcomp.idletime=600 \
+ persist.hwc.mdpcomp.enable=true \
+ persist.hwc.ptor.enable=true \
+ debug.enable.sglscale=1
+
+ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8916)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.opengles.version=196608
+else
+ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8939)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.opengles.version=196609
+endif
+endif
diff --git a/product/qcom-fm.mk b/product/qcom-fm.mk
new file mode 100644
index 0000000..bf92254
--- /dev/null
+++ b/product/qcom-fm.mk
@@ -0,0 +1,4 @@
+# FM
+PRODUCT_PACKAGES += \
+ FMRadio \
+ libfmjni
diff --git a/product/qcom-keystore.mk b/product/qcom-keystore.mk
new file mode 100644
index 0000000..df701fc
--- /dev/null
+++ b/product/qcom-keystore.mk
@@ -0,0 +1,5 @@
+# Keystore
+ifneq ($(TARGET_PROVIDES_KEYMASTER),true)
+PRODUCT_PACKAGES += \
+ keystore.msm8916
+endif
diff --git a/product/qcom-media.mk b/product/qcom-media.mk
new file mode 100644
index 0000000..68651fd
--- /dev/null
+++ b/product/qcom-media.mk
@@ -0,0 +1,24 @@
+# Media
+PRODUCT_PACKAGES += \
+ libextmedia_jni \
+ libOmxAacEnc \
+ libOmxAmrEnc \
+ libOmxCore \
+ libOmxEvrcEnc \
+ libOmxQcelp13Enc \
+ libOmxVdec \
+ libOmxVenc \
+ libstagefrighthw
+
+ifneq ($(QCPATH),)
+PRODUCT_PACKAGES += \
+ libOmxVdecHevc
+endif
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/configs/media_codecs_$(TARGET_BOARD_PLATFORM_VARIANT).xml:system/etc/media_codecs.xml
+
+# Properties
+PRODUCT_PROPERTY_OVERRIDES += \
+ drm.service.enabled=1 \
+ vidc.enc.narrow.searchrange=1
diff --git a/product/qcom-perf.mk b/product/qcom-perf.mk
new file mode 100644
index 0000000..ddccd6b
--- /dev/null
+++ b/product/qcom-perf.mk
@@ -0,0 +1,24 @@
+# IRQ balance
+ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8939)
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/configs/msm_irqbalance.conf:system/vendor/etc/msm_irqbalance.conf
+endif
+
+# Power HAL
+PRODUCT_PACKAGES += \
+ power.msm8916
+
+# Properties
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.vendor.extension_library=libqti-perfd-client.so
+
+ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8916)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.min_freq_0=800000
+else
+ifeq ($(TARGET_BOARD_PLATFORM_VARIANT),msm8939)
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.min_freq_0=960000 \
+ ro.min_freq_4=800000
+endif
+endif
diff --git a/product/qcom-radio.mk b/product/qcom-radio.mk
new file mode 100644
index 0000000..1b515b1
--- /dev/null
+++ b/product/qcom-radio.mk
@@ -0,0 +1,21 @@
+# IRSC
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/configs/sec_config:system/etc/sec_config
+
+# Permissions
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.telephony.gsm.xml:system/etc/permissions/android.hardware.telephony.gsm.xml \
+ frameworks/native/data/etc/android.hardware.telephony.cdma.xml:system/etc/permissions/android.hardware.telephony.cdma.xml \
+ frameworks/native/data/etc/android.software.sip.voip.xml:system/etc/permissions/android.software.sip.voip.xml
+
+# Properties
+PRODUCT_PROPERTY_OVERRIDES += \
+ persist.data.qmi.adb_logmask=0 \
+ persist.radio.apm_sim_not_pwdn=1 \
+ ro.telephony.call_ring.multiple=false \
+ ro.use_data_netmgrd=true
+
+# RIL
+PRODUCT_PACKAGES += \
+ librmnetctl \
+ libxml2
diff --git a/product/qcom-wifi.mk b/product/qcom-wifi.mk
new file mode 100644
index 0000000..185e96a
--- /dev/null
+++ b/product/qcom-wifi.mk
@@ -0,0 +1,29 @@
+# Permissions
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.wifi.direct.xml:system/etc/permissions/android.hardware.wifi.direct.xml \
+ frameworks/native/data/etc/android.hardware.wifi.xml:system/etc/permissions/android.hardware.wifi.xml
+
+# Properties
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.disableWifiApFirmwareReload=true \
+ wifi.interface=wlan0
+
+# Wifi
+PRODUCT_PACKAGES += \
+ libqsap_sdk \
+ libQWiFiSoftApCfg \
+ libwcnss_qmi \
+ wcnss_service
+
+PRODUCT_PACKAGES += \
+ hostapd \
+ dhcpcd.conf \
+ wpa_supplicant \
+ wpa_supplicant.conf
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/configs/hostapd.accept:system/etc/hostapd/hostapd.accept \
+ $(LOCAL_PATH)/configs/hostapd.conf:system/etc/hostapd/hostapd_default.conf \
+ $(LOCAL_PATH)/configs/hostapd.deny:system/etc/hostapd/hostapd.deny \
+ $(LOCAL_PATH)/configs/p2p_supplicant_overlay.conf:system/etc/wifi/p2p_supplicant_overlay.conf \
+ $(LOCAL_PATH)/configs/wpa_supplicant_overlay.conf:system/etc/wifi/wpa_supplicant_overlay.conf
diff --git a/product/recovery.mk b/product/recovery.mk
new file mode 100644
index 0000000..98605a7
--- /dev/null
+++ b/product/recovery.mk
@@ -0,0 +1,3 @@
+# Recovery
+PRODUCT_PACKAGES += \
+ librecovery_updater_cm
diff --git a/product/touchscreen.mk b/product/touchscreen.mk
new file mode 100644
index 0000000..9a5b3e6
--- /dev/null
+++ b/product/touchscreen.mk
@@ -0,0 +1,3 @@
+# Permissions
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.touchscreen.multitouch.jazzhand.xml:system/etc/permissions/android.hardware.touchscreen.multitouch.jazzhand.xml
diff --git a/product/usb.mk b/product/usb.mk
new file mode 100644
index 0000000..1da34fc
--- /dev/null
+++ b/product/usb.mk
@@ -0,0 +1,7 @@
+# Init scripts
+PRODUCT_PACKAGES += \
+ init.qcom.usb.rc
+
+# Permissions
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.usb.accessory.xml:system/etc/permissions/android.hardware.usb.accessory.xml
diff --git a/rootdir/Android.mk b/rootdir/Android.mk
index abb6ae7..8cd0b4f 100644
--- a/rootdir/Android.mk
+++ b/rootdir/Android.mk
@@ -28,6 +28,14 @@ LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
include $(BUILD_PREBUILT)
include $(CLEAR_VARS)
+LOCAL_MODULE := init.qcom.ssr.rc
+LOCAL_MODULE_TAGS := optional eng
+LOCAL_MODULE_CLASS := ETC
+LOCAL_SRC_FILES := etc/init.qcom.ssr.rc
+LOCAL_MODULE_PATH := $(TARGET_ROOT_OUT)
+include $(BUILD_PREBUILT)
+
+include $(CLEAR_VARS)
LOCAL_MODULE := init.qcom.usb.rc
LOCAL_MODULE_TAGS := optional eng
LOCAL_MODULE_CLASS := ETC
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
index 32ed76c..2b660c8 100644
--- a/rootdir/etc/init.qcom.rc
+++ b/rootdir/etc/init.qcom.rc
@@ -26,6 +26,7 @@
#
import init.qcom.power.rc
+import init.qcom.ssr.rc
import init.qcom.usb.rc
import init.target.rc
diff --git a/rootdir/etc/init.qcom.ssr.rc b/rootdir/etc/init.qcom.ssr.rc
new file mode 100644
index 0000000..b4f7838
--- /dev/null
+++ b/rootdir/etc/init.qcom.ssr.rc
@@ -0,0 +1,22 @@
+# Copyright (C) 2016 The CyanogenMod Project <http://www.cyanogenmod.org>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+on boot
+ # Subsystem Restart
+ # Venus
+ write /sys/bus/msm_subsys/devices/subsys0/restart_level "related"
+ # WCNSS
+ write /sys/bus/msm_subsys/devices/subsys1/restart_level "related"
+ # Modem
+ write /sys/bus/msm_subsys/devices/subsys2/restart_level "related"
diff --git a/system.prop b/system.prop
deleted file mode 100644
index 60db1c5..0000000
--- a/system.prop
+++ /dev/null
@@ -1,68 +0,0 @@
-# Art
-ro.sys.fw.dex2oat_thread_count=4
-
-# ActivityManager
-ro.config.max_starting_bg=8
-ro.sys.fw.use_trim_settings=true
-
-# Audio
-av.offload.enable=true
-av.streaming.offload.enable=true
-audio.offload.buffer.size.kb=64
-audio.offload.gapless.enabled=true
-audio.offload.min.duration.secs=30
-audio.offload.pcm.16bit.enable=false
-audio.offload.pcm.24bit.enable=true
-use.voice.path.for.pcm.voip=true
-vidc.enc.narrow.searchrange=1
-
-# Bluetooth
-ro.qualcomm.bt.hci_transport=smd
-
-# Display
-debug.composition.type=c2d
-debug.sf.gpu_comp_tiling=1
-debug.mdpcomp.idletime=600
-persist.hwc.mdpcomp.enable=true
-persist.hwc.ptor.enable=true
-debug.enable.sglscale=1
-
-# GPS
-persist.gps.qc_nlp_in_use=0
-ro.gps.agps_provider=1
-ro.qc.sdk.izat.premium.enabled=0
-ro.qc.sdk.izat.service_mask=0x0
-
-# Media
-mm.enable.smoothstreaming=true
-mm.disable.sec_smoothstreaming=true
-media.aac_51_output_enabled=true
-drm.service.enabled=1
-
-# NITZ
-persist.rild.nitz_plmn=
-persist.rild.nitz_long_ons_0=
-persist.rild.nitz_long_ons_1=
-persist.rild.nitz_long_ons_2=
-persist.rild.nitz_long_ons_3=
-persist.rild.nitz_short_ons_0=
-persist.rild.nitz_short_ons_1=
-persist.rild.nitz_short_ons_2=
-persist.rild.nitz_short_ons_3=
-
-# Perf
-ro.vendor.extension_library=libqti-perfd-client.so
-
-# Radio
-persist.data.qmi.adb_logmask=0
-persist.radio.apm_sim_not_pwdn=1
-rild.libargs=-d /dev/smd0
-ro.telephony.call_ring.multiple=false
-ro.use_data_netmgrd=true
-
-# Time
-persist.timed.enable=true
-
-# WiFi
-ro.disableWifiApFirmwareReload=true
-wifi.interface=wlan0