summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeun young Park <keunyoung@google.com>2013-02-25 17:31:44 -0800
committerkeunyoung <keunyoung@google.com>2013-03-05 15:06:28 -0800
commit4301610f5d4f81c69b62a2dae680ba0d11f59ad7 (patch)
tree621a924539f68a0965229b0fb50c923f42db6bad
parent39ee3985fc354634c9eef60e0de8e7f56a4f7e63 (diff)
downloadmini-emulator-armv7-a-neon-4301610f5d4f81c69b62a2dae680ba0d11f59ad7.tar.gz
initial work for pdk emulator
- basically follow mini_armv7a_neon with goldfish HALs - requires kernel update with fuse support (not updated yet!) - will re-use goldfish kernel, which means hardware name will be still be goldfish - init.mini....rc will be copied to init.goldfish.rc, and is based on init.goldfish.rc with addition for sdcard emulation Change-Id: I538e74fa9ff6f557aaf1b2ad1357500e0a4ea6ac
-rw-r--r--AndroidProducts.mk18
-rw-r--r--BoardConfig.mk13
-rw-r--r--egl.cfg1
-rw-r--r--init.mini-emulator-armv7-a-neon.rc105
-rw-r--r--mini_emulator_armv7a_neon.mk40
5 files changed, 177 insertions, 0 deletions
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
new file mode 100644
index 0000000..414c9be
--- /dev/null
+++ b/AndroidProducts.mk
@@ -0,0 +1,18 @@
+#
+# Copyright (C) 2013 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.
+#
+
+PRODUCT_MAKEFILES := \
+ $(LOCAL_DIR)/mini_emulator_armv7a_neon.mk
diff --git a/BoardConfig.mk b/BoardConfig.mk
new file mode 100644
index 0000000..2ed165a
--- /dev/null
+++ b/BoardConfig.mk
@@ -0,0 +1,13 @@
+# BoardConfig.mk
+#
+# Product-specific compile-time definitions.
+#
+
+# same sa mini-armv7-a-neon except HAL
+include device/generic/armv7-a-neon/BoardConfig.mk
+
+# Build OpenGLES emulation libraries
+BUILD_EMULATOR_OPENGL := true
+
+BOARD_EGL_CFG := device/generic/mini-emulator-armv7-a-neon/egl.cfg
+
diff --git a/egl.cfg b/egl.cfg
new file mode 100644
index 0000000..9d3f2dc
--- /dev/null
+++ b/egl.cfg
@@ -0,0 +1 @@
+0 0 emulation
diff --git a/init.mini-emulator-armv7-a-neon.rc b/init.mini-emulator-armv7-a-neon.rc
new file mode 100644
index 0000000..dd13303
--- /dev/null
+++ b/init.mini-emulator-armv7-a-neon.rc
@@ -0,0 +1,105 @@
+on init
+ # See storage config details at http://source.android.com/tech/storage/
+ mkdir /mnt/shell/emulated 0700 shell shell
+ mkdir /storage/emulated 0555 root root
+
+ export EXTERNAL_STORAGE /storage/emulated/legacy
+ export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
+ export EMULATED_STORAGE_TARGET /storage/emulated
+
+ # Support legacy paths
+ symlink /storage/emulated/legacy /sdcard
+ symlink /storage/emulated/legacy /mnt/sdcard
+ symlink /storage/emulated/legacy /storage/sdcard0
+ symlink /mnt/shell/emulated/0 /storage/emulated/legacy
+
+#on fs
+# setprop ro.crypto.umount_sd false
+
+on post-fs-data
+ mkdir /data/media 0770 media_rw media_rw
+ # Set indication (checked by vold) that we have finished this action
+ setprop vold.post_fs_data_done 1
+ # to force to start sdcard
+ class_start late_start
+
+on boot
+ setsebool in_qemu 1
+ restorecon /sys/qemu_trace/process_name
+ restorecon /sys/qemu_trace/state
+ restorecon /sys/qemu_trace/symbol
+ setprop ARGH ARGH
+ setprop net.eth0.gw 10.0.2.2
+ setprop net.eth0.dns1 10.0.2.3
+ setprop net.gprs.local-ip 10.0.2.15
+ setprop ro.radio.use-ppp no
+ setprop ro.build.product generic
+ setprop ro.product.device generic
+
+# fake some battery state
+ setprop status.battery.state Slow
+ setprop status.battery.level 5
+ setprop status.battery.level_raw 50
+ setprop status.battery.level_scale 9
+
+# disable some daemons the emulator doesn't want
+ stop dund
+ stop akmd
+
+# start essential services
+ start qemud
+ start goldfish-logcat
+ start goldfish-setup
+
+ setprop ro.setupwizard.mode EMULATOR
+
+# enable Google-specific location features,
+# like NetworkLocationProvider and LocationCollector
+ setprop ro.com.google.locationfeatures 1
+
+# For the emulator, which bypasses Setup Wizard, you can specify
+# account info for the device via these two properties. Google
+# Login Service will insert these accounts into the database when
+# it is created (ie, after a data wipe).
+#
+# setprop ro.config.hosted_account username@hosteddomain.org:password
+# setprop ro.config.google_account username@gmail.com:password
+#
+# You MUST have a Google account on the device, and you MAY
+# additionally have a hosted account. No other configuration is
+# supported, and arbitrary breakage may result if you specify
+# something else.
+
+service goldfish-setup /system/etc/init.goldfish.sh
+ user root
+ group root
+ oneshot
+
+# The qemu-props program is used to set various system
+# properties on boot. It must be run early during the boot
+# process to avoid race conditions with other daemons that
+# might read them (e.g. surface flinger), so define it in
+# class 'core'
+#
+service qemu-props /system/bin/qemu-props
+ class core
+ user root
+ group root
+ oneshot
+
+service qemud /system/bin/qemud
+ socket qemud stream 666
+ oneshot
+
+# -Q is a special logcat option that forces the
+# program to check wether it runs on the emulator
+# if it does, it redirects its output to the device
+# named by the androidboot.console kernel option
+# if not, is simply exits immediately
+
+service goldfish-logcat /system/bin/logcat -Q
+ oneshot
+
+# virtual sdcard daemon running as media_rw (1023)
+service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
+ class late_start
diff --git a/mini_emulator_armv7a_neon.mk b/mini_emulator_armv7a_neon.mk
new file mode 100644
index 0000000..563fef1
--- /dev/null
+++ b/mini_emulator_armv7a_neon.mk
@@ -0,0 +1,40 @@
+# Copyright (C) 2013 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.
+
+$(call inherit-product, device/generic/armv7-a-neon/mini_armv7a_neon.mk)
+
+PRODUCT_NAME := mini_emulator_armv7a_neon
+PRODUCT_DEVICE := mini-emulator-armv7-a-neon
+PRODUCT_BRAND := Android
+PRODUCT_MODEL := mini-emulator-armv7-a-neon
+
+# share the same goldfish kernel, but should have fuse support
+LOCAL_KERNEL := prebuilts/qemu-kernel/arm/kernel-qemu-armv7
+
+PRODUCT_PACKAGES += \
+ audio.primary.goldfish
+
+# media_profiles and media_codecs will be moved later!
+PRODUCT_COPY_FILES += \
+ $(LOCAL_KERNEL):kernel \
+ device/generic/mini-emulator-armv7-a-neon/init.mini-emulator-armv7-a-neon.rc:root/init.goldfish.rc \
+ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.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.camera.autofocus.xml:system/etc/permissions/android.hardware.camera.autofocus.xml \
+ frameworks/av/media/libeffects/data/audio_effects.conf:system/etc/audio_effects.conf \
+ hardware/libhardware_legacy/audio/audio_policy.conf:system/etc/audio_policy.conf \
+ $(call add-to-product-copy-files-if-exists,development/tools/emulator/system/camera/media_profiles.xml:system/etc/media_profiles.xml) \
+ $(call add-to-product-copy-files-if-exists,development/tools/emulator/system/camera/media_codecs.xml:system/etc/media_codecs.xml)
+
+