Fix Formatting and figure out startup script.
-
Setup a bitcoin wallet. You can find a list of available wallets at https://bitcoin.org/en/choose-your-wallet. I decided to https://www.coinbase.com to start.
-
Sign up for a bitcoin pool. A comparison of mining pools can be found at https://en.bitcoin.it/wiki/Comparison_of_mining_pools. I found this a bit overwhelming so I decide to start with Slush's pool, (https://mining.bitcoin.cz), as a few tutorials were using it. This video contains some info on setting it up. https://www.youtube.com/watch?v=blDhGFTGuhU
-
ssh into your raspberry pi
-
Pull down any updates to any packages you have currently installed,
$ sudo apt-get update
-
Install the updates you just downloaded,
$ sudo apt-get upgrade
-
Install our depencies
$ sudo apt-get install libusb-1.0-0-dev libusb-1.0-0 libcurl4-openssl-dev libncurses5-dev libudev-dev libtool automake pkg-config libjansson-dev tmux
-
If not already there go to your home directory/
$ cd
-
Clone cgminer from github.
$ https://github.com/ckolivas/cgminer.git
-
Go to the cgminer directory you just cloned.
$ cd cgminer
-
We first need to do some configuration before compiling cgminer. There seems to be a number of options to set. I wasn't 100% sure what needed to be set for using the U2, so I decided to keep following https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=103046 for this step.
$ sudo ./autogen.sh
$ export LIBCURL_CFLAGS=’-I/usr/include/curl’
$ ./configure --enable-icarus
Note: Running autogen and configure may take a bit to start after running the command, so be patient.
-
Now it's time to compile.
$ make
. -
$ sudo make install
-
Time for a snack break. You are now on your way to this. or this
-
Time to start up our miner. Open a tmux session so we can detach without closing the program.
$ tmux
-
$ cd cgminer
Changes working directory to cgminer directory. Assumes you are in your home directory.$ cd
if you are unsure. -
Start up cgminger. This setup is for Antminer U2's your setup may differ.
$ sudo ./cgminer --bmsc-options 115200:20 -o POOL -u USERNAME -p PASSWORD --bmsc-freq 0981
Since I am using slush's pool, I replaced "POOL" with stratum+tcp://stratum.bitcoin.cz:3333
. Yours will be different if you are using a pool other than Slush. Some tutorials say you need to add your devices, but since I am running 2 U2's only, cgminer automatically detects and runs both. If I was running different miners, say a U2 and a U3 I would need to specify the correct device to apply the correct settings.
Reference:(Clean Me!) https://github.com/AntMiner/AntGen1/tree/master/cgminer, http://bitcoinrigs.org/instructions/antminer-u1/, http://denis-gobo.squarespace.com/denisgobo/2014/5/17/how-to-install-and-overclock-a-bitmain-antminer-u2-2ghs-usb-bitcoin-asic-miner-on-windows, [http://www.granthamm.com/bitcoin-mining-raspberry-pi-antminer-u1-fun/](http://www.granthamm.com/bitcoin-mining-raspberry-pi-a ntminer-u1-fun/), https://learn.adafruit.com/piminer-raspberry-pi-bitcoin-miner/install-cgminer, https://www.youtube.com/watch?v=dPWTSytzN7g&index=2&list=PLPedo-T7QiNseMLPwm6xdknAAbZMGpQtB, https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=103046, https://www.youtube.com/watch?v=blDhGFTGuhU, https://bitcointalk.org/index.php?topic=259574.0, https://bitcointalk.org/index.php?topic=585225.0,
http://www.getfreebitcoins.us/bitcoin-mining/,
https://bitcointalk.org/index.php?topic=555638.0
CGMiner
- Deciphering the interface http://bitcoin.stackexchange.com/questions/19260/deciphering-cgminer-interface-in-terminal
AntMiner U3
- https://www.raspberrypi.org/forums/viewtopic.php?f=66&t=103046
- https://bitcointalk.org/index.php?topic=827356.840
Multidevice Resources
- http://askubuntu.com/questions/184526/how-to-get-bus-and-device-relationship-for-a-dev-ttyusb
- http://unix.stackexchange.com/questions/144029/command-to-determine-ports-of-a-device-like-dev-ttyusb0
Additional Info:
has anyone tried building this on a raspberry pi recently? I can't get this to build on my pi2B 3B or 4. with the most recent Raspberry PI OS's. Tried on both 32 and 64 bit and I get an epic crap-ton of errors in the compile. The first error is that CIRL is not located in '/usr/include/curl'
I would be interested in some help with this as I try to build cgminer for asic USB miners like the U2 and the NEWPAC miners