Monday, May 30, 2011

Weekly Update

Hindered once again by being sick (e.g. I slept 18 of the last 24 hours) I didn't get quite as much work done this week as I hoped for. Below I have outlined many of the elements of the Android Emulator that will need to be merged into mainline QEMU.

Essential Elements
All the goldfish hardware. Additionally this needs to be supported by new command line arguments to properly configure the new devices. The command line arguments will ideally be done by parsing the hardware configuration file for an Android Virtual Device (AVD) with a new command line argument (-android-hw ?) as opposed to manually configuring an AVD via the command line.

As far as I can tell, this is the only thing essential to booting an Android Image, as other elements, such as Networking and additional hardware sensors can be disabled. The CPU emulation in target-arm/ shouldn't need to be modified, as it runs off the standard ARM CPU.

Important Elements
Networking. The Android Emulator contains it's own heavily modified version of net.c and the slirp/ directory, as well as the addition directories telephony/ and proxy/ that don't exist in mainline QEMU. Without merging this, the booted Android Image would be pretty useless for most purposes. Because this code must be shared with the other target architectures (unless we set up a specific target-android build), and it contains a large number of changes to get it to work, merging the Networking portion may take up a significant amount of time.

Elements to Disable
There are several elements that need to be disabled for Android as they are not supported, i.e. migration and usb support. Additionally, there are several areas where code is disabled during an Android build that will have to be dealt with some other way since the current plan is to integrate it into the target-arm build.

The file 'aio.c' was modified with the addition of iolooper (a wrapper for select()) but I'm still not quite sure why. Iolooper is utilized in several other android files so it can be merged when necessary, though since it is only used in android specific areas it is a trivial merge.

There are several other areas where there were heavy changes made, such as in 'qemu-char' that I do not yet understand.

I still believe that the main high-level elements to be merged are only the goldfish hardware and the networking elements. In addition to these, there were a number of changes made to the helper subsystems that will be difficult to determine, and I'm sure that I'll end up viewing a lot of years old commits to separate upstream merges from necessary changes.

What worries me is the number of changes made for Android that are almost certainly incompatible with the other QEMU targets. This may necessitate a new 'target-android' build in mainline QEMU or there would be some possible performance degradation with a global 'android_guest' variable.

No comments:

Post a Comment