how do i cross compile programs for beagleboard ?


im totally new to linux programming and am trying to learn how to cross-compile a linux program to ARM processors…is there some useful websites where i can get some motivation as a step-by step procedure.

Im running ubuntu 11.10 on my board and am trying to cross-compile a software package called Rtklib.

Thanks in advance!

Jan Axelson’s website has a great tutorial.

Consider Gentoo Linux.

What distinguishes Gentoo from Ubuntu is the philosophy within the Gentoo community for doing it yourself. For example in the Beagle Bone, there is a How To install Gentoo on your Beagle Bone that necessarily include setting up a cross compiler to build your image. Of course, once you have Gentoo running on a Beagle Bone, you can compile just about anything obviating the need for a cross compiler, unless you do not want to wait since the compiling something on the Beagle Bone may take hours instead of minutes on say an AMD Phenom with 8 GBs ram. But, since you already set up a cross compiler in the Gentoo How To, you can go the next step and modify your Gentoo environments on both the cross compiler machine and the Beagle Bone to perform what is termed distributed compiling. Distributed Compiling (“distcc”) is where you use the Gentoo package system on our Beagle Bone to decide what you what to install thereon, e.g. emacs editor or PostrgreSQL or Apache or Mediawiki, and then the muscle work of actually doing the compiling is directed, or “distributed”, back to your more powerful machine that does the actual compiling, and returns a binary or binaries to the Beagle Bone in minutes in a ready to run format. If you happen to have several Gentoo boxes available, you can set them up with distcc and they can all work in parallel making a compile even faster. It’s all very sweet – I have not done this with the Beagle Bone, but have done so with the Sheeva Plug (ARM 5).

An example of the time savings is, for example, compiling the Gnu Compiler Collection (“gcc”): it takes over 12 or 24 hours to compile on the Sheeva Plug, whereas on my AMD Phenom, it takes 20 minutes. (Note: there are some exceptions to what may be cross-compiled, some programs must be compiled on the platform they are targeted for, in which case, you just bite the bullet and wait. I cannot remember if gcc is one of those; I just remember the 24 hours vs. 20 minutes comparison.)

If you want to learn and are willing to make the effort and commit some time (an investment in yourself), then your starting point for the Beagle Bone and Gentoo is here:

I also like Gentoo, but have not run it for a while and have never run
it on ARM. There are many factors that go into the choice of a Linux
distro. I chose to base TheDeck, my penetration testing and forensics
platform, on Ubuntu because it is fairly well supported on ARM and
also because many security tools are available as .deb packages which
made porting over 6GB worth of stuff a little easier. If you want to
wring the maximum performance out of a system then Gentoo is a great
choice. I am going to make my students in my operating system class
build a Gentoo system this semester, but I'll let them get their feet
wet first with Xubuntu.