OSDN Git Service

Initial porting of OPENTHOS emulator
authorChih-Wei Huang <cwhuang@linux.org.tw>
Sat, 30 Sep 2017 10:30:01 +0000 (18:30 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Sat, 30 Sep 2017 10:30:01 +0000 (18:30 +0800)
20 files changed:
AndroidProducts.mk [new file with mode: 0644]
common/device.mk [new file with mode: 0644]
common/emu.mk [new file with mode: 0644]
common/emu32.mk [new file with mode: 0644]
common/emu64.mk [new file with mode: 0644]
common/overlay/frameworks/base/core/res/res/values/config.xml [new file with mode: 0644]
common/packages.mk [new file with mode: 0644]
emu_arm/BoardConfig.mk [new file with mode: 0644]
emu_arm/openthos_emu_arm.mk [new file with mode: 0644]
emu_arm64/BoardConfig.mk [new file with mode: 0644]
emu_arm64/openthos_emu_arm64.mk [new file with mode: 0644]
emu_mips/BoardConfig.mk [new file with mode: 0644]
emu_mips/openthos_emu_mips.mk [new file with mode: 0644]
emu_mips64/BoardConfig.mk [new file with mode: 0644]
emu_mips64/openthos_emu_mips64.mk [new file with mode: 0644]
emu_x86/BoardConfig.mk [new file with mode: 0644]
emu_x86/openthos_emu_x86.mk [new file with mode: 0644]
emu_x86_64/BoardConfig.mk [new file with mode: 0644]
emu_x86_64/openthos_emu_x86_64.mk [new file with mode: 0644]
vendorsetup.sh [new file with mode: 0644]

diff --git a/AndroidProducts.mk b/AndroidProducts.mk
new file mode 100644 (file)
index 0000000..35a2c19
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2017 The Android-x86 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)/emu_arm/openthos_emu_arm.mk \
+    $(LOCAL_DIR)/emu_arm64/openthos_emu_arm64.mk \
+    $(LOCAL_DIR)/emu_mips/openthos_emu_mips.mk \
+    $(LOCAL_DIR)/emu_mips64/openthos_emu_mips64.mk \
+    $(LOCAL_DIR)/emu_x86/openthos_emu_x86.mk \
+    $(LOCAL_DIR)/emu_x86_64/openthos_emu_x86_64.mk \
diff --git a/common/device.mk b/common/device.mk
new file mode 100644 (file)
index 0000000..188753e
--- /dev/null
@@ -0,0 +1,42 @@
+#
+# Copyright (C) 2017 The Android-x86 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_DIR := $(dir $(lastword $(filter-out device/common/%,$(filter device/%,$(ALL_PRODUCTS)))))
+
+PRODUCT_PROPERTY_OVERRIDES := \
+    media.sf.hwaccel=1 \
+    media.sf.omx-plugin=libffmpeg_omx.so \
+    media.sf.extractor-plugin=libffmpeg_extractor.so
+
+PRODUCT_DEFAULT_PROPERTY_OVERRIDES := \
+    persist.rtc_local_time=1 \
+
+PRODUCT_COPY_FILES := \
+    $(if $(wildcard $(PRODUCT_DIR)init.rc),$(PRODUCT_DIR)init.rc:root/init.rc) \
+    frameworks/native/data/etc/android.software.freeform_window_management.xml:system/etc/permissions/android.software.freeform_window_management.xml \
+
+PRODUCT_CHARACTERISTICS := tablet
+
+DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay device/generic/common/overlay
+
+# Get tablet dalvik parameters
+$(call inherit-product,frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
+
+# Get GMS
+$(call inherit-product-if-exists,vendor/google/products/gms.mk)
+
+# Get native bridge settings
+$(if $(filter-out false,$(HOUDINI_PREINSTALL)),$(call inherit-product,device/generic/common/nativebridge/nativebridge.mk))
diff --git a/common/emu.mk b/common/emu.mk
new file mode 100644 (file)
index 0000000..8acdca8
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2017 The Android-x86 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.
+#
+
+# AOSP emulator images build the AOSP messaging app.
+PRODUCT_PACKAGES := \
+    messaging \
+
+PRODUCT_COPY_FILES := \
+    development/sys-img/advancedFeatures.ini:advancedFeatures.ini \
+    device/generic/goldfish/data/etc/encryptionkey.img:encryptionkey.img \
+    prebuilts/qemu-kernel/$(subst openthos_emu_,,$(TARGET_PRODUCT))/3.18/kernel-qemu2:kernel-ranchu \
+
+$(call inherit-product,$(LOCAL_PATH)/device.mk)
+$(call inherit-product,$(LOCAL_PATH)/packages.mk)
+$(call inherit-product,$(SRC_TARGET_DIR)/product/sdk_base.mk)
diff --git a/common/emu32.mk b/common/emu32.mk
new file mode 100644 (file)
index 0000000..3a65c01
--- /dev/null
@@ -0,0 +1,20 @@
+#
+# Copyright (C) 2017 The Android-x86 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_PROPERTY_OVERRIDES := \
+    rild.libpath=/vendor/lib/libreference-ril.so \
+
+$(call inherit-product,$(LOCAL_PATH)/emu.mk)
diff --git a/common/emu64.mk b/common/emu64.mk
new file mode 100644 (file)
index 0000000..f75761b
--- /dev/null
@@ -0,0 +1,21 @@
+#
+# Copyright (C) 2017 The Android-x86 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_PROPERTY_OVERRIDES := \
+    rild.libpath=/vendor/lib64/libreference-ril.so \
+
+$(call inherit-product,$(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product,$(LOCAL_PATH)/emu.mk)
diff --git a/common/overlay/frameworks/base/core/res/res/values/config.xml b/common/overlay/frameworks/base/core/res/res/values/config.xml
new file mode 100644 (file)
index 0000000..9a06c43
--- /dev/null
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+/*
+** Copyright 2017, The Android-x86 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.
+*/
+-->
+
+<!-- These resources are around just to allow their values to be customized
+     for different hardware and product builds. -->
+<resources>
+    <!-- Flag indicating that this device does not rotate and will always remain in its default
+         orientation. Activities that desire to run in a non-compatible orientation will be run
+         from an emulated display within the physical display. -->
+    <bool name="config_forceDefaultOrientation">false</bool>
+</resources>
diff --git a/common/packages.mk b/common/packages.mk
new file mode 100644 (file)
index 0000000..c273626
--- /dev/null
@@ -0,0 +1,31 @@
+#
+# Copyright (C) 2017 The Android-x86 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.
+#
+
+# Common packages for OPENTHOS platform.
+
+PRODUCT_PACKAGES := \
+    AnalyticsService \
+    Eleven \
+    PinyinIME \
+    Provision \
+    RSSReader \
+    Taskbar \
+
+# Stagefright FFMPEG plugins
+PRODUCT_PACKAGES += \
+    libffmpeg_extractor \
+    libffmpeg_omx \
+    media_codecs_ffmpeg.xml
diff --git a/emu_arm/BoardConfig.mk b/emu_arm/BoardConfig.mk
new file mode 100644 (file)
index 0000000..276bfcc
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# Product-specific compile-time definitions.
+#
+
+include $(SRC_TARGET_DIR)/board/generic/BoardConfig.mk
diff --git a/emu_arm/openthos_emu_arm.mk b/emu_arm/openthos_emu_arm.mk
new file mode 100644 (file)
index 0000000..511ee8b
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2017 The Android-x86 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,$(LOCAL_PATH)/../common/emu32.mk)
+
+# Overrides
+PRODUCT_NAME := openthos_emu_arm
+PRODUCT_BRAND := OPENTHOS
+PRODUCT_DEVICE := emu_arm
+PRODUCT_MODEL := Generic OPENTHOS Emulator arm
diff --git a/emu_arm64/BoardConfig.mk b/emu_arm64/BoardConfig.mk
new file mode 100644 (file)
index 0000000..c67d61f
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# Product-specific compile-time definitions.
+#
+
+include $(SRC_TARGET_DIR)/board/generic_arm64/BoardConfig.mk
diff --git a/emu_arm64/openthos_emu_arm64.mk b/emu_arm64/openthos_emu_arm64.mk
new file mode 100644 (file)
index 0000000..4044129
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2017 The Android-x86 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,$(LOCAL_PATH)/../common/emu64.mk)
+
+# Overrides
+PRODUCT_NAME := openthos_emu_arm64
+PRODUCT_BRAND := OPENTHOS
+PRODUCT_DEVICE := emu_arm64
+PRODUCT_MODEL := Generic OPENTHOS Emulator arm64
diff --git a/emu_mips/BoardConfig.mk b/emu_mips/BoardConfig.mk
new file mode 100644 (file)
index 0000000..334dd1c
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# Product-specific compile-time definitions.
+#
+
+include $(SRC_TARGET_DIR)/board/generic_mips/BoardConfig.mk
diff --git a/emu_mips/openthos_emu_mips.mk b/emu_mips/openthos_emu_mips.mk
new file mode 100644 (file)
index 0000000..7b748d3
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2017 The Android-x86 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,$(LOCAL_PATH)/../common/emu32.mk)
+
+# Overrides
+PRODUCT_NAME := openthos_emu_mips
+PRODUCT_BRAND := OPENTHOS
+PRODUCT_DEVICE := emu_mips
+PRODUCT_MODEL := Generic OPENTHOS Emulator mips
diff --git a/emu_mips64/BoardConfig.mk b/emu_mips64/BoardConfig.mk
new file mode 100644 (file)
index 0000000..31cb6ae
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# Product-specific compile-time definitions.
+#
+
+include $(SRC_TARGET_DIR)/board/generic_mips64/BoardConfig.mk
diff --git a/emu_mips64/openthos_emu_mips64.mk b/emu_mips64/openthos_emu_mips64.mk
new file mode 100644 (file)
index 0000000..b846183
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2017 The Android-x86 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,$(LOCAL_PATH)/../common/emu64.mk)
+
+# Overrides
+PRODUCT_NAME := openthos_emu_mips64
+PRODUCT_BRAND := OPENTHOS
+PRODUCT_DEVICE := emu_mips64
+PRODUCT_MODEL := Generic OPENTHOS Emulator mips64
diff --git a/emu_x86/BoardConfig.mk b/emu_x86/BoardConfig.mk
new file mode 100644 (file)
index 0000000..1ddd568
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# Product-specific compile-time definitions.
+#
+
+include $(SRC_TARGET_DIR)/board/generic_x86/BoardConfig.mk
diff --git a/emu_x86/openthos_emu_x86.mk b/emu_x86/openthos_emu_x86.mk
new file mode 100644 (file)
index 0000000..5143021
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2017 The Android-x86 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,$(LOCAL_PATH)/../common/emu32.mk)
+
+# Overrides
+PRODUCT_NAME := openthos_emu_x86
+PRODUCT_BRAND := OPENTHOS
+PRODUCT_DEVICE := emu_x86
+PRODUCT_MODEL := Generic OPENTHOS Emulator x86
diff --git a/emu_x86_64/BoardConfig.mk b/emu_x86_64/BoardConfig.mk
new file mode 100644 (file)
index 0000000..17b97c4
--- /dev/null
@@ -0,0 +1,5 @@
+#
+# Product-specific compile-time definitions.
+#
+
+include $(SRC_TARGET_DIR)/board/generic_x86_64/BoardConfig.mk
diff --git a/emu_x86_64/openthos_emu_x86_64.mk b/emu_x86_64/openthos_emu_x86_64.mk
new file mode 100644 (file)
index 0000000..cb39813
--- /dev/null
@@ -0,0 +1,23 @@
+#
+# Copyright (C) 2017 The Android-x86 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,$(LOCAL_PATH)/../common/emu64.mk)
+
+# Overrides
+PRODUCT_NAME := openthos_emu_x86_64
+PRODUCT_BRAND := OPENTHOS
+PRODUCT_DEVICE := emu_x86_64
+PRODUCT_MODEL := Generic OPENTHOS Emulator x86_64
diff --git a/vendorsetup.sh b/vendorsetup.sh
new file mode 100644 (file)
index 0000000..2cd555c
--- /dev/null
@@ -0,0 +1,28 @@
+#
+# Copyright (C) 2017 The Android-x86 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.
+#
+
+# This file is executed by build/envsetup.sh, and can use anything
+# defined in envsetup.sh.
+#
+# In particular, you can add lunch options with the add_lunch_combo
+# function: add_lunch_combo generic-eng
+
+add_lunch_combo openthos_emu_arm-eng
+add_lunch_combo openthos_emu_arm64-eng
+add_lunch_combo openthos_emu_mips-eng
+add_lunch_combo openthos_emu_mips64-eng
+add_lunch_combo openthos_emu_x86-eng
+add_lunch_combo openthos_emu_x86_64-eng