ASICMINER Block Erupter Bitcoin mining on Raspberry Pi

Written by Peter Davies on .

Install all the required compiling tools:

apt-get install git-core gcc make autoconf libtool libcurl4-openssl-dev libncurses5-dev pkg-config automake yasm libudev-dev screen

Plug the USB based ASICMINER Block Erupter and check its been detected with:

ls -l /dev/ttyUSB*

The results showing something like:

[email protected]:~# ls -l /dev/ttyUSB*
crw-rw---T 1 root dialout 188, 0 Jan  1  1970 /dev/ttyUSB0

Get a copy of the latest cgminer source preferrably through GitHub for ease of updating:

git clone git://github.com/ckolivas/cgminer.git cgminer

Move inside the cgminer folder and execute the the autogen.sh file. For the Block Erupter we need to enable icarus support. On a Raspberry PI this takes a while:

cd cgminer ./autogen.sh --enable-icarus

Eventually you will see something like the following after several pages of check scripts:

------------------------------------------------------------------------
cgminer 3.7.0
------------------------------------------------------------------------
Configuration Options Summary:

  libcurl(GBT+getwork).: Enabled: -lcurl
  curses.TUI...........: FOUND: -lncurses
  OpenCL...............: Detection overrided. GPU mining support DISABLED
  scrypt...............: Disabled (needs OpenCL)
  ADL..................: SDK NOT found, GPU monitoring support DISABLED

  Avalon.ASICs.........: Disabled
  BFL.ASICs............: Disabled
  KnC.ASICs............: Disabled
  BitForce.FPGAs.......: Disabled
  BitFury.ASICs........: Disabled
  Hashfast.ASICs.......: Disabled
  Icarus.ASICs/FPGAs...: Enabled
  Klondike.ASICs.......: Disabled
  ModMiner.FPGAs.......: Disabled

Compilation............: make (or gmake)
  CPPFLAGS.............:
  CFLAGS...............: -g -O2
  LDFLAGS..............:  -lpthread
  LDADD................:  -lcurl   compat/jansson-2.5/src/.libs/libjansson.a -lpthread     -lm compat/libusb-1.0/libusb/.libs/libusb-1.0.a -ludev -lrt

Installation...........: make install (as root if needed, with 'su' or 'sudo')
  prefix...............: /usr/local

No need to run configure as its just been done by the autogen.sh command. So, now begin the compilation process using:

make && make install

Use screen so that you can continue to use the software and close the shell connection use the command:

screen

Now type your access details to any:

./cgminer -o http://api.bitcoin.com:8332 -u worker1 -p pass