Factor out the sdm845 device configuration
Moved files around in a new shared/ folder. Renamed relevant
files and updated relative path. No feature changes.
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
[caleb: rebased on 734404a]
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
diff --git a/shared/device.mk b/shared/device.mk
new file mode 100644
index 0000000..015419e
--- /dev/null
+++ b/shared/device.mk
@@ -0,0 +1,223 @@
+#
+# Copyright (C) 2014 The Android Open-Source Project
+#
+# 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.
+#
+
+# copied from crosshatch
+# setup dalvik vm configs
+$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
+
+# Enable updating of APEXes
+$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
+
+# Device overlay
+DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay
+
+# Build and run only ART
+PRODUCT_RUNTIMES := runtime_libart_default
+
+PRODUCT_SHIPPING_API_LEVEL := 29
+PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false
+
+# Enable Scoped Storage related
+$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
+
+# vndk
+PRODUCT_PACKAGES := vndk-sp
+
+# HACK: Avoid usb crash
+PRODUCT_PRODUCT_PROPERTIES := \
+ persist.adb.nonblocking_ffs=0 \
+ ro.adb.nonblocking_ffs=0
+
+# Display
+PRODUCT_PACKAGES += \
+ android.hardware.drm@1.0-impl \
+ android.hardware.drm@1.0-service \
+ libGLES_mesa
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.hardware.gralloc=minigbm_msm \
+ ro.hardware.hwcomposer=drm \
+ debug.sf.no_hw_vsync=1 \
+ ro.sf.lcd_density=400 \
+ ro.opengles.version=196609
+
+#
+# Hardware Composer HAL
+#
+PRODUCT_PACKAGES += \
+ hwcomposer.drm \
+ android.hardware.graphics.composer@2.3-impl \
+ android.hardware.graphics.composer@2.3-service
+
+#
+# Gralloc HAL
+#
+PRODUCT_PACKAGES += \
+ gralloc.minigbm_msm \
+ android.hardware.graphics.allocator@4.0-service.minigbm_msm \
+ android.hardware.graphics.mapper@4.0-impl.minigbm_msm
+
+# Use Launcher3QuickStep
+PRODUCT_PACKAGES += Launcher3QuickStep
+
+# Enable WiFi
+PRODUCT_PACKAGES += \
+ hostapd \
+ libwpa_client \
+ wpa_supplicant \
+ wpa_supplicant.conf \
+ wificond
+
+PRODUCT_PACKAGES += \
+ pd-mapper \
+ qrtr-ns \
+ qrtr-cfg \
+ qrtr-lookup \
+ rmtfs \
+ tqftpserv
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/vendor/init.vendor.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.vendor.rc
+
+# Install scripts to set consistent Wifi MAC address
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/bin/set_wlan_mac.rc:/system/etc/init/set_wlan_mac.rc \
+ $(LOCAL_PATH)/bin/set_wlan_mac.sh:/system/bin/set_wlan_mac.sh
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ wifi.interface=wlan0 \
+ wifi.supplicant_scan_interval=15
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
+ frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
+ $(LOCAL_PATH)/etc/wifi/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
+ $(LOCAL_PATH)/etc/wifi/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf
+
+# Enable BT
+PRODUCT_PACKAGES += \
+ android.hardware.bluetooth@1.1-service.btlinux
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
+ frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml
+
+# Audio
+PRODUCT_PACKAGES += \
+ android.hardware.audio.service \
+ android.hardware.audio@7.0-impl \
+ android.hardware.audio.effect@7.0-impl \
+ android.hardware.soundtrigger@2.2-impl \
+ android.hardware.bluetooth.audio@2.0-impl
+
+# Build default bluetooth a2dp and usb audio HALs
+PRODUCT_PACKAGES += \
+ audio.a2dp.default \
+ audio.bluetooth.default \
+ audio.usb.default \
+ audio.r_submix.default
+
+# Build tinyalsa cli tools for debugging
+PRODUCT_PACKAGES += \
+ tinyplay2 \
+ tinycap2 \
+ tinymix2 \
+ tinypcminfo2
+
+# audio policy configuration
+USE_XML_AUDIO_POLICY_CONF := 1
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/etc/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
+ $(LOCAL_PATH)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \
+ $(LOCAL_PATH)/etc/public.libraries.txt:$(TARGET_COPY_OUT_VENDOR)/etc/public.libraries.txt \
+ frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/primary_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
+ frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml
+
+# Copy media codecs config file
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/etc/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
+ frameworks/av/media/libeffects/data/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/seccomp_policy/mediaswcodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
+ $(LOCAL_PATH)/seccomp_policy/mediaswcodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaswcodec.policy \
+ $(LOCAL_PATH)/seccomp_policy/mediaextractor.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaextractor.policy \
+
+# Copy hardware config file(s)
+PRODUCT_COPY_FILES += \
+ device/linaro/dragonboard/etc/permissions/android.software.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.xml
+
+# Memtrack
+# PRODUCT_PACKAGES += \
+# memtrack.default \
+# android.hardware.memtrack@1.0-service \
+# android.hardware.memtrack@1.0-impl
+
+# Keymaster
+PRODUCT_PACKAGES += \
+ android.hardware.keymaster@3.0-impl \
+ android.hardware.keymaster@3.0-service
+
+# Gatekeeper
+PRODUCT_PACKAGES += \
+ android.hardware.gatekeeper@1.0-service.software
+
+# Health
+PRODUCT_PACKAGES += \
+ android.hardware.health@2.1-service \
+ android.hardware.health@2.1-impl-sdm845
+
+
+# mkbootimg host tool to build boot.img separately
+PRODUCT_HOST_PACKAGES := \
+ mkbootimg
+
+# Lights
+PRODUCT_PACKAGES += \
+ android.hardware.light@2.0-impl \
+ android.hardware.light@2.0-service
+
+# Haptics
+PRODUCT_PACKAGES += \
+ android.hardware.vibrator@1.1-service.ff
+
+# Copy standard platform config files
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/ueventd.common.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
+ frameworks/native/data/etc/android.software.cts.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.cts.xml \
+ frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
+ frameworks/native/data/etc/android.software.backup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.backup.xml \
+ frameworks/native/data/etc/android.software.voice_recognizers.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.voice_recognizers.xml \
+ frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
+ frameworks/native/data/etc/android.software.print.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.print.xml \
+ frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
+ frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
+ frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml
+
+# Copy firmware files
+$(call inherit-product-if-exists, $(LOCAL_PATH)/firmware/device.mk)
+
+PRODUCT_SOONG_NAMESPACES += \
+ device/generic/sdm845 \
+ external/mesa3d