Raspberry Pi Build Guide

aciddude edited this page Mar 18, 2018 · 4 revisions

Trezarcoin

Raspberry Pi 3 model B

Build guide v1.0

AcidD

1 – Updating your rPi3 + initial dependency installation

Start by either connecting to your rPi3 via SSH or open your Terminal App if you’re working directly on your rPi3.

For this guide we are using Raspbian 9 (stretch) We can verify our version with the below command:

pi@rpi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)"
NAME="Raspbian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

The above output shows we are running Raspbian 9 (stretch)

Next, we start with a basic upgrade of what we currently have installed on the rPi3

sudo apt-get update

sudo apt-get upgrade

Building OpenSSL from source

At time of writing, Raspbian (stretch) comes with openssl 1.1.0f We need 1.0.X, so we need to use the backports and compile ourselves since the Debian version for jessie was compiled for ARMv6 and we need ARMv7 for our rPi3.

2.1 – Remove current version of OpenSSL

sudo apt-get remove openssl

sudo apt-get remove libssl-dev

2.2 – Add jessie-backports sources

The below command adds the keys needed for the Debian jessie-backports.

sudo apt-get -y install dirmngr

sudo apt-get -y install debian-keyring debian-archive-keyring

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8B48AD6246925553

We also need to add the jessie-backports sources "deb-src" to our apt sources list so we can retrieve the source code.

echo "deb-src http://ftp.debian.org/debian jessie-backports main" | sudo tee /etc/apt/sources.list.d/jessie-backports.list

Now we can run the below command to update our lists.

sudo apt-get update

2.3 – Build OpenSSL

Now we can download the specific OpenSSL source code from our jessie-backports list.

cd ~

mkdir deps

cd deps

sudo apt-get source openssl/jessie-backports

cd openssl-1.0.2l

sudo ./config --prefix="/home/pi/openssl/" shared enable-ec enable-ecdh enable-ecdsa -lanl -ldl

sudo make

sudo make install

You should now have your OpenSSL build in the below directory:

/home/pi/openssl

3 – Building BerkeleyDB from source

The official Trezarcoin-qt/Trezarcoind binaries from Trezarcoin.com use BerkeleyDB 4.8 so we’ll use that as well and need to build it from source.

cd ~

cd deps

wget http://download.oracle.com/berkeley-db/db-4.8.30.tar.gz

tar -xzvf db-4.8.30.tar.gz db-4.8.30

cd db-4.8.30/build_unix/

../dist/configure --enable-cxx --enable-shared

sudo make

sudo make install

When it’s finished installed you should see a final output like the below:

Libraries have been installed in:

  /usr/local/BerkeleyDB.4.8/lib

4 – Building Trezarcoin-qt

4.1 – Trezarcoin dependencies

We need to install some Trezarcoin dependencies first.

sudo apt-get -y install qt4-qmake libqt4-dev build-essential libevent-dev libtool libboost-all-dev libminiupnpc-dev libqrencode-dev git

4.2 – Trezarcoin-qt

cd ~
git clone https://github.com/TrezarCoin/TrezarCoin.git trezarcoin 
cd trezarcoin

nano trezarcoin-qt.pro

Edit line 10 and remove this “-DASM

Line 10 Before QMAKE_CFLAGS += -DASM -DOPT

Line 10 After QMAKE_CFLAGS += -DOPT

Save and close.

qmake "USE_QRCODE=1" "USE_UPNP=1" "OPENSSL_INCLUDE_PATH=/home/pi/openssl/include" "OPENSSL_LIB_PATH=/home/pi/openssl/lib" "BDB_INCLUDE_PATH=/usr/local/BerkeleyDB.4.8/include" "BDB_LIB_PATH=/usr/local/BerkeleyDB.4.8/lib"

make

4.3 – Make a Trezarcoin-qt Desktop Shortcut

Make a new blank shortcut file on your desktop.

nano /home/pi/Desktop/trezarcoin-qt.desktop

And then add the following:


[Desktop Entry]
Name=Trezarcoin-QT
Comment=Trezarcoin Core GUI
Exec=env LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/BerkeleyDB.4.8/lib:/home/pi/openssl/lib" /home/pi/trezarcoin/trezarcoin-qt
Type=Application
Encoding=UTF-8
Terminal=false
Categories=None;

Save and close.

Finally, double click the new shortcut on your Desktop to run Trezarcoin-qt!

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.