This is how I got Armory (etotheipi/BitcoinArmory; http://bitcoinarmory.com/) cross-compiled for the Raspberry Pi.
This is a great way to keep an air-gapped offline wallet for only $30 dollars for the RPi (that you can also use for other things; experiment, it's awesome) and $7 for a Class 10 4GB SD card, really easy to keep in a safe and secret place.
On my Ubuntu box, I had to apt-get install
these packages. Your mileage may vary.
bison flex texinfo libtool automake libncurses5-dev gperf python-pyopencl git-core build-essential pyqt4-dev-tools swig libqtcore4 libqt4-dev python-qt4 python-dev python-twisted
Chris Boot has an awesome post on how to setup a cross-compiler for the RPi, follow it:
http://www.bootc.net/archives/2012/05/26/how-to-build-a-cross-compiler-for-your-raspberry-pi/
But note that during the menuconfig
you have to go into C-compiler → Additional supported languages and enable C++.
If you want, you can skip steps 2 to 14 (the whole menuconfig
) of the second block by placing the .config
file attached to this gist into the folder where you run ct-ng
.
Now that you have your arm-unknown-linux-gnueabi-g++
working in your $PATH
, clone the Armory repo
git clone git://github.com/etotheipi/BitcoinArmory.git
cd BitcoinArmory
Apply the attached patch to the two Makefiles (a smarter patch might be merged in the repo in the future)
patch -p1 < CXX.patch
And MAKE
CXX=arm-unknown-linux-gnueabi-g++ make
Finally, create a tarball to move to your shiny Raspberry
mkdir -p BitcoinArmoryRPi/img/
cp *.py *.so README LICENSE BitcoinArmoryRPi/
cp img/* BitcoinArmoryRPi/img/
tar cvfz BitcoinArmoryRPi.tar.gz BitcoinArmoryRPi
That's all folks!
Tip jar: 18p7pUqqxPYtDaK3GytdVxdSKZzs25SihS (If you feel to tip me, don't forget to tip also etotheipi, the creator of this awesome client: 1ArmoryXcfq7TnCSuZa9fQjRYwJ4bkRKfv)
Thanks for the great tutorial. Is there any specific version of Armory you did this for? With the latest one of the git repo (2013-01-15), I got stuck at the following. Any ideas? Cheers,
Rutger
[ rvhaas stark ~/raspberrypi/armory-crosscompile/BitcoinArmory ] CXX=arm-unknown-linux-gnueabi-g++ make
cd cppForSwig; make swig
make[1]: Entering directory
/home/rvhaas/virtualisation/raspberrypi/armory-crosscompile/BitcoinArmory/cppForSwig' arm-unknown-linux-gnueabi-g++ -I"/usr/include/python
python -c 'import sys; print str(sys.version_info[0]) + "." + str(sys.version_info[1])'" -c -O2 -pipe -fPIC -Icryptopp -DUSE_CRYPTOPP -D__STDC_LIMIT_MACROS -lpthread CppBlockUtils_wrap.cxx In file included from /usr/include/python2.7/Python.h:58:0, from CppBlockUtils_wrap.cxx:151: /usr/include/python2.7/pyport.h:849:2: error: #error "LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)." make[1]: *** [CppBlockUtils_wrap.o] Error 1 make[1]: Leaving directory
/home/rvhaas/virtualisation/raspberrypi/armory-crosscompile/BitcoinArmory/cppForSwig'make: *** [all] Error 2