arm: Support qemu-android on generic arm targets

When building a generic arm 32-bit target, we also want to include
support for the ranchu board model for the updated Android emulator
based on recent upstream QEMU.

Since the emulator.mk file is included by both the generic and
generic_arm64 targets and already defines a PRODUCT_COPY_FILES and
PRODUCT_PACKAGES, move duplicate entries from
target/board/generic*/device.mk to target/product/emulator.mk.

Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Change-Id: I7922ec0c4097776a185dbb245301d760ff332386
diff --git a/target/board/generic/device.mk b/target/board/generic/device.mk
index 06a7d8a..e56a4d1 100644
--- a/target/board/generic/device.mk
+++ b/target/board/generic/device.mk
@@ -30,8 +30,3 @@
     frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \
     device/generic/goldfish/camera/media_codecs.xml:system/etc/media_codecs.xml \
     hardware/libhardware_legacy/audio/audio_policy.conf:system/etc/audio_policy.conf
-
-PRODUCT_PACKAGES := \
-    audio.primary.goldfish \
-    power.goldfish \
-    vibrator.goldfish
diff --git a/target/board/generic_arm64/device.mk b/target/board/generic_arm64/device.mk
index 62dfa1b..9647a4e 100644
--- a/target/board/generic_arm64/device.mk
+++ b/target/board/generic_arm64/device.mk
@@ -30,16 +30,6 @@
     frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \
     device/generic/goldfish/camera/media_codecs.xml:system/etc/media_codecs.xml
 
-# The ranchu configuration files are needed to run under qemu-android
-PRODUCT_COPY_FILES += $(call add-to-product-copy-files-if-exists,\
-    device/generic/goldfish/init.ranchu.rc:root/init.ranchu.rc \
-    device/generic/goldfish/fstab.ranchu:root/fstab.ranchu \
-    device/generic/goldfish/ueventd.ranchu.rc:root/ueventd.ranchu.rc)
-
-PRODUCT_PACKAGES := \
-    audio.primary.goldfish \
-    vibrator.goldfish
-
 # Adjust the Dalvik heap to be appropriate for a tablet.
 $(call inherit-product-if-exists, frameworks/base/build/tablet-dalvik-heap.mk)
 $(call inherit-product-if-exists, frameworks/native/build/tablet-dalvik-heap.mk)
diff --git a/target/product/emulator.mk b/target/product/emulator.mk
index 62099df..295dfac 100644
--- a/target/product/emulator.mk
+++ b/target/product/emulator.mk
@@ -41,11 +41,17 @@
     lights.goldfish \
     gps.goldfish \
     sensors.goldfish \
-    e2fsck
+    e2fsck \
+    audio.primary.goldfish \
+    vibrator.goldfish \
+    power.goldfish
 
 
 PRODUCT_COPY_FILES += \
     device/generic/goldfish/fstab.goldfish:root/fstab.goldfish \
     device/generic/goldfish/init.goldfish.rc:root/init.goldfish.rc \
     device/generic/goldfish/init.goldfish.sh:system/etc/init.goldfish.sh \
-    device/generic/goldfish/ueventd.goldfish.rc:root/ueventd.goldfish.rc
+    device/generic/goldfish/ueventd.goldfish.rc:root/ueventd.goldfish.rc \
+    device/generic/goldfish/init.ranchu.rc:root/init.ranchu.rc \
+    device/generic/goldfish/fstab.ranchu:root/fstab.ranchu \
+    device/generic/goldfish/ueventd.ranchu.rc:root/ueventd.ranchu.rc