Compiling Crypto Hardware Wallet (s) on ARM

This guide will cover the installation of TinkerOS to an ASUS Tinker Board and the installation of GUI wallets for Bitcoin, Vertcoin, Uninus, and Myriadcoin, to make your own hardware wallet. These instructions can generally be adapted for any crypto wallet that has a “qt” wallet based on bitcoin-core. Some instructions may need minor tweaking for your favorite coin.

I went with an ASUS Tinker Board for more CPU & RAM, as downloading and processing hundreds of gigabytes can take a long time with a raspberry pi, even with the newer 3. There are a myriad of reasons why you want to install the core wallets for the coins you support from running a full node to support the network, to simply wanting to ensure that you have full control over your keys, and thus, your coins. 

Materials Needed:

SoC Board (Raspberry Pi, ASUS Tinkerboard, etc)
External USB HDD
Micro SD Card & SD Card Reader/Adapter

TinkerOS

The regular TinkerOS can be found here: https://www.asus.com/uk/Single-Board-Computer/Tinker-Board/HelpDesk_Download/

I decided to go with a slightly preconfigured image as it has other software I wanted to utilize, found here: https://sourceforge.net/projects/tinkerboard/

Plug in your SD Card

Install etcher and select the TinkerOS image, your SD Card, and click flash.

Once finished take your SD card and insert it into Tinker Board, and connect your peripherals (including external HDD) and power.

If you used the preconfigured TinkerOS image, your username and password will be:

linaro/linaro

Change that immediately by typing:

passwd linaro

And setting a preferred password.

Remote Access

If you want to proceed with the rest of the setup remotely, open the system menu, select Preferences, then click Tinker Board Configuration, then select the Interfaces tab and set VNC to “On”.

Next obtain your IP address with

/sbin/ifconfig

Then on your remote computer access the now activated VNC server with your preferred VNC client. For me that is:

vncviewer 192.168.0.110

Dependencies

Let’s get the basic dependencies for our QT wallets and the tools to install and compile them:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install protobuf-compiler libminiupnpc-dev libevent-dev libtool libssl-dev libboost-all-dev qt4-dev-tools libprotobuf-dev libqrencode-dev autoconf git

BerkeleyDB

Bitcoin Core, and thus the majority of alt coins use the Berkeley database for their wallets. I prefer to do all software compilation and downloads on the external HDD, in order to save space on the SD Card. If you used the preconfigured image, it will have auto-mounted to:

/media/linaro/<drivename>

So, to install to my drive which is named “SSDT3”:

cd /media/linaro/SSDT3/
mkdir bin
cd bin/
wget http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz
tar -xzvf db-4.8.30.NC.tar.gz
cd db-4.8.30.NC/build_unix/
../dist/configure --enable-cxx
make
sudo make install

The “make” command will take anywhere from a few minutes to a half an hour, and this concludes the dependencies, we’ll move onto the actual coin wallets now.  

Bitcoin Wallet

Bitcoin

We’ll be installing the latest version of Bitcoin Core, which is the name of the crypto wallet from the bitcoin team, not the name of the currency, and it includes native support for bech32 addresses!
Return to the bin folder in your external:

cd /media/linaro/SSDT3/bin/ 
git clone -b 0.16 https://github.com/bitcoin/bitcoin.git
cd bitcoin/

You now have the bitcoin source, and we need to install it, using a similar method to how we installed the BerkeleyDB. The “make” command here will take several hours, and will for each wallet.

./autogen.sh
./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --enable-upnp-default --with-gui
make
sudo make install

Your last steps are to run the software and download the blockchain. I create a place for each blockchain:

cd /media/linaro/SSDT3/
mkdir blockchain
cd blockchain/
mkdir bitcoin

Now finally run the Bitcoin software, and when it asks where you want to download the blockchain data, select custom, and then browse to and select:

/media/linaro/SSDT3/blockchain/bitcoin/

