Tuesday, September 3, 2013

Linux butterflylabs + cgminer !

Finally, I received my first order of a butterfly labs miner (little single)!!! Woohoo! This device is 30GH/s and depending on which pool you connect to, you will not do 30GH/s !  At 30GH/s the device needs 130W, at 10GH/s it needs 60W.

As you can see in my other post, my preferred mining pool is bitcoinpool. But their hashing rate is very low. As for now, they did not solve a block for few month. I also like deepbit.net. Their hashing rate is nice (1-2 block/day) but I only get 10GH/s. So I switched to btcguild.com. It is the biggest pool, there I can get 30GH/s!

Now here are the steps to configure cgminer (on kubuntu linux) to work with this device !

$sudo apt-get install libcurl4-openssl-dev git-core subversion build-essential libusb-dev libudev vim libncurses5-dev pkg-config automake yasm openssh-server openssh-client

note: if you also want to use little usb blockerupter only add "--enable-ica" after enabling bflsc

$mkdir bitcoin
$cd bitcoin
$git git://github.com/ckolivas/cgminer.git cgminer
of git pull (in the cgminer folder) if you already use cgminer
$cd cgminer
$CFLAGS="-O2 -Wall -march=native"  LDFLAGS="-L/opt/AMDAPP/lib/x86_64" ./configure --enable-bflsc

if you are using small usb blockerupters, add --enable-icarus at the end

$make install

cgminer will connect directly to the device, your user need to have access to the device, so your user need to be in the plugdev group.

$sudo usermod -G plugdev -a bitcoin
where bitcoin is your user

$cp 01-cgminer.rules /etc/udev/rules.d/

you have to reboot your computer (or restart udev and logout)

The command line should look like :
$cd ~/bitcoin/cgminer
$./cgminer -o server:port --userpass user:password

note: if you want to have a different worker for your different hardware, you can run multiple instance of cgminer. To do so you need to tell to cgminer to use which hardware. For me, I want to have one worker for my bfl and an other one for my block erupter. So when calling cgminer I have to add :  --usb BAS:10,ICA:0 this tells cgminer to load all bfl labs (up to 10) and load 0 block erupter.

Enjoy your new hardware ! :-)