Getting Started With CGminer/BFGminer

advertisement
!
!
Getting Started With!
CGminer/BFGminer !
1. Windows environment!
!
!
Prepare Your Hardware!
!
If you have not already done so, prepare the storage space for your mining hardware.
Ideally, it should be free of debris and dust. Also make sure that the area where your
hardware will reside is stable and carefully protected from drinks and pets. !
!
Remove your hardware from packaging and get familiar with the cables it comes with.
Depending on your model, you may have a power supply (sometimes referred to as a
power brick, or "wall wart"). Plug your power supply in, and then plug the appropriate end
into your device. In the case of the Jalapeno hardware, you may not have a power brick,
but two USB cables instead - one cable will provide power over USB, while the other
provides communication for mining.!
!
Plug the USB cable(s) into an open port or ports on your PC or mining host. For many, that
will be a PC or laptop, but some may be using a Raspberry Pi or similar device. If you are
hosting multiple pieces of mining hardware, you may be interested in purchasing a USB
hub, which expands the available number of USB ports.!
!
Download Mining Software!
!
The choice of mining software to use is up to you. CGMiner and BFGMiner are two of the
most popular choices. Their output and set up are very similar, and we'll show in the next
step how to set up either.!
!
Download the mining software of your choice from one of the links below:!
https://github.com/ckolivas/cgminer!
https://github.com/luke-jr/bfgminer!
!
Once your download is completed, unzip or extract the files to your desktop, or preferred
folder.!
!
Configure Your Mining Software - BASIC!
!
Your hardware is now connected and powered on. It's not mining just yet. For that, let's
configure your mining software. We'll aim to produce a simple, reusable "start up" file.
Once we're done, you'll simply double-click on this file to launch your software. This
section looks long, but it is not as difficult as it seems. If you are confused about the
instructions, look at the included screen captures for guidance, and be sure to double
check the details of each step.!
!
If you are not a member of a pool already, now is the time to do so. !
You'll need your credentials (called "worker" info) and some pool information to configure
your mining software. Open your preferred text editor, such as Notepad, Notepad++, Vim,
or gedit. We'll show the specifics of Notepad, but the steps are very similar for others. !
!
Type the following, replacing the example user info with that of your own. !
!
Code:!
cgminer -o stratum+tcp://uk1.ghash.io:3333 -u username.worker -p YourPasswordHere!
!
Code:!
bfgminer -o stratum+tcp://uk1.ghash.io:3333-u username.worker -p YourPasswordHere!
!
Double check you've entered the appropriate credentials and url, then save the file. This is
not just a text file, though. On Windows you'll need to save the file with the ".bat"
extension. !
!
To do this in Notepad: Click on File, then Save As!
!
The following save dialog will appear: !
Next to "Save as type", open the drop-down menu and select "All Files" instead of "Text
Documents(*.txt). Next to "File Name", enter "StartMining.bat", without quotes!
Double check that Save as type is not "Text Documents", and click save.!
!
For ease later, move "StartMining.bat" to the folder containing your mining software files. !
!
Note for Linux users: instead of StartMining.bat, name your file StartMining.sh. After you
save it, right click the file, click on "Properties", then under the "Permissions" tab tick the
box for "Allow executing file as program". This will allow you to double-click the file to
launch your mining software.!
!
!
Start Mining!
!
Double click on your StartMining batch file, and you should see something like this:!
Congrats, you are now mining Bitcoin!!
!
!
Configuring your mining software - ADVANCED!
!
You can also configure your mining software from within the miner program itself. I will use
BFGMiner as an example: the miner has a [P]ool management option that allows you to
[A]dd pools, [R]emove pools and [E]nable or [D]isable them. Your pool’s connection data
will be saved by default in the already created file bfgminer.conf.!
!
!
!
!
!
!
!
!
!
To ADD a Pool!
!
After the miner has started!
!
•
•
•
•
•
!
press P to access pool management!
press A to add a pool!
enter pool’s URL (press Enter)!
enter "worker" name or username at your pool (press Enter)!
enter password for that worker (press Enter)!
• press S to access Settings to save your config file!
• press W to write the file!
• press Enter for bfgminer.conf or choose another file name!
!
To REMOVE a Pool!
!
After the miner has started!
!
• press P to access pool management!
• press R to remove a pool from the list above!
• enter the # of the pool you want to remove (again, see list above, it should start with 0:
Enabled GBT …)!
!
• press S to access Settings to save your config file!
• press W to write the file!
• press Enter for bfgminer.conf or choose another file name!
!
!
!
!
!
!
!
!
!
!
!
2. Mac OSX Installation!
!
Xcode!
!
To get started, you will need to install the Xcode. Xcode is a free download from the Apple
App Store. !
!
Command Line Tools!
Next you’ll need the Xcode Command Line Tools. Launch Xcode and then click the
Xcode>Preferences menu item. Click the Downloads tab and then click Install next to
Command Line Tools.!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
If the text next to Xcode Command Line Tools says Installed, carry on to the next step.!
!
Homebrew!
!
Next you’ll need to install Homebrew. Homebrew is a package manager for OS X that
provides a sane way of installing *nix tools, libraries, and their dependencies. Open up
Terminal.app and run the following command (from the Homebrew homepage):!
!
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"!
!
After you install Homebrew, make sure you run the following command (as the installer
should instruct you):!
!
brew doctor!
!
Make sure you address all errors or warnings before proceeding as they may prevent the
miners from installing.!
!
Miners!
!
Once Homebrew is successfully installed, you can run the following commands to install
cgminer and bfgminer:!
!
brew tap nwoolls/xgminer!
brew install cgminer!
!
or:!
!
brew tap nwoolls/xgminer!
brew install bfgminer!
!
If you specify the – HEAD (two dashes) parameter for brew install, then the latest sourcecode will be pulled for the miner from Github rather than using the latest official release.!
!
You can visit the Github repository to view the package contents.!
!
If you run into errors installing the above formulas, you can try running brew install with the
–debug –verbose parameters to find where things went wrong. I’d also recommend using
brew doctor to diagnose any issues.!
!
Driver Installation!
!
To load the required Apple drivers (if you intend to use bfgminer) execute the following
commands:!
!
sudo kextload -b com.apple.driver.AppleUSBCDC!
sudo kextload -b com.apple.driver.AppleUSBCDCACMData!
!
To unload those drivers (if you intend using cgminer) execute the following:!
!
sudo kextunload -b com.apple.driver.AppleUSBCDC!
sudo kextunload -b com.apple.driver.AppleUSBCDCACMData!
!
Detection!
!
Once you have the proper Bitcoin mining software installed and the kernel extensions
loaded (or unloaded), you can use the -d? argument to list available devices with bfgminer:!
!
bfgminer -d? -S bigpic:all!
[2013-12-19 01:54:19] Started bfgminer 3.8.1!
[2013-12-19 01:54:25] Devices detected:!
[2013-12-19 01:54:25] Device (driver=bigpic; procs=1; path=/dev/cu.usbmodem3a21)!
1 devices listed!
!
or with cgminer:!
!
cgminer -d?!
[2013-11-21 16:49:06] Started cgminer 3.8.2!
[2013-11-21 16:49:09] Devices detected:!
[2013-11-21 16:49:09] 0. BF1 0 (driver: bitfury)!
[2013-11-21 16:49:09] 1 devices listed!
!
Usage!
!
Both cgminer and bfgminer are command-line utilities. You can either run them without any
command line parameters and fill in the prompts for mining pool URL and credentials, or
you can use the following format to specify your pool:!
!
cgminer -o stratum+tcp://uk1.ghash.io:3333 -u username.worker -p YourPasswordHere!
!
or:!
!
bfgminer -o stratum+tcp://uk1.ghash.io:3333-u username.worker -p YourPasswordHere!
!
If you have multiple graphics cards, you’ll want to use the –no-opencl-binaries parameter
with bfgminer to avoid a crash on startup. This is not necessary with cgminer as it detects
OS X and applies the same workaround automatically.!
!
!
!
3. Installing cgminer on Ubuntu!
!
Installation requirements!
!
$ sudo su!
# apt-get install git autoconf libtool libcurl4-openssl-dev libncurses5-dev pkg-config yasm make!
!
First, become root.!
Then install all required software and libraries to compile cgminer.!
!
Installation!
!
Clone cgminer’s GitHub repo, prepare for the compilation and run the compilation process:!
!
# cd /opt/!
# git clone git://github.com/ckolivas/cgminer.git!
# cd cgminer/!
# ./autogen.sh --disable-opencl --disable-adl --enable-cpumining!
# CFLAGS="-O2 -Wall -march=native" ./configure --disable-opencl --disable-adl --enablecpumining !
# make -j8!
!
If you have a GPU and you managed to run it, you may want to skip disabling OpenCL or ADL.!
!
Testing !
!
Run the following command:!
!
# ./cgminer —benchmark!
!
If the compilation is successful, the speed of your CPU(s) will be displayed.!
!
Mining!
!
Now you need to register on ghash.io, if you have not already done so, and run mining
with your worker’s credentials:!
!
# ./cgminer -o stratum+tcp://uk1.ghash.io:3333 -u username.worker -p YourPasswordHere!
!
!
4. Installing bfgminer on Ubuntu!
!
Installation requirements!
!
First, become root.!
Then install all required software and libraries to compile bfgminer.!
!
$ sudo su!
apt-get install git autoconf automake libtool pkg-config libcurl4-gnutls-dev libjansson-dev uthashdev libncurses5-dev!
!
Installation!
!
Clone bfgminer’s GitHub repo, prepare for the compilation and run the compilation
process:!
!
# cd /opt/!
# git clone git://github.com/luke-jr/bfgminer.git!
# cd bfgminer/!
# ./autogen.sh --disable-opencl --disable-adl --enable-cpumining!
# CFLAGS="-O2 -Wall -march=native" ./configure --disable-opencl --disable-adl --enablecpumining !
# make -j8!
!
If you have a GPU and you managed to run it, you may want to skip disabling OpenCL or ADL.!
!
Testing!
!
Run the following command:!
!
# ./bfgminer —benchmark!
!
If the compilation is successful, the speed of your CPU(s) will be displayed.!
!
Launching!
!
Now you need to register on ghash.io, if you have not already done so, and run mining
with your worker’s credentials:!
!
# ./bfgminer -o stratum+tcp://uk1.ghash.io:3333 -u username.worker -p YourPasswordHere!
!
CGMiner specific configuration options:!
!
--enable-avalon
Compile support for Avalon (default disabled)!
--enable-bflsc
Compile support for BFL ASICs (default disabled)!
--enable-bitforce
Compile support for BitForce FPGAs (default disabled)!
--enable-bitfury
Compile support for BitFury ASICs (default disabled)!
--enable-hashfast
Compile support for Hashfast (default disabled)!
--enable-icarus
Compile support for Icarus (default disabled)!
--enable-knc
Compile support for KnC miners (default disabled)!
--enable-bab
Compile support for BlackArrow Bitfury (default disabled)!
--enable-minion
Compile support for BlackArrow Minion ASIC (default disabled)!
--enable-klondike
Compile support for Klondike (default disabled)!
--enable-modminer
Compile support for ModMiner FPGAs(default disabled)!
--without-curses
Compile support for curses TUI (default enabled)!
--with-system-libusb Compile against dynamic system libusb (default use included
static libusb)!
!
BFGMiner specific configuration options:!
!
--disable-avalon
Compile support for Avalon (default enabled)!
--enable-cpumining
Build with cpu mining support(default disabled)!
--enable-opencl
Compile support for OpenCL (default disabled)!
--disable-adl
Build without ADL monitoring (default enabled)!
--disable-bitfury
Compile support for Bitfury (default enabled)!
--enable-bfsb
Compile support for BFSB (default disabled)!
--disable-bigpic
Compile support for Big Picture Mining USB (default enabled)!
--disable-littlefury Compile support for LittleFury (default enabled)!
--disable-nanofury
Compile support for NanoFury (default enabled)!
--disable-hashbuster Compile support for HashBuster Nano (default enabled)!
--disable-hashbuster2 Compile support for HashBuster Micro (default if libusb)!
--enable-metabank
Compile support for Metabank (default disabled)!
--disable-bitforce
Compile support for BitForce (default enabled)!
--disable-icarus
Compile support for Icarus (default enabled)!
--disable-klondike
Compile support for Klondike (default enabled)!
--enable-knc
Compile support for KnC (default disabled)!
--disable-modminer
Compile support for ModMiner (default enabled)!
--disable-x6500
Compile support for X6500 (default enabled)!
--disable-ztex
Compile support for ZTEX (default if libusb)!
--enable-scrypt
Compile support for scrypt mining (default disabled)!
--with-system-libblkmaker Use system libblkmaker rather than bundled one (default
disabled)!
--with-udevrulesdir=DIR Install udev rules into this directory!
--without-sensors
Build with libsensors monitoring (default enabled)!
--without-curses
Compile support for curses TUI (default enabled)!
--without-libmicrohttpd Compile support for libmicrohttpd getwork server (default enabled)!
--without-libevent
Compile support for libevent stratum server (default enabled)!
--without-libusb
Compile using libusb (default enabled)!
--without-libudev
Autodetect FPGAs using libudev (default enabled)
Download
Study collections