Monday, June 13, 2011

Weekly Update

It's been a bit of a slow week since I was away for several days, but I did manage to make some noticeable progress. Below is a screenshot of android running on my modified mainline QEMU. It complains a lot, but it does boot. It is completely unusable and obviously still has issues, but it does boot.


To get it running yourself requires some modification of the code as I've not yet added a command line option for specifying the nand device. In hw/android_arm.c, lines 144 and 145 need to be modified to point to the system.img and userdata.img that you want to use.

Going forward
My priority for this week is to fix the remaining issues holding back a usable booted image and hopefully have an interactive set-up (with fixed graphics) available by the end of the week.

**Note: To get it booting you need the following command line options enabled as well:

-kernel kernel-qemu -initrd ramdisk.img -append "console=ttyS0" -serial stdio -M android_arm

Wednesday, June 8, 2011

Updated Schedule

For simplicity I created a Google calendar that will hold my schedule for the summer. I'll summarize the events as they stand at the bottom of this post, but the embedded calendar is probably easier to view, and I will update it if the plans need to be changed.

As a note, there are obviously places in the schedule that will continue to change as time goes on. The goal for the summer is to get to a point where it is usable for simple applications, and then add features in order of importance. As such, I've budgeted extra time than I think necessary for the main goal and I've taken an educated guess at how long the later features will take as I am less familiar with those systems. If it looks like my efforts will be better spent working on some other feature then I will shift my focus to that.



Goldfish Integration 6/6 - 6/19
Working on integrating the Goldfish hardware into mainline QEMU. Testing each module will be done as I go.

Goldfish Completion 6/27 - 7/3
Finishing Goldfish integration and more extensive testing if necessary. Putting together and submitting a patch set for all of the Goldfish components. This should bring the project to a bootable state, but will lack other features.

Networking Integration 7/11 - 7/17
Make changes if necessary to use the existing networking capabilities.

Telephony Integration 7/18 - 7/31
Integrating the telephony portions (gsm, sms, sim card).

GPS Integration 8/1 - 8/7
Merging the GPS capabilities.

Finishing Touches 8/8 - 8/21
Finishing up any remaining work. Putting together and submitting a final patch set if applicable.

Sunday, June 5, 2011

Weekly Update

Another week has finished and I finally have some verifiable results. I have ported various portions of the Goldfish hardware as well as the "android_arm" machine, and have managed to get output from the kernel routed to stdio. This will be incredibly useful for debugging purposes going forward. The changes are available on github with commit 1416f1a41bdfc813edd88bcd2b62b85ceae3d6ec (Link), which makes some necessary bugfixes to get the android_arm machine running.

The command line options necessary to view the kernel output are "-append "console=ttyS0" -serial stdio -M android_arm". Selecting the android_arm machine is necessary as it is not set as the default.

Compiler Warnings
As of this moment, the code I've merged generates several compiler warnings. As such, compilation needs to be done with -Werror disabled. They don't affect anything so I haven't been concerned about them yet, but I'll push some bugfixes soon to get rid of them soon, before it becomes a problem. EDIT: All fixed.

Moving Forward
Now that I have a better understanding of what's necessary for this project, my initial proposed schedule needs to be revised. I'm currently planning to focus on merging the rest of the Goldfish hardware next, but I will be posting a new schedule soon.

Saturday, June 4, 2011

Github

I've started using Github to host my repo on this project. I'm tracking the master branch of QEMU and my own "android" branch to hold all of my merges. More information can be found at the link below.

https://github.com/patricksjackson/qemu

Thursday, June 2, 2011

Debugging Output

The main goal for this week has been to get debugging output coming from the kernel. I first focused on the android-kmsg system, which involved merging over 'android/hw-kmsg.*' and 'charpipe.*', but that approach was incorrect. With further testing, I found that kernel output from the Android Emulator could be obtained even with bypassing that message passing system and instead utilizing the existing system in QEMU with the command line arguments "-append "console=ttyS0" -serial stdio", so those elements weren't needed at this time.

The needed elements for setting up correct outputs are contained in 'hw/goldfish_tty.c' and 'hw/goldfish_device.c'. After moving those files and including necessary dependencies, I added the needed initializing function calls into the init function for the arm machine and managed to get some output. As of now, however, I am only able to get the "Uncompressing Linux....done, booting the kernel." message and nothing else. This message does not show up without these changes, and uses the ported system to produce output, so I am on the right track, I'm just busy tracing through that system to see what I missed.

The patch can be found here, applied to mainline QEMU it will produce output when run with the below command. The files 'kernel-qemu' and 'ramdisk.img' can be found under platforms/android-[version]/images/ in the SDK after installing a version of the SDK Platform.

qemu-system-arm -kernel /path/to/kernel-qemu -initrd /path/to/ramdisk.img -append "console=ttyS0" -serial stdio

**Note: The option "-append "console=ttyS0"" does not affect the output at this time because it dictates to the kernel where to send it's messages and I'm not seeing those yet.