(this guide is probably out of date)
I have recently successfully built i2pd for the raspberry pi using a cross compiler on Ubuntu 16.04 LTS for amd64. So far i2pd has an uptime of over a week with no crashes or memory leaks running a small irc server. There are still a few things i2pd could do better, specifically more documentation but I digress.
Building
First off if you don't have git
install it along with the basic compiler stuffs.
1 |
|
To build a static i2pd for raspberry pi you'll need to build an environment with all the i2pd dependencies. We'll use ubuntu's gcc arm cross compiler for this.
1 |
|
We don't want to mix the libraries we are going to build with our system libraries as they are for ARM not x86 so we'll make a separate directory to hold them.
1 2 |
|
Optionally you can have $RPI
defined in .bashrc
so you don't have to export it every time you want to build:
$ echo 'export RPI="~/rpi"' >> ~/.bashrc
Now on to building all the dependencies for i2pd (from source of course)
Building Zlib
We'll start with the simplest dependency, zlib
Obtain and unpack zlib...
1 2 3 |
|
... then build and install.
1 2 3 |
|
If all is well continue to the next step.
Building libressl
For this static build I'll be using libressl
instead of openssl
for "security" reasons.
Grab the source...
1 2 3 |
|
... then build and install.
1 2 3 |
|
Building Boost
Here's the dependency that has a little gotcha, boost
.
Grab the source...
1 2 3 4 |
|
Set up the build with just libraries we need...
1 |
|
Now for the gotcha, you want to cross compile to arm so you're going to have to patch project-config.jam
.
1 2 |
|
... now build and install, there may be errors but that's (probably) okay.
1 |
|
Building i2pd
Finally we have all the dependencies for i2pd built, now build the daemon itself.
Grab the source...
1 2 3 |
|
... and compile
1 |
|
If all goes right you'll get a statically compiled i2pd that runs on the raspberry pi.
Optionally you can strip the debugging symbols from the static binary with arm-linux-gnueabihf-strip i2pd
Copy to your rpi, run it as a non root user and enjoy.
If any steps don't work please feel free to contact me on twitter or via email
Update:
My static builds for rpi can be found here