Hardware Reference
In-Depth Information
ing to understand exactly how the numerous pieces of the toolchain hook together.
Compared to building cross-compilers manually, this is a lifesaver.
crosstool-ng is built using the same configuration frontend technology as the
Linux kernel source, so the menu structure that it uses will likely be familiar to you.
Just like the Linux kernel, many options might not make sense to you or might
seem confusingly similar. Never fear, brave hackers! You'll need to change only a
few of these options from their defaults.
You can put your Raspberry Pi aside; you won't need it. Instead, start with an x86-
based system running your preferred Linux distribution. Any distribution you are
comfortable working with that includes a working compiler will be fine. As far as the
system goes, the bigger, the better. More CPU cores and more memory will result in
faster builds, and x86_64 is always preferred. Also, you'll want to have a healthy
amount of available disk space (10 GB should be more than sufficient).
To build the cross-compiler toolchain, you first need to make sure you have some
development components. Specifically, you'll need a native compiler (in this
case,GCC with support for C & C ), libstdc (standard C++ libraries, both shared and
static), libtool and make (for the build infrastructure), GNU MP (for fast precision
mathematics), gperf (a perfect hash function generator), bison (a C grammar parser),
flex (a lexical pattern recognition engine), ncurses (a terminal graphics library), sed
(a stream editor), subversion (client tooling for accessing SVN code repositories),
and texinfo (a documentation generation and parsing tool).
Don't worry too much about these pieces: you do not need to know how they work (or
even why you need them), just know that you do. Really, all you need to do is install
them, and you accomplish that by running the following commands.
On Fedora, enter:
$ su -c 'yum install gcc gcc-c++ bison make ncurses-devel texinfo flex
gperf \
libtool sed subversion gmp-devel libstdc++-devel libstdc++-static'
For Ubuntu, enter:
$ su -c 'apt-get install gcc g++ bison make ncurses-dev texinfo flex
gperf \
libtool sed subversion libgmp-dev libstdc++-dev'
Next, download a copy of the crosstool-ng source code . At the time of this writing, the
latest version is 1.18.0.
 
Search WWH ::




Custom Search