Porting Android to Beagle Board
Recently I got a Beagle Board rev C2. It’s a pretty nice hardware piece:

embinux has done a pretty good job of porting android to beagle board, and made it open source, here’s the link for the guide to port android.
Using Ubuntu, first compile the kernel, it’s pretty easy. You will need to install git and git-core if you haven’t used git before.
Then clone the git for android, and then compile. The source for android comes down to about 2.7GB. So prepare for a length download. Also note, you need at least 1GB~1.5GB of RAM to actually compile android. The JVM during compilation will eat up a lot of the RAM. If you don’t have sufficient RAM, the compilation will stuck at a random point during the process and never finish. I’ve encountered this problem on 2 different machines and finally switched to a 4GB MacBook 467 to finished the compilation.
Then apply the patches stated in the above porting guide.
Make a bootable SD card following instruction here
Partition 1 is for the uImage and boot loader; partition 2 is for the actual android file system.
Boot up the beagle board w/o inserting the SD card, then at prompt (using minicom/kermit under ubuntu or Tera Term/Hyper Terminal under windows), type in:
mmcinit // init mmc
fatload mmc 0 0×80300000 uImage // load uImage into memory address of 0×80300000
set boot arguments:
setenv bootargs console=ttyS2,115200n8 root=/dev/nfs rw nfsroot=192.168.1.5:/data/target ip=192.168.1.1::255.255.255.0 nolock,rsize=1024,wsize=1024 rootdelay=2
video=omapfb:mode:1280×720@50 init=/init
bootm 0×80300000 // boot up the loaded uImage
If everything goes well, u should see Android booting up ^_^







