Archivos para 21 julio 2012

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

Deja un comentario

Raspbian running in ubuntu with QEMU

You have to download the image from here:

http://141.30.228.4/pub/mirrors/raspbian/qemu/

I have use the next command based on the bat file:

sudo qemu-system-arm -M versatilepb -cpu arm1136 -m 256 -kernel raspbian/vmlinuz-2.6.32-qemu-armv6 -initrd raspbian/initrd.img-2.6.32-qemu-armv6 -hda raspbian/raspbian.img -net nic -net user -append “root=/dev/sda1”

Then, I had to reconfigure /etc/apt/sources.list like that:

deb http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi
deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free rpi

After that we have to reconfigure our locales:

sudo apt-get install locales
sudo dpkg-reconfigure locales

and the keyboard:

sudo apt-get install keyboard-configuration
sudo dpkg-reconfigure keyboard-configuration

 

Deja un comentario