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!!
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?
i was able to mine script with it. have you played around with the workload changing to 64?
I had the same problem. Try lyra2rev2 instead of lyre2rev2.
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…
Mali 400 gpu does not have opencl capabilities.
https://en.wikipedia.org/wiki/Mali_(GPU)
That’s not what the Orange Pi website says…
http://www.orangepi.org/orangepione/
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).
I would like to try cryptonight algo also.
I would also like to try GPU mining with intel for a SBC like UDOO x86.
sudo apt-get install beignet for providing Intel OpenCL open-source support did not work.
Here is a ARMv8a cryptonight miner with cpu and gpu mining.
https://github.com/hyc/wolf-xmr-miner
I could not get it to compile on the tinkerboard.
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!
what os did you go with
Keep getting this error:
Algorithm lyre2rev2 not found, using ckolivas.
???
it is Lyra2rev2, not Lyre…
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.
hi, is it possible to get cryptonight support on this version of sgminer?
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.
edit: activating openGL and rebooting does not solve this problem
ok i’ve found out that openCL is needet and not openGL (which can be activated in the pi’s config) OpenCL should by possible too like told in this link: https://www.raspberrypi.org/forums/viewtopic.php?t=194952 But unfortunately i’m not able to do the bulding of the source code. If anyone is fit in such stuff please let me know how to do this step by step
i have looked every where for someone that has put a tinker cluster together like the pi…one master and it using the other boards as a supercomputer…can it be done and is it like setting up the pis…if it is i can just set it up like that
can it be set up to mine neoscrypt … I’m not good at this but i can at least try…if you could point me in the right direction for reading and what i need to do it would be great…im also going to set up liquid cooling after your vid. that is just cool. thanks
i tried but it gave but it gives “Failed to resolve (wrong URL?) mona.supernova.cc:2995”, i tried other port like 80 or 8000 but always having same issue
I’m using XU4 Odroid Ununtu 16 Base
I managed to install the miner But he works very slowly.
It recognizes the video card:
root@odroid:~/sgminer# ./sgminer -n
[12:30:18] CL Platform vendor: ARM
[12:30:18] CL Platform name: ARM Platform
[12:30:18] CL Platform version: OpenCL 1.2 v1.r12p0-04rel0.03af15950392f3702b248717f4938b82
[12:30:18] Platform devices: 2
[12:30:18] 0 Mali-T628
[12:30:18] 1 Mali-T628
[12:30:18] 2 GPU devices max detected
It takes him only three minutes to get started and when he starts working it’s really slow:
GPU 0: | 252.0/ 127.0h/s | R: 0.0% HW:0 WU:0.182/m I: 8
GPU 1: | 246.0/ 125.0h/s | R: 0.0% HW:0 WU:0.000/m I: 8
Is there anything I’m missing?
Hi KFIR, I had same issue, until I changed “lyre..” to “lyra” in the address to start mining. You might also check to see if you’re getting any hash rate in your wallet. That would be a sign that this code isn’t working all the way through.
Hi stjameS I’ve read all the comments here and talked about it and checked myself over and over again, that’s not the point.
In my opinion this is the way it compile or a missing lib.
Someone encountered such a problem with the XU4?
novaspirit can you prepare us a mining guide on the Mali GPU for cryptonight?
Regardless, In the course of the attempts I was able to compile cpuminer-multi algo on arm linux Ubuntu/Debian with the best results hashrate at the moment and there are many algorithms that can be used.
https://github.com/tpruvot/cpuminer-multi
Hi and thanks for a great post, can you make and update for use the new sgminer with more algoritms support https://github.com/genesismining/sgminer-gm
thanks in advance
Hello there,
I love how your tutorials helps me out greatly on learning more on these amazing SBCs. I was wondering if you could look into 2 separate reviews and/or tutorials:
1. With the GPU mining on the Tinker Board I was wondering if you could find a way to compile the program to mine the cryptonight algorithm to mine Monero? I’m sure many people, including myself, are curious if it’s possible and with such low power usage it might be very profitable, despite not being a high end piece of equipment.
2. I also have a Raspberry Pi 3 with a device called ClusterHat (https://clusterhat.com/) and I have attached 4 Raspberry Pi Zero W on top of it for a basic cluster computer solution. I do see a faster computing in general with it but I was hoping to get a better tutorial on what else it is capable of doing, including in the CPU mining process.
Fantastic tutorial. I did notice that this miner doesn’t handle the cryptonight algorithm. I tried the same instructions with the nicehash sgminer but it gave me errors. Any advice on getting a cryptonight miner running on the tinkerboard?
./sgminer -n
[12:14:10] Error -1001: clGetPlatformsIDs failed (no OpenCL SDK installed?)
[12:14:10] clDevicesNum returned error, no GPUs usable
[12:14:10] 0 GPU devices max detected
what can i do to correct this error.
you installed the OpenCL SDK.
hi, the device shows that it extracts 43 kh / s and in the supernova account it appears as inactive, why, all made according to the monacoin
Hi,
Do you have an os image for Khadas Vim2 that work with opencl?
It has a system installed from the Asus site (20170417-tinker-board-linaro-stretch-alip-v1.8.img), I did everything in accordance with the tutorial and sgminer sees the GPU but unintey after logging in the supernova account is clearly used as inactive, I wrote to supernova administrator, he wrote back that I have IDLE status, why this is happening
I was able to install and activate the miner on the suprnova.cc pool. I used the following command: ./sgminer -k lyra2rev2 -o stratum+tcp://mona.su│··
prnova.cc:2995 -u -p -w 64 -I 18
but I am hitting this error:
No servers were found that could be used to get work from. │··
[22:03:12] Please check the details from the list below of the servers you ha│··
ve input │··
[22:03:12] Most likely you have input the wrong URL, forgotten to add a port,│··
or have not set up workers │··
[22:03:12] Pool: 0 URL: stratum+tcp://mona.suprnova.cc:2995 User: XXXX.│··
XXXX Password: XXXX
Did anyone else get something similar, and if so, did you manage to fix that? I definitely have the port on and have a worker defined.
Thanks for your time.
i have five tinkerboards mining Mona on surpnova, but it is not doing too well on the shares. Probably because of the difficulty and the low hashrate. I have noticed that when I run sgminer up, if I get an error message that the GPU is not active, i reduce the intensity down to 14 and it works well.
I want to second the hopes that a new guide with sgminer-gm will be created. Let me know if you need any testers out there!
For the CPUmulti perspective, there will need to be an update to this because of the Monero hard fork to utilize the new monero7 algo. However you can still use cryptonight to mine BCN and it works well.
Hi,
It’s some kind of wall, I have a Tinkerboard device, everything is made according to the instructions to extract it, sgminer shows the output 43 kh / s, on the spupernova horse it displays no active user. I do not recommend it, it’s a waste of time.
Hi all,
I would really love to see a tutorial on how to get GPU mining working on an Orange Pi PC 2 H5 with Mali 450 GPU.
Maybe in combination with CPU mining even!?!
I already tried to get the OpenCL working on an Orange Pi PC 2 Mali 450 GPU but no luck here yet.
Has anyone tried mining Monero with the Tinkerboard? Has the hashrate improved or dropped since the Monero hard fork?
I am constantly searching online for ideas that can facilitate me. Thanks!
My tinker board is mining at 43kh/s but on my nova account it is inactive
Suprnova is also not reflecting activity for me.