Skip to content

Latest commit

 

History

History
58 lines (46 loc) · 1.88 KB

build-ain-arm64.md

File metadata and controls

58 lines (46 loc) · 1.88 KB

Build DeFi Node on Raspberry Pi 4B with Raspberry OS 64-Bit

Documentation

Source Code

Download the latest source code from DefiCh/ain and extract them to your /home/user/ directory (eg. /home/pi/):

Build ain-3.2.8

Install all dependencies

sudo apt-get install build-essential libtool autotools-dev automake pkg-config bsdmainutils python3 curl

Now, you can either build from self-compiled depends or install the required dependencies:

sudo apt-get install libssl-dev libevent-dev libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev
sudo apt-get install libminiupnpc-dev libzmq3-dev libsecp256k1-dev

Make sure you install the build requirements mentioned above. Then, install the toolchain:

sudo apt-get install g++-aarch64-linux-gnu

Build Berkeley DB

It is recommended to use Berkeley DB 4.8. If you have to build it yourself, you can use installation script included in contrib:

cd /home/pi/ain-3.2.8/
./contrib/install_db4.sh /home/pi/ain-3.2.8/

Build executables

cd /home/pi/ain-3.2.8/depends
make HOST=aarch64-linux-gnu NO_QT=1 
cd ..
./autogen.sh
export BDB_PREFIX='/home/pi/ain-3.2.8/db4'
./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/include" CXXFLAGS="-march=armv8-a+crc+crypto" --prefix=$PWD/depends/aarch64-linux-gnu --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++

And finally:

make HOST=aarch64-linux-gnu -j4

...and if you want you can create a package (e.g. /home/pi/ain-3.2.0/depends/aarch64-linux-gnu) which contains the files as you get them from DeFiChain for the other platforms:

make install