Finally, you simply run the software, and it downloads the blockchain and syncs to the Bitcoin network.

bitcoin-qt &

Downloading blockchains can take a while, especially for Bitcoin. I opted to not download the blockchain immediately, but installed each wallet I wanted, and then synced the blockchains.

Vertcoin Wallet

Vertcoin

Installing Vertcoin is similar to Bitcoin. We’ll go to our bin folder, download the source code, and install it.

cd /media/linaro/SSDT3/bin/
git clone https://github.com/vertcoin-project/vertcoin-core.git
cd vertcoin-core/
./autogen.sh
./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --enable-upnp-default --with-gui
make
sudo make install

Your last steps are to run the software and download the blockchain. I create a place for each blockchain:

cd /media/linaro/SSDT3/blockchain/
mkdir vertcoin

Now finally run the Vertcoin software with:

vertcoin-qt &

and when it asks where you want to download the blockchain data, select custom, and then browse to and select:

/media/linaro/SSDT3/blockchain/vertcoin/

This can take a while so I recommend installing all your wallets first, then syncing one-by-one.

Unitus Wallet

Installing Unitus is similar to Bitcoin. We’ll go to our bin folder, download the source code, and install it.

cd /media/linaro/SSDT3/bin/
git clone https://github.com/unitusdev/unitus.git
cd unitus/
./autogen.sh
./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --enable-upnp-default --with-gui
make
sudo make install

Your last steps are to run the software and download the blockchain. I create a place for each blockchain:

cd /media/linaro/SSDT3/blockchain/
mkdir unitus

Now finally run the Vertcoin software with:

unitus-qt &

and when it asks where you want to download the blockchain data, select custom, and then browse to and select:

/media/linaro/SSDT3/blockchain/unitus/

This can take a while so I recommend installing all your wallets first, then syncing one-by-one.

Myriad Wallet

Myriad Coin
Myriad Coin

Myriadcoin is similar to Bitcoin, but their software has a dependency on libssl1.0, which currently is a different version that what is offered in the debian repositories that TinkerOS utilizes. Luckily, there is a pinned dev version for 1.0, and once you install that, Myriad follows the same structure.

sudo apt-get install libssl1.0-dev

Myriadcoin also has tests which will fail on our ARM processor, and so we will be modifying the ./configure command to explicitly ignore them when configuring the source for compilation.

cd /media/linaro/SSDT3/bin/
git clone https://github.com/myriadcoin/myriadcoin.git
cd myriadcoin/
./autogen.sh
./configure CPPFLAGS="-I/usr/local/BerkeleyDB.4.8/include -O2" LDFLAGS="-L/usr/local/BerkeleyDB.4.8/lib" --enable-upnp-default --with-gui --disable-tests --disable-gui-tests
make
sudo make install

Your last steps are to run the software and download the blockchain. I create a place for each blockchain:

cd /media/linaro/SSDT3/blockchain/
mkdir myraid

Now finally run the Myriad software with:

myriad-qt &

and when it asks where you want to download the blockchain data, select custom, and then browse to and select:

/media/linaro/SSDT3/blockchain/myriad/

This can take a while so I recommend installing all your wallets first, then syncing one-by-one.

Conclusion

The majority of visual wallets for any given cryptocurrency can be installed with this method, on any given ARM SoC board that uses Debian as its O.S. base. A noted exception is Ethereum, I was unable to compile any GUI-based wallet. Geth appears to be the best solution (It is a command line program).

 

3 Comments
  1. Howdy! This is kind of off topic but I need some
    help from an established blog. Is it difficult to set up
    your own blog? I’m not very techincal but I can figure things out pretty quick.
    I’m thinking about making my own but I’m not sure where to
    start. Do you have any ideas or suggestions? Cheers

  2. really i dont know how to compile crypto hardware wallet on ARM.but now icome to understand.thanks for sharing the information
    grepthor

Leave a reply

Your email address will not be published. Required fields are marked *