Compiling linux applications for the Freerunner

Joel Newkirk freerunner at
Sat Jan 24 03:42:14 CET 2009

On Fri, 23 Jan 2009 10:21:43 -0800 (PST), Trevanian <admin at> wrote:
> Hello,
> I am new to compiling applications for different architectures like
> I'd like to compile the "BetaFTPd", a small and fast single-threaded FTP
> deamon, for the Neo Freerunner. I have only compiled source code within
> x86 environment and am not familiar with the prerequesites for compiling
> source code for different architectures.
> I already took a look at the openmoko-wiki-page but I am still a little
> bit
> confused. I read words like "Toolchain", ".bb-files", MokoMakeFile,...
> BetaFTPd has no further dependencies but libgcc1 and is very small
> So what do I need? As far as I understood it I have to get the Toolchain
> its needed prerequesites (following the instructions on the
> wiki->Toolchain)
> and will then be able to compile my application. So no need for
> MokoMakeFile
> or any .bb-file. Am I right or did I miss(interpret) something?


> Considering the ToolChain: I tried setting it up but I had problems with
> using "opkg-target" as described in the wiki. There even is no binary
> called
> like that after setting up the toolchain.
> I first installed all by the toolchain needed applications, libraries,..
> (as
> explained in the wiki) with apt-get and then used the following commands

Once you have the toolchain installed as per the wiki you need to invoke
this command when you want to use the toolchain:

. /usr/local/openmoko/arm/setup-env

Don't miss the leading "dot space".  That 'sources' the file, using it to
set environment variables, including altering $PATH so that it finds
components of the toolchain instead of native gcc on the host.  You need to
do that basically whenever you settle in for a session of dev work using
the toolchain, the additions and changes will hang around until the shell
session ends.

Separately, to add packages and libs and such to the dev environment
itself, you need to:

. /usr/local/openmoko/arm/envirnment-setup

After which you should be able to install things with opkg-target.

I've found it generally helpful, when needing to hand-make from tarballed
source, to use "./configure --host=arm-angstrom-linux" - otherwise it
sometimes fails to realize it's cross-compiling (which it should be able to
correctly determine without that flag) and things go badly.  Not needed all
the time, but doesn't seem to hurt if used all the time.  (this is
presuming that using om-conf doesn't work out)

Joel Newkirk      (blog) (FR stuff)

More information about the devel mailing list