#!/bin/sh #Start with a dir containing subdir 'distfiles' #(see below) and 'bitcoin' (turdatronic edition.) #Also an empty subdir, 'ourlibs'. ###################################### #Turds! #These must sit in distfiles dir. #Put in your favourites. I merely happened to have #these on hand. #For now, no checksum trap. Somebody add this? OPENSSL=openssl-1.0.1g BDB=db-4.8.30 BOOST=boost_1_52_0 ###################################### DIST=./distfiles OURLIBS=$(realpath ./ourlibs) # if you're on a gentoo box, simply: # 'crossdev armv5tel-softfloat-linux-gnueabi' export CROSS_PREFIX=arm-buildroot-linux-uclibcgnueabi export CC=$CROSS_PREFIX-gcc export CXX=$CROSS_PREFIX-g++ export LD=$CROSS_PREFIX-ld export CFLAGS=-I/usr/$CROSS_PREFIX/usr/include export LDFLAGS=-L/usr/$CROSS_PREFIX/usr/lib export PATH=$PATH:/usr/$CROSS_PREFIX/usr/bin tar xvfz $DIST/$OPENSSL.tar.gz; cd $OPENSSL; ./Configure --prefix=$OURLIBS linux-generic32 no-dso no-shared && make && make install; mkdir $OURLIBS/lib cp libssl.* $OURLIBS/lib/ cp libcrypto.* $OURLIBS/lib/ mkdir $OURLIBS/include mkdir $OURLIBS/include/openssl cp include/openssl/*.h $OURLIBS/include/openssl/; cd ..; tar xvfz $DIST/$BDB.tar.gz; cd $BDB/build_unix; echo "--prefix: " $OURLIBS; ../dist/configure --enable-cxx --host=${CROSS_PREFIX} --prefix=$OURLIBS && make && make install && cd ../..; tar xvjf $DIST/$BOOST.tar.bz2; cd $BOOST; echo "using gcc : arm : $CXX ;" >> tools/build/v2/user-config.jam; rm -rf boost/; rm -rf libs/ rm Jamroot cp -R ../distfiles/myboost/* . ./bootstrap.sh; ./bjam toolset=gcc-arm link=static -sNO_BZIP2=1 -sNO_ZLIB=1 -sNO_COMPRESSION=1; ./bjam toolset=gcc-arm link=static --prefix=$OURLIBS install; cd ..; export BOOST_INCLUDE_PATH=$OURLIBS/include export BDB_INCLUDE_PATH=$OURLIBS/include export OPENSSL_INCLUDE_PATH=$OURLIBS/include export BOOST_LIB_PATH=$OURLIBS/lib export BDB_LIB_PATH=$OURLIBS/lib export OPENSSL_LIB_PATH=$OURLIBS/lib cd bitcoin/src; make LMODE=static LMODE2=static STATIC=1 -f makefile.unix bitcoind $CROSS_PREFIX-strip bitcoind