Index To the Series
1. Raspberery Pi likes Open Source
2. Cross-Compiling for Raspberry Pi
3. Cross-Compiling ITK for Raspberry Pi
4. Raspberry Pi likes VTK
5. Raspberry Pi likes Node.js

 


 

 The Raspberry Pi:

A fully functional computer for $35.

with

  • ARM Processor
  • 512 Mb RAM
  • 2 USB ports
  • HDMI Video output
  • 4Gb SD Memory Card (added)
  • Audio output
  • Open pins for driving devices

Originally developed with the goal of stimulating the teaching of basic computer science in schools, it is simply hard to ignore...

It may look small today...

but it has the Desktop Computer specifications for which we wrote the Insight Toolkit (ITK) back in 1999.

 

After being in the waiting list for several months,
finally our little Raspberry Pi box made it to our Kitware office.
Here it is in all its glory:


Very important: as any real computer, it has blinking LEDs of Happiness:

So.. what can one do with it ?

Since we got it with a Linux installation, we can simply start with an SSH login into it.

Then we download the latest release of CMake: 2.8.10.

and build it from source:

very obediently, gcc start crunching CMake code:

and after 37 minutes it finished the configuration step.


No point in being a Grinch about the compilation time.
Remember this is an ARM processor, not a Quad Core i7.    :-)

As usual we go then for the Make command,

This time it takes 57 minutes to complete the build of CMake.

Then move onto installing Vim,
since no computer on earth can be complete without Vim    :-)
(besides, needed to edit the CMakeCache.txt file to set the SITE name).

and finally, as good Open Source citizens,
we submitted a build to the CMake Dashboard

One hundred minutes later...

Here is your Raspberry Pi:    Experimental Build

You are welcome CMake !

Or rather we should say... Thank You CMake !
since now we are ready to start building the Insight Toolkit.

We start by downloading the most recent release: ITK 4.2.1.

 and proceed to configure it with our freshly built CMake:

mm,... it took four days...
and it was still going on....
given that by default all the modules, tests and examples are enabled.

We had to restart the build with Testing and Examples disabled.

and several hours later...

 

The good news:    It Builds All !!

The bad news:      It may take more than what you are willing to wait.

Therefore, here is the motivation to pursue Cross-Compilation, where we will compile the code in a standard Desktop or Laptop, but generate code that target the architecture of the Raspberry Pi.

Share