Cross compiling
Compiling directly on the Raspberry Pi (working under Raspbian) is possible, and in fact, some things are easier this way. But using a complete IDE on the Raspi will be really slow.
If we want to write a small tool with a few C files, the native gcc on the Raspi will be sufficient. And we do not have to care about different versions of glibc or else. Compiling the kernel or some larger project can take hours or even more than one day.
So using a cross compiler will be the solution.
In the following sections we assume that we either need a cross compiler for :
- compiling the kernel / kernel module (add LCD module to Raspi)
- use Wt (Web Toolkit) together with Qt creator
Both were my personal requirements for a cross toolchain. Using Wt on the Raspi is a bit special and of course not a requirement which many will have. More to Wt and it’s usage later (on a separate post).
Continue reading →