diff options
-rw-r--r-- | android/main.c | 27 | ||||
-rw-r--r-- | target-arm/op_helper.c | 2 |
2 files changed, 26 insertions, 3 deletions
diff --git a/android/main.c b/android/main.c index 35f236f..1024ec2 100644 --- a/android/main.c +++ b/android/main.c @@ -2321,8 +2321,31 @@ int main(int argc, char **argv) n = 1; /* generate arguments for the underlying qemu main() */ - args[n++] = "-kernel"; - args[n++] = (char*) avdInfo_getImageFile(avd, AVD_IMAGE_KERNEL); + { + const char* kernelFile = avdInfo_getImageFile(avd, AVD_IMAGE_KERNEL); + int kernelFileLen = strlen(kernelFile); + + args[n++] = "-kernel"; + args[n++] = (char*)kernelFile; + + /* If the kernel image name ends in "-armv7", then change the cpu + * type automatically. This is a poor man's approach to configuration + * management, but should allow us to get past building ARMv7 + * system images with dex preopt pass without introducing too many + * changes to the emulator sources. + * + * XXX: + * A 'proper' change would require adding some sort of hardware-property + * to each AVD config file, then automatically determine its value for + * full Android builds (depending on some environment variable), plus + * some build system changes. I prefer not to do that for now for reasons + * of simplicity. + */ + if (kernelFileLen > 6 && !memcmp(kernelFile + kernelFileLen - 6, "-armv7", 6)) { + args[n++] = "-cpu"; + args[n++] = "cortex-a8"; + } + } args[n++] = "-initrd"; args[n++] = (char*) avdInfo_getImageFile(avd, AVD_IMAGE_RAMDISK); diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 64bab2b..05eb558 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -70,7 +70,7 @@ uint32_t HELPER(neon_tbl)(uint32_t ireg, uint32_t def, static void do_unaligned_access (target_ulong addr, int is_write, int is_user, void *retaddr); #define MMUSUFFIX _mmu -#define ALIGNED_ONLY 1 +//#define ALIGNED_ONLY 1 #define SHIFT 0 #include "softmmu_template.h" |