dragonboards: Move common device.mk configs to device-common.mk

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I8ec9dbd971d7d7590d0342ca3e8bc3ddaa116c9c
diff --git a/db845c/device.mk b/db845c/device.mk
index 502b0fe..9191713 100644
--- a/db845c/device.mk
+++ b/db845c/device.mk
@@ -14,9 +14,6 @@
 # limitations under the License.
 #
 
-PRODUCT_SOONG_NAMESPACES += \
-    device/linaro/dragonboard
-
 # setup dalvik vm configs
 $(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
 
@@ -52,17 +49,9 @@
     android.hardware.boot@1.2-impl.recovery \
     android.hardware.boot@1.2-service
 
-PRODUCT_PACKAGES += \
-    pd-mapper \
-    qrtr-ns \
-    qrtr-cfg \
-    qrtr-lookup \
-    rmtfs \
-    tqftpserv
-
+# Install script to set *.usb.controller properties
 PRODUCT_COPY_FILES += \
-    device/linaro/dragonboard/qcom/set_udc.sh:$(TARGET_COPY_OUT_VENDOR)/bin/set_udc.sh \
-    device/linaro/dragonboard/qcom/init.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.qcom.rc
+    device/linaro/dragonboard/qcom/set_udc.sh:$(TARGET_COPY_OUT_VENDOR)/bin/set_udc.sh
 
 # Install scripts to set Ethernet MAC address
 PRODUCT_COPY_FILES += \
diff --git a/device-common.mk b/device-common.mk
index dab2395..7459847 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -199,6 +199,18 @@
 PRODUCT_HOST_PACKAGES := \
     mkbootimg
 
+# Userspace vendor services for WiFi/Audio to work
+PRODUCT_PACKAGES += \
+    pd-mapper \
+    qrtr-ns \
+    qrtr-cfg \
+    qrtr-lookup \
+    rmtfs \
+    tqftpserv
+
+PRODUCT_COPY_FILES += \
+    $(LOCAL_PATH)/qcom/init.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.qcom.rc
+
 # Copy standard platform config files
 PRODUCT_COPY_FILES +=  \
     $(LOCAL_PATH)/ueventd.common.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
@@ -213,4 +225,6 @@
     frameworks/native/data/etc/android.software.opengles.deqp.level-2020-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml \
     frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml
 
-PRODUCT_SOONG_NAMESPACES += external/mesa3d
+PRODUCT_SOONG_NAMESPACES += \
+    device/linaro/dragonboard \
+    external/mesa3d
diff --git a/rb5/device.mk b/rb5/device.mk
index cab614f..9cf5124 100644
--- a/rb5/device.mk
+++ b/rb5/device.mk
@@ -14,9 +14,6 @@
 # limitations under the License.
 #
 
-PRODUCT_SOONG_NAMESPACES += \
-    device/linaro/dragonboard
-
 # setup dalvik vm configs
 $(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
 
@@ -49,17 +46,6 @@
     android.hardware.boot@1.2-impl.recovery \
     android.hardware.boot@1.2-service
 
-PRODUCT_PACKAGES += \
-    pd-mapper \
-    qrtr-ns \
-    qrtr-cfg \
-    qrtr-lookup \
-    rmtfs \
-    tqftpserv
-
-PRODUCT_COPY_FILES += \
-    device/linaro/dragonboard/qcom/init.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.qcom.rc
-
 PRODUCT_VENDOR_PROPERTIES += ro.soc.manufacturer=Qualcomm
 PRODUCT_VENDOR_PROPERTIES += ro.soc.model=QRB5165