Android
From Crashcourse Wiki
NOTE: This page is currently being updated, should be done shortly.
Contents |
Getting started with Android
There are a number of ways to download/build/run Android on your BeagleBoard, and we'll try to document as many of them as we can here. As a start, format an SD card with the standard VFAT and ext2/3 partitions to hold your Android kernel image and root filesystem, respectively.
In addition, depending on how much you want to build yourself, read the BeagleBoard Development Environment page to see what you might need to install if you plan on building Android images for yourself.
Embinux
[Embinux] has downloadable pre-built kernel and root filesystem images, or you can download a toolchain and the source and build your own.
Running the pre-built Embinux Android images
Getting and unloading the Embinux tarball
You can download a tarball containing both a uImage kernel image and an Android root filesystem from Embinux [here], but the format of that tarball is less than ideal. Because the root filesystem contained therein is in uncompressed form and contains a small number of /dev entries, you must untar that tarball with root privilege; otherwise, you lose the /dev entries inside. And after you untar the root filesystem, you need to copy it to the destination SD partition again with root privilege to maintain the /dev files. Having a separate compressed root filesystem tarball would have made more sense. Once all that's done, the README_beagle in the tarball explains how to boot Android from those pre-built images.
Even if you don't plan on using the pre-built images, you might want to download the tarball anyway since it contains a README_beagle file explaining how to set up Android on an SD card.
Running the Embinux images
The README_Beagle file inside the tarball explains how to run the Embinux kernel and root filesystem. There is no mention of MLO or u-boot.bin images. Instead, you copy the kernel image and root filesystem to the (respective) SD partitions and load and run the images manually:
OMAP3 beagleboard.org # setenv bootargs console=ttyS2,115200n8 noinitrd root=/dev/mmcblk0p2 video=omapfb.mode=dvi:1280x720MR-24@50 init=/init rootfstype=ext3 rw rootdelay=1 nohz=off OMAP3 beagleboard.org # mmcinit OMAP3 beagleboard.org # fatload mmc 0 0x80300000 uImage OMAP3 beagleboard.org # bootm 0x80300000
Read the README_beagle file for the exact details.
Building your own Android images
The preparation
As with trying to run pre-built Android images, there are issues trying to build your own but we'll document the process anyway under the assumption that those issues will be resolved in the near future. First, set up your development environment as explained at the BeagleBoard Development Environment page.
In addition, set the environment variable CC_PATH to point at your (Embinux Android) toolchain, as in:
$ export CC_PATH=/opt/arm-none-linux-gnueabi/bin/arm-none-linux-gnueabi-
Finally, you'll have to install the Android-specific repo utility, as explained [here].
Getting beagledroid
Getting the beagledroid source is explained [here]. As a first step, you could just run the first few commands to get the source without trying to build anything:
$ mkdir beagledroid $ cd beagledroid $ repo init -u git://labs.embinux.org/repo/android/platform/beaglemanifest.git/ $ repo sync
Building the kernel
Rather than building all of Android, you can try building just the kernel uImage to see if it boots. First, you need to edit the file vendor/embinux/support-tools/beagle_build_kernel.sh and remove the incredibly silly opening C-style comment which will cause that script to break, and make sure the line #!/bin/bash is the very first line in that file.
At that point, try:
$ cd kernel $ ../vendor/embinux/support-tools/beagle_build_kernel.sh
If that works, you'll end up with the kernel image in arch/arm/boot/uImage and, even without a root filesystem, you can copy that file to an SD card and see if it boots before falling over for lack of a root filesystem. The instructions for setting up your Android SD card can be found in the file README_beagle in the pre-built Android tarball mentioned above so, even if you don't plan on running the pre-built images, you might as well download the tarball just to have the README file.
At the moment, what's built hangs after uncompressing just like the pre-built image so we obviously need to wait for some fixes to show up in the repository.
Building everything
Once all of the above issues are fixed, you can try building everything but, sadly, there are issues there as well:
$ make
build/core/product_config.mk:261: WARNING: adding test OTA key
============================================
TARGET_PRODUCT=generic
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=
============================================
build/core/copy_headers.mk:15: warning: overriding commands for target `out/target/product/generic/obj/include/libpv/getactualaacconfig.h'
build/core/copy_headers.mk:15: warning: ignoring old commands for target `out/target/product/generic/obj/include/libpv/getactualaacconfig.h'
make: execvp: /bin/bash: Argument list too long
host C: acp <= build/tools/acp/acp.c
In file included from /usr/include/features.h:376,
from /usr/include/stdlib.h:25,
from build/tools/acp/acp.c:11:
/usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1
$
In short, still some work to be done for Android on BeagleBoard, but it's possible a lot of that might will be resolved at the next successful sync.
Return to main BeagleBoard page.

