Installing crosstool-ng on Debian 7.4

I will explain how to set up a cross-compile host using crosstool-ng on Debian. It pretty much follows the tutorial located at kitware.com.

My environment

I will be using a freshly installed Debian 7.4 OS (Kernel Version 3.2.54-2). Crosstool-ng is currently at version 1.19.
I have downloaded the tarball to /srv/software as

mkdir /srv/software && cd /srv/software
wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.19.0.tar.bz2
tar xjf crosstool-ng-1.19.0.tar.bz2

Prerequisites

You will need to have the following packages installed:

apt-get install gcc gperf bison flex gawk  libtool automake libncurses5-dev 

Configure and install crosstool-ng

I will be installing crosstool-ng to /srv/crosstool-ng. To do so, type:

cd /srv/software/crosstool-ng-1.19.0
./configure --prefix=/srv/crosstool-ng/
make
make install
cp ct-ng.comp /etc/bash_completion.d/ #as suggested by the installer

This installs all the stuff as expected.
Don’t forget to add the path to $PATH, e.g., prepend

export PATH=$PATH:/srv/crosstool-ng/bin

to /etc/bash.bashrc

The next step is to build the toolchain.

Advertisements

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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: