Lets dive deeper and having more fun with mining by utilizing our GPUs on the SBC to mine crypto currency. If you missed my last post about mining please go check it out. This is not much different other then using the GPU. We do it cause it’s fun!!
Asus TinkerBoard ► Amazon
Khadas Vim 2 ► Gearbest
Etcher ► https://etcher.io/
git cpuminer ► http://github.com/novaspirit/sgminer
GPU Crypto Mining on SBC
Step 1: Install OS of choice
First you will need to download OS. In this case i will be using TinkerOS
Now we will need a piece of software called etcher to write the image onto our SD card and USB Storage device.
Step 2: Check for updates
It is always a good idea to check for updates even if it is a freshly installed OS.
$ sudo apt-get update
$ sudo apt-get upgrade
Step 3: Compiling
We are going to first start with grabbing all the dependence needed to compiled the software we need with this apt-get command below
$ sudo apt-get install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++ git libgmp-dev opencl-headers libncurses5-dev libtool
Now it’s time to clone the source codes for the miner from my git which i have forked from the original creator. This mean any changes or updates the created adds will not effect us and you should check with his code regularly.
$ git clone https://github.com/novaspirit/sgminer
With the dependencies and source code in place, now it’s time to get into it and start generating the files we need to compile the miner.
$ cd sgminer
$ git submodule init
$ git submodule update
$ autoreconf -i
Compiler flags are needed to improve software, depending on hardware and what the gcc can do, you only have limited options. This compiler flag you will be inputting applies to raspberry pi and tinkerboard but not the VIM2… do you see what I mean? essentially you can not use the CFLAG options at all just to test if the software will compile.
$ CFLAG="-O2 -march=native" ./configure --disable-adl
We are almost there!! now it’s time to actually compile the software with the make command. Using the “-j#” options allows you to utilize the amount of cores you have on the device.
$ make -j4
Compiling is complete. all we need to do now is point the software into a pool
$ ./sgminer -k lyre2rev2 -o pool:8000 -u username -p password -w 64 -I 18
play around with the workload (-w) and the intensity (-I) to see if you can achieve higher hash rates.
if everything is working as it should you should see a screen like this
that’s it folks!! If you have any question please leave a comment below!!