Sunday, 1 August 2010

Axdroid Update

Wow, it's been over a month, I think it's about time I put up a new build!

Axdroid Rocking Out!

Changes since the last build:
  • I rewrote my build scripts. Doesn't mean much to you as a user, although the initial hit on the startup time is much reduced now. Dalvik still has to do it's thing and compile everything the first time you boot, but there's no more copying files around.
  • Minor changes/tweaks that might help speed things up a little.
  • You should no longer need to enable mirror mode before booting :)
  • In theory, the LCD should be detected and VGA or QVGA setup as appropriate. That means this build should work on any of X50/X50v/X51/X51v. Though bear in mind that I only own an X51v so that's all it's been tested on.
  • Audio support! I finally figured out the audio setup, and it's quite happily playing me some Paramore :) Headphones do work with the kernel code, but I haven't written the jack detect code yet and I don't think Android provides any manual way to use headphones. So basically: speaker only for now.
So, get it here. It's as simple to run as it can get, drop the files from the zip into the root of an SD card, pop it in the Axim and run bootlinux.exe. Then despite the improvement I'd still recommend you leave it alone for a while and go make a cup of coffee or something. The speed does improve after you use it for a little while as Dalvik compiles and caches everything, but don't expect it to be fast. The problem is that the Axim has 64MB of RAM which is simply not enough for Android. It's worked around by using swap (the swap.img file) but that slows everything down as the system is constantly swapping pages in and out of RAM... I'd be very interested to know how it runs on an Axim which has the 128MB memory upgrade, I'd expect it to fare much better.

16 comments:

Max Fierke said...

I've got a status update for the X51.

It boots up. However, the display is displaced. This is due to improper margins that need some tweaking. I'll check out the code and tweak it accordingly.

As for Android itself, the speed varies. Sometimes its unresponsive and asks if "Activity Monitor" should be closed. You just have to persistently be using Android or else it gets sluggish. The music player works great but it takes a while to switch between interfaces.

It's great progress but theres still more to be done on the actual Android build. I'll work on the kernel this week and fix it for the X51 and then I might poke around the Android and look for things that can be disabled or taken out to speed things up. I know I said that like a month ago, but I will actually make an X51 kernel fix this time.

Paul Burton said...

That's great, the LCD detection works then :D If you get the margins setup correctly it'd be great if you let me know the changes to the platform data struct so I can fix it in my kernel tree.

I agree it's too slow, I'm not entirely sure how much can be stripped out of android though... I certainly don't want the situation where things just won't run on Axdroid because certain frameworks were removed. Perhaps things like the phone, mms services etc can be removed or stubbed out. I know there's a MID profile for android builds but when I was looking at it the consensus seemed to be to avoid it. When you don't use it for a while it probably swaps some things out of RAM to the SD cards swap.img and has to pull them back in when you start touching it again.

Anyway, be sure to let me know if you sort out the LCD settings or have any other thoughts!

Max Fierke said...

Are you planning on releasing the rest of the source (customized HaRET source, customized Android source, etc.)?

Max Fierke said...

Also, in the build config (rx51_defconfig), why is the arch set as OMAP and not PXA? The Axim is powered by a PXA270. Shouldn't we be using that?

Paul Burton said...

The android code is on github, the defconfig isn't what I use (will put that somewhere when I get home from work) and I haven't modified HaRET.

NeoStrider said...

Its alive! Using a X50V.
Two mindblowing aspects are:

- My Motorola Milestone are still running Android 2.1 and my old Dell Axim X50v already got Android 2.2!

- The Milestone has a slower clock than the milestone, and only twice the memory. So why is it so much faster? GPU? Memory bandwidth?

NeoStrider said...

Just to add up:
- Tried also Android-x86 on my EeePC 700 2G (Celeron M 500Mhz, 512 RAM) and it run very well for most of the time (Android 1.6), but it would only lag on composite screen effects, probably due to cheapo GPU. Since its weak GPU is not a bottleneck all the time, it would rule out my speculation of GPU weakness. (And probably, while I know you're not supporting it, since there is no kernel modules for it, the Intel 2700G would be more powerful than its ridiculous i915)

- Did you compile it with the PXA270 specific compiler flags?
In my SDL apps for other PXA270 linux devices, I would always use -mcpu=iwmmxt -mtune=iwmmxt

Max Fierke said...

Paul,

Can you release the entirety of your Android build environment? I know you have uploaded everything to theoretically be able to mirror what you have but I have no idea how your's is set up. I'm getting closer to the correct margins, I've gotten it so that it all fits on screen but it needs some more fine tuning. I can't test it with Android because I can't build Android for the Axim as mentioned earlier in this post.

Paul Burton said...

NeoStrider: Great :) The main issue with the Axim is memory. It may seem that your milestone 'only' has twice the RAM, but when the RAM is full that makes a very big difference. Android currently simply won't all fit into the 64MB of RAM in the Axim so it has to use swap space (like the page file for windows users) on the SD card - which is much much slower than accessing RAM. When I've watched the output in a debug build I've seen the system spending around 75-80% of it's time in IO wait because of this... Ironically the non-v models are probably slightly better off in terms of RAM right now because their display framebuffer will be about 0.9MB smaller than the VGA models.

You're right that the 2700g isn't being used - and there are no public drivers or specs for it's acceleration features so it probably never will be used fully. However, there is a linux framebuffer driver which it may be possible to use, although it needs a lot of work as right now it's very specific to another device... If I can get that to work then it probably won't speed up graphics performance but it would give us back the ~1.2MiB currently used for the framebuffer in system RAM. And yes I use those CFLAGS already :)

Max: I don't particularly feel like uploading my entire axdroid build directory since it's 6.7GiB in size, but I've added a little to my build script so that it should be able to download the code, get it from www.paulburton.eu/project/axdroid/axdroidbuildscript_20100805.tar.gz You'll need to have Googles repo tool setup, java 1.5 installed and before any other versions of java in your PATH, and you'll need an arm-linux-gnueabi toolchain somewhere in your path too (http://www.codesourcery.com/sgpp/lite/arm/portal/release1293 is easiest). Bear in mind that I don't really want to become tech support for building android, but if you have questions feel free to email me or something.

Paul Burton said...

Also, the easiest way to get the margins is to use the pxa specific version of HaRET - http://www.paulburton.eu/project/axdroid/haret-w.exe

If you connect via haretconsole and run dump pxa27x it will tell you the LCD setup.

Max Fierke said...

Paul: Don't worry I'm not going to become "that guy". The build scripts were actually what I was after. Also until a more stable release, it might be beneficial to distribute Axdroid with a HaRET that isn't bundled with the kernel and such so that people can try out new kernels without having to swap out HaRET every time.

Paul Burton said...

Possibly, but since HaRET is only 134KiB and my build script handles building the kernel and bundling everything together anyway I quite like having the reduced file count.

Max Fierke said...

Here's the QVGA kernel patch: http://maxfierke.com/axdroid/patches/0001-arch-arm-mach-pxa-aximx50.c.patch

Paul Burton said...

Thanks :D I'll commit it later

aeoros said...

this AxDroid is awesome, but .... how can I open music or pictures from my sd card in android??? each time I tri it doen't display anything or crash the app... BTW I have my Axim 51xv upgradet to 128ram

betatest said...

can you restart this project it works(OK) on the axims, and i know for a fact with some android hacks and some driver/kernel MODS we can get it into a fully working state, even if only old versions then old android is better than no android.