aboutsummaryrefslogtreecommitdiffstats
path: root/android
diff options
context:
space:
mode:
authorJun Nakajima <jnakajim@gmail.com>2011-02-02 23:49:59 -0800
committerJun Nakajima <jnakajim@gmail.com>2011-02-02 23:49:59 -0800
commit334ab475d2f27dbf6fbf836c2d4fb86dbb02a15c (patch)
tree31739daf9666b860cac11a6af58ec7d0cfb59bd4 /android
parent65842c595f20efb0522fe3684716388bc1e87477 (diff)
downloadexternal_qemu-334ab475d2f27dbf6fbf836c2d4fb86dbb02a15c.zip
external_qemu-334ab475d2f27dbf6fbf836c2d4fb86dbb02a15c.tar.gz
external_qemu-334ab475d2f27dbf6fbf836c2d4fb86dbb02a15c.tar.bz2
x86: Add x86 support. Rebase the change (20906/1) due to a minor conflict.
Change-Id: Ic73cca0fc6c6e5cf74f63daa6080d00aa7c392bb Signed-off-by: Xiaohui Xin <xiaohui.xin@intel.com> Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Diffstat (limited to 'android')
-rw-r--r--android/avd/info.c5
-rw-r--r--android/build/common.sh5
-rw-r--r--android/config/config.h15
-rw-r--r--android/hw-qemud.c6
-rw-r--r--android/main.c8
5 files changed, 34 insertions, 5 deletions
diff --git a/android/avd/info.c b/android/avd/info.c
index d620b83..3d91a30 100644
--- a/android/avd/info.c
+++ b/android/avd/info.c
@@ -1190,7 +1190,12 @@ _getBuildImagePaths( AvdInfo* i, AvdInfoParams* params )
if ( !imageLoader_load( l, IMAGE_OPTIONAL |
IMAGE_DONT_LOCK ) )
{
+#ifdef TARGET_ARM
#define PREBUILT_KERNEL_PATH "prebuilt/android-arm/kernel/kernel-qemu"
+#endif
+#ifdef TARGET_I386
+#define PREBUILT_KERNEL_PATH "prebuilt/android-x86/kernel/kernel-qemu"
+#endif
p = bufprint(temp, end, "%s/%s", i->androidBuildRoot,
PREBUILT_KERNEL_PATH);
if (p >= end || !path_exists(temp)) {
diff --git a/android/build/common.sh b/android/build/common.sh
index b053b97..2f44d70 100644
--- a/android/build/common.sh
+++ b/android/build/common.sh
@@ -553,7 +553,12 @@ create_config_mk ()
add_android_config_mk ()
{
echo "" >> $config_mk
+ if [ $TARGET_ARCH = arm ] ; then
echo "TARGET_ARCH := arm" >> $config_mk
+ fi
+ if [ $TARGET_ARCH = x86 ] ; then
+ echo "TARGET_ARCH := x86" >> $config_mk
+ fi
echo "HOST_PREBUILT_TAG := $HOST_TAG" >> $config_mk
echo "PREBUILT := $ANDROID_PREBUILT" >> $config_mk
}
diff --git a/android/config/config.h b/android/config/config.h
index 7ceac69..fdfbe31 100644
--- a/android/config/config.h
+++ b/android/config/config.h
@@ -1,16 +1,23 @@
/* Automatically generated by configure - do not modify */
#include "config-host.h"
-#define CONFIG_QEMU_PREFIX "/usr/gnemul/qemu-arm"
-#define TARGET_ARCH "arm"
-#define TARGET_ARM 1
+
#define TARGET_PHYS_ADDR_BITS 32
#define CONFIG_TRACE 1
#define CONFIG_NAND 1
#define CONFIG_SHAPER 1
#define CONFIG_SOFTMMU 1
-#define CONFIG_SOFTFLOAT 1
#define CONFIG_SDL 1
#ifndef _WIN32
#define CONFIG_NAND_LIMITS 1
#endif
#define CONFIG_ANDROID_SNAPSHOTS 1
+
+#ifdef ARCH_FLAGS_x86
+#define TARGET_ARCH "x86"
+#define TARGET_I386 1
+#else
+#define TARGET_ARCH "arm"
+#define TARGET_ARM 1
+#define CONFIG_SOFTFLOAT 1
+#endif
+
diff --git a/android/hw-qemud.c b/android/hw-qemud.c
index 8f92bcd..e1cd119 100644
--- a/android/hw-qemud.c
+++ b/android/hw-qemud.c
@@ -50,8 +50,12 @@
* talking to a legacy qemud daemon. See docs/ANDROID-QEMUD.TXT
* for details.
*/
+#ifdef TARGET_ARM
#define SUPPORT_LEGACY_QEMUD 1
-
+#endif
+#ifdef TARGET_I386
+#define SUPPORT_LEGACY_QEMUD 0 /* no legacy support */
+#endif
#if SUPPORT_LEGACY_QEMUD
#include "telephony/android_modem.h"
#include "telephony/modem_driver.h"
diff --git a/android/main.c b/android/main.c
index e38c0e3..32f4143 100644
--- a/android/main.c
+++ b/android/main.c
@@ -56,6 +56,11 @@
#include "android/framebuffer.h"
#include "iolooper.h"
+#ifdef TARGET_I386
+nand_threshold android_nand_read_threshold;
+nand_threshold android_nand_write_threshold;
+#endif
+
AndroidRotation android_framebuffer_rotation;
#define STRINGIFY(x) _STRINGIFY(x)
@@ -1119,6 +1124,9 @@ int main(int argc, char **argv)
char *p = params, *end = p + sizeof(params);
p = bufprint(p, end, "qemu=1 console=ttyS0" );
+#ifdef TARGET_I386
+ p = bufprint(p, end, " androidboot.hardware=goldfish");
+#endif
if (opts->shell || opts->logcat) {
p = bufprint(p, end, " androidboot.console=ttyS%d", shell_serial );