So I decide to check what is going on with
crosstool-ng and refresh my old post
arm-unknown-linux-gnueabi toolchain. Last post was pretty
popular, so definitely this is direction I should follow :). I will not repeat
myself, so if you encounter any problems please check last post, section with
known problems in crosstool-ng
doc/ directory or RTFM. Let’s begin:
Get the latest crosstool-ng
As usual I’m trying to use latest version possible. Following the crosstool-ng page:
1 2 3
At the time of writing this article my changeset was
3200:0fc56e62cecf 16 Mar
2013, two weeks old.
I prefer to use local directory for
ct-ng in case it will change in feature I
will not need to mess with
/usr subsystem. Simply tryin’ to keep it clean when I can.
1 2 3 4
No problems on my up to date Debian wheezy.
You will probably want to add
$HOME/ct-ng to your
Add bash completion as it is advised in message at the end of compilation process. My
$HOME/.bash_completion so there is a place for local
Build sample toolchain
There is a long list of predefined samples toolchains which you can get build.
ct-ng bash completion was correctly added, than you can explore it by
<Tab> or simply
ct-ng list-samples. Let’s try to build
1 2 3
Before you start build consider some debugging options to make build process easier to continue when problems encountered.
Additional debugging options
crosstool-ng contain interesting mechanism of saving finished phases of toolchain. This helps when for some reason our build process failed. To enable this feature simply enter menuconfig:
Paths and mix options -> Debug crosstool-NG -> Save intermediate steps
as enabled. If something goes wrong you can check what last state was by:
Directory on top with the latest modification date is now your first state where you should restart after fail. To restart build in given point:
Ordered list of possible states can be retrieved by
4 is the number of concurrent jobs and depends on your setup performance.
Building process takes a while so make coffee or anything else to drink :).
I encounter few different problems than during previous building.
Missing expat library
Signature looks like that:
1 2 3
gcj internal error
Few times I encountered something like this:
1 2 3 4 5
The reason is that
oom_kiler takes care about
gcj. It means that you run out
of memory during compilation Java related code. I experience that when trying to
build toolchain with 512MB of RAM :)
So this was short reminder. I work on new post about creating virtual embedded development environment based on qemu. I was inspired by this article. Hope this article was useful. If you have any comments or difficulties please comment below. If think this post was useful – share.