aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Chtchetkine <vchtchetkine@google.com>2011-09-28 09:19:09 -0700
committerVladimir Chtchetkine <vchtchetkine@google.com>2011-09-28 10:45:14 -0700
commit7ae4139bbecc44a9d4210fde9de25f9acc1feff7 (patch)
tree2c8083ff16aed8d1761220716625d3c664b5e134
parent4990431dfab2f2573ec4ddd97cf656a674ca9d07 (diff)
downloadexternal_qemu-7ae4139bbecc44a9d4210fde9de25f9acc1feff7.zip
external_qemu-7ae4139bbecc44a9d4210fde9de25f9acc1feff7.tar.gz
external_qemu-7ae4139bbecc44a9d4210fde9de25f9acc1feff7.tar.bz2
Merge from 33f89d0 on master. Do not merge.
Fix CPU architecture reported in HW config Change-Id: I2d31168ca05e1214df708fd107143fa4908e2889
-rw-r--r--android/main.c11
-rw-r--r--vl-android.c2
2 files changed, 12 insertions, 1 deletions
diff --git a/android/main.c b/android/main.c
index c2f8663..56ae698 100644
--- a/android/main.c
+++ b/android/main.c
@@ -455,6 +455,17 @@ int main(int argc, char **argv)
opts->trace = tracePath;
}
+ /* Update CPU architecture for HW configs created from build dir. */
+ if (inAndroidBuild) {
+#if defined(TARGET_ARM)
+ free(android_hw->hw_cpu_arch);
+ android_hw->hw_cpu_arch = ASTRDUP("arm");
+#elif defined(TARGET_I386)
+ free(android_hw->hw_cpu_arch);
+ android_hw->hw_cpu_arch = ASTRDUP("x86");
+#endif
+ }
+
n = 1;
/* generate arguments for the underlying qemu main() */
{
diff --git a/vl-android.c b/vl-android.c
index f0b2ae8..a0041dc 100644
--- a/vl-android.c
+++ b/vl-android.c
@@ -4169,7 +4169,7 @@ int main(int argc, char **argv, char **envp)
android_hw->hw_cpu_arch);
exit(1);
}
-#elif defined(TARGET_X86)
+#elif defined(TARGET_I386)
if (strcmp(android_hw->hw_cpu_arch,"x86") != 0) {
fprintf(stderr, "-- Invalid CPU architecture: %s, expected 'x86'\n",
android_hw->hw_cpu_arch);