Using scratchbox2 and Ubuntu 11.10

Local machine environment:
- Ubuntu 11.10 64bits

Emulated environment:
- Debian Squeeze armel

Install in local machine:

sudo apt-get install scratchbox2 fakeroot
sudo apt-get install qemu-user qemu
sudo apt-get install gcc-arm-linux-gnueabi
sudo apt-get install cpp-4.4-arm-linux-gnueabi gcc-4.4-arm-linux-gnueabi gcc-4.4-arm-linux-gnueabi-base
sudo apt-get install cpp-4.5-arm-linux-gnueabi g++-4.5-arm-linux-gnueabi gcc-4.5-arm-linux-gnueabi

Init scratchbox configuration:

fakeroot debootstrap --variant=scratchbox --foreign --arch armel squeeze /path/root_fs
sb2-init -n -c /usr/bin/qemu-arm MACHINE_NAME "arm-linux-gnueabi-gcc"

Install into emulated system:

apt-get install g++ rpm zlib1g-dev m4 bison libncurses5-dev gettext build-essential intltool libxml2-dev libtool

Compile outside the box:

cd source
sb2 ./configure
sb2 make -jN
sb2 make install DESTDIR=/path/root_fs

To change the crosscompiler toolchain install the script /usr/local/bin/


if [ -z $1 ]; then
echo -e "\n Error: you need to define the arm-linux-gnueabi version"
echo -e " Usage: \n"

if [ ! -f /usr/bin/arm-linux-gnueabi-cpp-$1 ]; then
echo -e "\n Error: arm-linux-gnueabi version $1 do not exist\n"

# Unlink symbolic links
sudo unlink /usr/bin/arm-linux-gnueabi-cpp
sudo unlink /usr/bin/arm-linux-gnueabi-gcc
sudo unlink /usr/bin/arm-linux-gnueabi-gcov

#Define new links for arm-linux-gnueabi
sudo ln -s /usr/bin/arm-linux-gnueabi-cpp-$1 /usr/bin/arm-linux-gnueabi-cpp
sudo ln -s /usr/bin/arm-linux-gnueabi-gcc-$1 /usr/bin/arm-linux-gnueabi-gcc
sudo ln -s /usr/bin/arm-linux-gnueabi-gcov-$1 /usr/bin/arm-linux-gnueabi-gcov

  1. #1 by Kyle on December 21, 2011 - 6:31 pm

    I am trying to do this from a straight debian install, and I am getting hung up on the part where I am supposed to install the gnueabi parts. Is there a specific repository I am supposed to be drawing these from?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: