Anyone using an emulator other than QEMU for testing native ARMv7 code?

2,334 views
Skip to first unread message

Onur Cinar

unread,
Jul 15, 2010, 2:45:40 PM7/15/10
to andro...@googlegroups.com

Hi,

We are working on setting up an automated test system for testing our native code. Since permanently connecting a real Android device to a computer seems like a overkill, we are thinking about using the Emulator as much as we can for the automated testing.  However, our native code has some Cortex-A8 optimized code, which won't run within the emulator.   Based on the command line arguments for QEMU, it seems like QEMU at least knows about Cortex-A8, but turning that on prevents the Android OS to boot.

$ ./emulator -avd Android22 -qemu -cpu ?
Available CPUs:
  ...
  cortex-a8
  ...

We tried taking out the firmware from one of the real Android devices, and then substituting the Emulator's firmware to get QEMU Cortex-A8 emulation to run Android OS, but that didn't work either.

I was wondering if anyone already got that working, or do you think there is any possibility?  If QEMU is the actual issue, does anyone tried running the Android OS within an other Emulator such as through ARM RVDS.

Regards,

-onur






---
www.zdo.com

David Turner

unread,
Jul 15, 2010, 7:33:57 PM7/15/10
to andro...@googlegroups.com
Ok, here's the deal on ARMv7 emulation: it is buggy for reason we haven't determined yet.

You can test that, but you will need the following:

- first, an ARMv7-capable kernel image, it's name must end in "-armv7"
- second, an ARMv7 system image
- third, launch the emulator with "emulator -kernel /path/to/your-kernel-armv7 <other-options>

The -armv7 suffix on the kernel image is used as a trick to toggle emulation of a Cortex-A8 (it really only adds -qemu -cpu cortex-a8 to the command line sent internally to qemu).
You can search for "armv7" in external/qemu/android/main.c to see what I mean.

Instructions to rebuild the kernel from sources are the same than external/qemu/docs/KERNEL.TXT
except that you must select the "goldfish_armv7_defconfig" configuration instead.

There are very subtle ARMv7 emulation bugs that prevent us from running the ARMv7 system images we currently build in the emulator.
We tracked a very nasty bug in the ITSTATE CPU state emulation, but there are also other stuff dangling, hence the reason why this is
not officially supported at the moment.

Hope this helps.


--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To post to this group, send email to andro...@googlegroups.com.
To unsubscribe from this group, send email to android-ndk...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-ndk?hl=en.

Onur Cinar

unread,
Jul 15, 2010, 7:42:18 PM7/15/10
to andro...@googlegroups.com

Hi David,

Thank you so much for your detailed response. I appreciate that. Based on the steps that you described, we will move forward. Hopefully we won't run into those ARMv7 emulation problems within our optimized code as well.

Regards,

-onur
---
www.zdo.com

Reply all
Reply to author
Forward
0 new messages