X
    Categories: Guides

GPU Mining on Tinkerboard

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!!

Equipment List

Raspberry Pi 3 ► Amazon | Ebay

Asus TinkerBoard ► Amazon

Khadas Vim 2 ► Gearbest

Software List

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!!

novaspirit: Avid Thinker, Computer Programmer, Web evangelist, Hacking / Breaking expert, Problem Solver, Technology Obsessed, Gamer, 3D printing, Coffee lover!

View Comments (44)

  • Hi,

    I followed your guide, but I keep getting this:

    [19:42:55] GPU0: Idle for more than 2 minutes, declaring SICK!
    [19:42:55] GPU0: Attempting to restart

    I'm trying to mine scrypt, is there an scrypt-specific problem or is there an issue with the sgminer fork?

  • Thanks for the great tutorial. I tried it on my orange pi zero which has mali 400 gpu. Code compiled well. Only problem I faced was during runtime. When I ran the code to mine, instead of starting the miner interface, it would just return back to the prompt. Tried making a shell script and also running it directly with all parameters. ./sgminer won't work. It wasn't throwing any errors. Just as if it completed its task and back to prompt.

    • aww man i was so excited to hear you tried it on orange pi. i wonder what i can be... i have a orange pi laying around so i might give that a try... i'll keep you posted. i be it must be something silly

    • I tried it with my oarangepi pc. Compiled fine, configure detected a GPU. Same problem: sgminer just exits. I recompiled it using --without-curses and now I see something:

      [17:59:28] Started sgminer
      [17:59:28] * using Jansson 2.7
      [17:59:28] Error -1001: clGetPlatformsIDs failed (no OpenCL SDK installed?)
      [17:59:28] clDevicesNum returned error, no GPUs usable
      [17:59:28] All devices disabled, cannot mine!

      So i miss something. It may be that de vanilla armbian image I use does not support opencl, having a trouble finding some usefull infro...

  • Is it possible to use cryptonight algorithm (Bytecoin mining)? If yes, then please can you give me a hash rate?! I don’t own yet a tinkerboard (only rPi3, but that is not working as you mentioned).

  • When compiling on a Raspberry Pi 3 I am getting errors. These are mostly, 'recipe for target '*' failed'.

    The first error is 'fatal: No names found, cannot describe anything.' Are the additional packages or compiler flags that need to be set for compiling on the RPi?

  • Hi, I was able to follow your tutorial and get sgminer installed and compiled. But I don't have a mining pool account. Is there a good one you'd recommend? I'd like to mine ethereum.

  • Hey, so I just decided to mine monacoin exactly as you did in the tutorial. It seems mining litecoin with a gpu is not practical anymore. It works great, I'm getting about 38 KH/s using the settings you described. Thanks for the great tutorial.

  • On my Tinkerboard, I am mining Monacoin on the GPU, and Magicoin on the CPU using the other guide you created on CPU mining. I too am getting around 38Khashes on sgminer and 7Khashes on minerd. Really fun and interesting guides! Thanks!

      • Yes, that was a typo. I meant Lyra2rev2.
        I tried different algorithms but keep getting the same result, always getting:

        "Algorithm ... not found, using ckolivas"

        I'm still wondering what's wrong.
        All previous steps passed without any issues.

  • Hey novaspirit, great tutorial. In the beginning you listet 3 devices which will be able to mine on gpu. Raspberry was included in this list. I followed your tutorial but in the configuration summery is OpenCL not found and gpu mining is disabled. Am i right that raspberry 3b is not able to mine on gpu? Did you or somebody else tried this ever? I would be happy to get some advices.

Related Post