Tutorial for cross-compiling for our ARM processor.

Just a short tutorial helping you build Buildroot that compiles programs for ARM. It is made for Ubuntu Linux, but should work on other distros too.

To build the Buildroot

With apt-get install, you should get yourself following packages (you probably have some of them already, but just to be sure):
  • build-essential - this installs a complete build environment
  • libssl-dev
  • libncurses-dev
  • bison
  • flex
  • texinfo
  • zlib1g-dev
  • gettext
  • autoconf
  • wget
  • patch

Then you should set your shell to bash instead of dash, you do this with:
#sudo dpkg-reconfigure dash
And then select No

Getting and compiling Buildroot

You can get our Buildroot here: Buildroot-FRISMS
Then you must extract the Buildroot to /home/arm , so the location of your folder is /home/arm/buildroot-2009.11-fri/ , move into that folder and do:
Compiling takes some time, check that there are no errors.

Compiling our programs

After compiling Buildroot is done, you should add: /PATH_TO_YOUR_FOLDER/buildroot-2009.11-fri/output/staging/usr/bin into your enviroment variable (PATH)
Then your Makefile for compiling programs should look something like this (made for simple helloworld with name main.c):

CFLAGS=-I. --sysroot=/PATH_TO_YOUR_FOLDER/buildroot-2009.11-fri/output/staging

%.o: %.c
    $(CC) -c -o $@ $< $(CFLAGS)
main: $(OBJ)
    $(CC) -o $@ $^ $(CFLAGS)
.PHONY: clean
    rm -f *.o *~ main