Thanks for sharing your experience.
Could you elaborate on the setup?, how did you connect the keyboard?, what about a mouse?
I see you used NFS, so how did you connect to the PC?, as far as I know there is not Ethernet or wifi interface on the beagle. I assume only on USB interface, so how all of those interfaces were connected?.
If you used USB hub, then what is the power source of that hub?
Thanks, and sorry for so many questions…
Yossi
You will need a USB hub to connect keyboard and mouse (on the USB Host connector).
The USB hub will provide the power (itself will be powered by AC/DC power input by default)
Use HDMI to DVI to connect your monitor. No wifi yet. You can use a USB to Ethernet connector to get network
Thanks,
Well my problem was probably the hub which gets power from the beagle. I just connected diectly my keyboard and it works.
With linux (angstrom distro) I could use my bluetooth keyboard+mouse, but here for some reason the init stucks when i am trying to.
tomorrow i will look for a USB hub with power connection.
Hi again,
I am trying to connect the beagle as a device to my PC (so i will be able to upload my first android application).
I followed some instructions and connected a mini male B connector to the beagle and the USB-A male connector to my PC (win xp).
I waited for the PC to ask for a driver, but it didn’t. instead the PC found a malfunction USB device. when updating the driver to the one in x86 directory at the android SDK, the windows can’t realy find it.
Any idea what could be the problem?, i didn’t find any clue about that in the forums.
@Android Shogun
To build the SD card partition 2 image (file system), how do I modify the procedure described in the “Root file System of Android” section of “Android_Porting_Guide_to_Beagle_Board” document? Can I just replace the “~/Android_rfs” with, e.g. “/media/Test_Android”, where “Test_Android” is the SD card partition name?
I believe you need a custom ADB program in order to connect to Beagle Board.
What I did is to put the apk files under the Android file system /data/app/ folder instead of doing “adb install your_apk.apk”
I think ~/Android_rfs is the file system folder on your PC/Ubuntu.
You actually need to put all the files/folders under that to the root of your 2nd SD partition.
So if you do a “ls”, it looks like: /data /var /usr , etc. regular linux file structure stuff…
Hi Shogun,
After porting android to beagleboard sucessfully, I’d like to put the apk into it. I copied the apk(under project_name/bin at Eclipse workspace)into SDcard (RFS/system/app or RFS/data/app). After that, I only can see the Package name of project. I executed it, but it failed. Do you know about this problem?
What android SDK does the kernel and RFS that embinux released? Can I put the apk with SDK1.5 into beagle board and execute it? If not, how can I update the SDK of the beagleboard?
Thanks in advanced.
Best Regards.
I recently downloaded the embinux hosted android beagleboard code. In following the port guide, “http://labs.embinux.org/index.php/Android_Porting_Guide_to_Beagle_Board” I was able to access the repository and configure the source code.
When I try to “Compile Kernel” with ../vendor/embinux/support-tools/beagle_build_kernel.sh I get the following error:
Assembler messages:
Error: unknown architecture `armv7-a’
Error: unrecognized option -march=armv7-a
make[2]: *** [scripts/mod/empty.o] Error 1
make[1]: *** [scripts/mod] Error 2
make: *** [scripts] Error 2
net Kernel Build Completed Sucessfully. Documentation
Has anyone run across this before?
Hi Susan,
It looks like your APK is not properly signed. Follow this signing process. Then copy signed APK to /data/data/app or /data/app, depends on your SDK version.
It should work.
Make sure you have all the libraries needed and cross-compile toolchain ready. I think it’s CodeSourcery Q3 2008 release.
While you refer to the C2 rev, the image you show above is of an earlier B version. You might want to update that image. Then *I* can steal it.
Hi… I would love to get a little clarification on a couple things.
Firstly, are you supposed to get the main Android source and compile from here?
http://source.android.com/download
Or do you skip that and go straight to http://labs.embinux.org/index.php/Android_Porting_Guide_to_Beagle_Board and follow the instructions there?
I don’t understand what it means to “apply the patches”.
I have a Rev C board as well, and cannot get my compiled kernel to boot.
It gets stuck after:
OMAP3 beagleboard.org # mmcinit
OMAP3 beagleboard.org # fatload mmc 0 0×80300000 uImage
OMAP3 beagleboard.org # setenv bootargs console=ttyS2,115200n8 noinitrd root=/dev/mmcblk0p2 video=omapfb:mode:1280×720@50 init=/init rootfstype=ext3 rw rootdelay=1 nohz=off
OMAP3 beagleboard.org # bootm 0×80300000
## Booting kernel from Legacy Image at 80300000 …
Image Name: Linux-2.6.27-omap1-00125-g7fd866
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 1886636 Bytes = 1.8 MB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum … OK
Loading Kernel Image … OK
OK
Starting kernel …
Uncompressing Linux…………………………………………………….
…………………………………………………… done, booting the kernel.
Hi Shogun,
How to use Camera with beagle board, when i try calling the camera application, it is asking for SD card, i tried USB to SD converter in USB hub, but i think it is not detecting. If you have any solution for this pls let me know.
Thanks,
Suresh
Oh, that image is from BeagleBoard.org
Yes, I’m following the instruction at labs.embinux.org. Seems your board is booting up, probably something wrong with the SD Card format/file system?
I haven’t gotten the SD Card to work though.
Hi Shogun,
I tried mounting SD card and it mounted properly commands as shown below
1. mount -o rw -t ext3 /dev/block/sdc2 sdcard
2. setprop EXTERNAL_STORAGE_STATE mounted
3. am broadcast -a android.intent.action.MEDIA_MOUNTED –ez read-only false -d file:///sdcard
now i see in Android Settings -> SD card & phone storage -> SD card is displaying
Total space = 77MB
Available space = 56MB
Unmount SD card (Highlighted)
Format SD card (Not Highlighted)
Still when i try calling Camera application in Android, i’m getting message like “Please insert an SD card before using the camera”.
Can somebody update with your comments to solve this.
Hi Shogun,
I got SD card detected, camera working fine with greenish dots in picture captured.
wow! congratulations! ^_^ hope to see your blog/tutorial about this, if possible…
hiiiiiiii,
i had created a application by using andoid sdk 1.6 means but that is not running in beagle board ,but when i chenge the sdk version to 3 the application is running successfully on beagle board can any one tell how we can run our android application on beagle board which is created on android 1.6
for now the beagle board android version supports sdk 1.5 only. you cannot run 1.6 code base on it.
hi,
I have just ported android cupcake on beagle board rev c3. I am getting the screen with some alarming messages. but my problem is that the beagle board is not detecting the keyboard neither directly nor through USB hub. so I am not able to give any input. key board is not even getting power in both cases. mouse is getting power but its not working. keyboard is working fine with other systems.
so please tell me what is problem with my setup.
I have installed this using help from
http://free-electrons.com/blog/android-beagle/
Thanks in advance.
i haven’t touched beagle board for a long time, sorry can’t help out here.
halo,
can anyone tell me how much will an unlocked iPhone 4 16gb cost in UK?
Sorry I don’t know… search on ebay…
hello ,
I have started working on beagle board recently . I have done the whole android kernel build as mentioned in above link. but when i try to connect the beagle board with my LCD montior using HDMI to DVI cable, the screen goes blank . I checked both monitor and cable by conencting HDMI port of my laptop with LCD screen. I could see the laptop screen coming over LCD as well .
So I know that this is a very basic issue but any support is welcome .
thanx