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:

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

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

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

echo $PATH | tr : \\n

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


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:


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

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



Deja un comentario

Raspbian running in ubuntu with QEMU

You have to download the image from here:

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 wheezy main contrib non-free rpi
deb-src 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