Monday, June 13, 2011

Android FroYo on the BeagleBoard xM Rev C

There's a lot to like about the BeagleBoard xM compared to the BeagleBoard C4 I had been using for Contraption, my project to broker peace between the Android and GNU peoples. The xM has twice as much RAM: half a gigabyte. It has a built-in USB hub and four USB ports, eliminating the need for a separate USB hub, simplifying the attachment of a USB keyboard and mouse. It has a built-in RJ45 Ethernet port, eliminating the need for a USB Ethernet adaptor or, as I used, an expansion board like the Zippy2. And best yet, the price of the tiny xM board has come down to be the same as what I originally paid for the C4 board. This makes the xM a great platform for Contraption and for the kinds of things for which I use it.

At the time I chose to move off the C4, the currently shipping xM was the revision C board. The pre-built binaries available in the Rowboat validation port of Android FroYo to the xM did not support the rev C. In fact, neither the X-Load stage one loader, nor the U-Boot boot loader, nor the 2.6.32 Linux kernel with Android modifications, recognized the rev C board. Because the xM differed significantly in many ways from prior BeagleBoards (most significantly, in how the USB components were configured and powered), this made using the pre-built binaries from the developer's kit a non-starter.

Fortunately, I poked around and found Robert C. Nelson's patch to adapt the kernel's board support package (BSP) for the BeagleBoard to the rev C hardware. (Thank You, Robert!) And while I didn't find similar patches for X-Load or U-Boot, it was a simple thing to make the required changes to those packages as well using Robert's changes as a model. The patch files I used are now all part of the latest tarball available on the Contraption web page. As I've done in the past, I rebuilt all of the Android software and the root file system from scratch, because the graphics engine on the xM Rev C had to be built a little differently as well. This change has been incorporated into the make file.

Here's the BeagleBoard xM Rev C. Moving to the xM really cleaned up my workbench by eliminating a lot of cables and clutter. (You can click on any of the images below to open larger sizes.)

BeagleBoard xM Rev C

Here you can see the BeagleBoard xM rev C running Android FroYo. My desktop on the left is displaying an SSH window to Android (black on white) and a console window to the serial port on the xM board (green on black). The LCD monitor on the right is hooked to the xM and is displaying the Android browser.

Android on BeagleBoard xM Rev C

Here's a photograph of the xM LCD display.

Android Browser on BeagleBoard xM Rev C

Here's a screen snapshot of the serial console. If you look closely you can see one of the things I did was change the root password using the /bin/busybox passwd applet. SSH doesn't seem happy with an empty root password.

BeagleBoard xM Rev C Serial Console

After I SSHed into Android from my desktop and got a bash prompt, I ran the top command just to see who was doing what.

SSHed into Android using Contraption

I'd like to move to the port of Android Gingerbread. But if I'm interpreting what I'm reading correctly (and please, someone, tell me I'm not), I have to run the 64-bit version of Java to build the Android software, and to do that I have to migrate to the 64-bit version of Linux on my build server. That's a pretty big leap. Might be a while.


pundiramit said...


Great job you did to run Android on Beagle-XM rev-c.

Regarding Gingerbread dependencies. Yes initially there was only 64bit build support available but some hacks were available to support 32bit machines. Few days back Android has come up with a 32bit build support as well. So having a 64bit machine is not a hardcore dependency anymore.

Anyways if you have downloaded the Rowboat sources, you should be able to build it on a 32bit ubuntu machine.

For Gingerbread you do need to install Sun-Java6 package.

Amit Pundir

Chip Overclock said...

That is excellent news. Thanks! I guess that's life on the bleeding edge.

Naveen Kumar. S said...

Hello Sir,

I tried porting Android FroYo onto BeagleBoard xM Rev C, but i was not able to port.

I read in some in forums saying that, we need to apply some patches for Android FroYo to work on Rev C boards. Can you please share the steps that you followed or patches that you applied for FroYo.

Naveen Kumar.S

Chip Overclock said...

I had to apply patches to the kernel, U-Boot, and X-Loader. The kernel patch was available on the web, and I developed my own patches based on that patch for the two boot loaders. I believe all of these can be found in the Contraption tarball, a link to which you can find on this page:

Good luck!