You are not logged in.

#1 2011-04-04 01:32:36

LeafStorm
Member
From: North Carolina
Registered: 2009-05-20
Posts: 51
Website

Cross compiling for ARM (Android)

Hello, everyone. I just rooted my Android phone (an LG Ally), and decided that a fun way to try and use my newfound freedom would be to cross-compile some programs for it like Busybox, Lua, a fresh copy of Python, and possibly even pacman. (Being able to use makepkg to compile phone software would be awesome.)

I found the cross-arm-elf-binutils and cross-arm-gcc-base packages in community, so now the question is...how do I use them? From what I understand, it essentially comes down to bulding the software like normal, but using the executables from the cross-compiling package instead of the system installed ones. Is that basically right? Can you recommend any articles on cross-compiling in general, and for Android in particular?


Thanks,
Matthew Frazier

Offline

#2 2011-04-04 15:55:18

tom5760
Member
From: Philadelphia, PA, USA
Registered: 2006-02-05
Posts: 283
Website

Re: Cross compiling for ARM (Android)

You should check out the Android NDK documentation.  The NDK comes with a cross compiler specifically for android, with the correct versions of libraries, etc.  It comes with some examples showing how to build stuff for it.

EDIT: There is also an AUR package for it.

Last edited by tom5760 (2011-04-04 15:56:25)

Offline

#3 2011-04-04 16:07:10

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: Cross compiling for ARM (Android)

... And it works beautifully.  From inside Eclipse, you can run code on your target phone (or in a full featured emulator) while using the debugger on the host to examine the internals.  Very impressive.

I suggest brushing up on your Java...


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#4 2011-04-04 16:10:52

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: Cross compiling for ARM (Android)

By-the-way, Busybox is in the Android Market.  Grab that, SSHdroid, and terminal emulator.  I use Dolphin and Thunar to look at the file system through SSHdroid using SFTP.  I love it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

Board footer

Powered by FluxBB