Crosscompiling for Raspberry

Once, I have my Raspberry Pi and QEMU environment working, I’m going to explain how to set up the crosscompiler:

First at all, We have to download crosstool-ng from its website: http://crosstool-ng.org/.

After that, I have unpacked the tarball,and run configure command (I had to resolve several depences before):

./configure --prefix=/opt/compiler/
make
make install

Now, I had to add the folder to the path:

echo $PATH | tr : \\n
PATH=$PATH:/opt/compiler

Now, execute ct-ng tool like that:

./ct-ng menuconfig

In “Path and misc options”, enable “Try features marked as Experimental”
I set up my folder like

/opt/compiler/tools/${CT_TARGET}

Theses was the rest of my options:

Then I executed the next command:

./ct-ng build

After 48 minutes my system is ready 🙂
I updated my path again:

PATH=$PATH:/opt/compiler/tools/arm-unknown-linux-gnueabi

then I made a simple program test, it was compiled :

arm-linux-gnueabi-gcc -o prueba prueba.c

🙂

Anuncios
  1. Deja un comentario

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

w

Conectando a %s

A %d blogueros les gusta esto: