README.ASIC 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218
  1. SUPPORTED DEVICES
  2. Currently supported ASIC devices include Avalon, Bitfountain's Block Erupter
  3. series (both USB and blades), a large variety of Bitfury-based miners,
  4. Butterfly Labs' SC range of devices, HashBuster boards, Klondike modules, and
  5. KnCminer's Mercury, Jupiter and Saturn.
  6. AVALON
  7. ------
  8. Currently, Avalon boards are best supported by connecting them directly (or via
  9. a hub) to a regular PC running BFGMiner. It is also possible to install the
  10. OpenWrt packages of BFGMiner to the Avalon's embedded controller, but this is
  11. not a simple task due to its lack of available flash space.
  12. To use the Avalon from a regular PC, you will need to specify two options:
  13. First, add the -S option specifying the avalon driver specifically. For example,
  14. -S avalon:\\.\COM9
  15. Next, use the --set-device option to provide the device configuration.
  16. If you are translating options from --avalon-options (cgminer and older versions
  17. of BFGMiner), note the values are baud:miner_count:asic_count:timeout:clock.
  18. baud=N The device is essentially hard coded to emulate 115200 baud,
  19. so you shouldn't change this.
  20. miner_count=N Most Avalons are 3 module devices, which come to 24 miners.
  21. 4 module devices would use 32 here.
  22. asic_count=N Virtually all have 10, so don't change this.
  23. timeout=N This defines how long the device will work on a work item
  24. before accepting new work to replace it. It should be changed
  25. according to the frequency (last setting). It is possible to
  26. set this a little lower if you are trying to tune for short
  27. block mining (eg p2pool) but much lower and the device will
  28. start creating duplicate shares.
  29. clock=N This is the clock speed of the devices. Only specific values
  30. work: 256, 270, 282 (default), 300, 325, 350 and 375.
  31. Sample settings for valid different frequencies (last 2 values):
  32. 34:375
  33. 36:350
  34. 39:325
  35. 43:300
  36. 45:282
  37. 47:270
  38. 50:256
  39. BFSB, MEGABIGPOWER, AND METABANK BITFURY BOARDS
  40. -----------------------------------------------
  41. Both BFSB and MegaBigPower (V2 only at this time) boards are supported with the
  42. "bfsb" driver. Metabank boards are supported with the "metabank" driver. These
  43. drivers are not enabled by default, since they must be run on a Raspberry Pi in
  44. a specific hardware configuration with the boards. To enable them, you must
  45. build with --enable-bfsb or --enable-metabank. Do not try to use these drivers
  46. without the manufacturer-supported hardware configuration! Also note that these
  47. drivers do not properly support thermal shutdown at this time, and without
  48. sufficient cooling you may destroy your board or chips!
  49. To start BFGMiner, ensure your Raspberry Pi's SPI is enabled (you can run the
  50. raspi-config utility for this). For Metabank boards, you must also load the I2C
  51. drivers (do not try to modprobe both with a single command; it won't work):
  52. modprobe i2c-bcm2708
  53. modprobe i2c-dev
  54. Then you must run BFGMiner as root, with the proper driver selected.
  55. For example:
  56. sudo bfgminer -S bfsb:auto
  57. BI*FURY
  58. -------
  59. Bi*Fury should just work; you may need to use -S bifury:<path>
  60. On Windows, you will need to install the standard USB CDC driver for it.
  61. http://store.bitcoin.org.pl/support
  62. If you want to upgrade the firmware, unplug your device. You will need to
  63. temporarily short a circuit. With the USB connector pointing forward, and the
  64. heatsink down, look to the forward-right; you will see two tiny lights, a set of
  65. 2 terminals, and a set of 3 terminals. The ones you need to short are the set of
  66. 2. With them shorted, plug the device back into your computer. It will then
  67. pretend to be a mass storage disk drive. If you use Windows, you can play along
  68. and just overwrite the firmware.bin file. If you use Linux, you must use mcopy:
  69. mcopy -i /dev/disk/by-id/usb-NXP_LPC1XXX_IFLASH_ISP-0:0 firmware.bin \
  70. ::/firmware.bin
  71. After this is complete, unplug the device again and un-short the 2 terminals.
  72. This completes the upgrade and you can now plug it back in and start mining.
  73. BIG PICTURE MINING BITFURY USB
  74. ------------------------------
  75. These miners are sensitive to unexpected data. Usually you can re-plug them to
  76. reset to a known-good initialisation state. To ensure they are properly detected
  77. and used with BFGMiner, you must specify -S bigpic:all (or equivalent) options
  78. prior to any other -S options (which might probe the device and confuse it).
  79. BLOCK ERUPTER BLADE
  80. -------------------
  81. Blades communicate over Ethernet using the old but simple getwork mining
  82. protocol. If you build BFGMiner with libmicrohttpd, you can have it work with
  83. one or more blades. First, start BFGMiner with the --http-port option. For
  84. example:
  85. bfgminer --http-port 8330
  86. Then configure your blade to connect to your BFGMiner instance on the same port,
  87. with a unique username per blade. It will then show up as a SGW device and
  88. should work more or less like any other miner.
  89. BLOCK ERUPTER USB
  90. -----------------
  91. These will autodetect if supported by the device; otherwise, you need to use
  92. the '--scan-serial erupter:<device>' option to tell BFGMiner what device to
  93. probe; if you know you have no other serial devices, or only ones that can
  94. tolerate garbage, you can use '--scan-serial erupter:all' to probe all serial
  95. ports. They communicate with the Icarus protocol, which has some additional
  96. options in README.FPGA
  97. KLONDIKE
  98. --------
  99. --klondike-options <arg> Set klondike options clock:temptarget
  100. KNCMINER
  101. --------
  102. The KnC miner uses a BeagleBoneBlack(BBB) as the host, this is pluged into a
  103. cape that holds the FPGA and connections for 4-6 ASICS depending on the cape
  104. version. The BBB runs the Angstrom linux distribution, the following is a step
  105. by step install for BFGMiner on this distro;
  106. -----------------Start------------
  107. cat >/etc/opkg/feeds.conf <<\EOF
  108. src/gz noarch http://feeds.angstrom-distribution.org/feeds/v2013.06/ipk/eglibc/all/
  109. src/gz base http://feeds.angstrom-distribution.org/feeds/v2013.06/ipk/eglibc/cortexa8hf-vfp-neon/base/
  110. src/gz beaglebone http://feeds.angstrom-distribution.org/feeds/v2013.06/ipk/eglibc/cortexa8hf-vfp-neon/machine/beaglebone/
  111. EOF
  112. opkg update
  113. opkg install angstrom-feed-configs
  114. rm /etc/opkg/feeds.conf
  115. opkg update
  116. opkg install update-alternatives
  117. opkg install automake autoconf make gcc cpp binutils git less pkgconfig-dev ncurses-dev libtool nano bash i2c-tools-dev
  118. while ! opkg install libcurl-dev; do true; done
  119. ln -s aclocal-1.12 /usr/share/aclocal
  120. curl http://www.digip.org/jansson/releases/jansson-2.0.1.tar.bz2 | tar -xjvp
  121. cd jansson-2.0.1
  122. ./configure --prefix=/usr CC=arm-angstrom-linux-gnueabi-gcc --disable-static NM=arm-angstrom-linux-gnueabi-nm
  123. make install && ldconfig
  124. cd ..
  125. git clone git://github.com/luke-jr/bfgminer
  126. cd bfgminer
  127. ./autogen.sh
  128. git clone git://github.com/troydhanson/uthash
  129. ./configure --host=arm-angstrom-linux-gnueabi --enable-knc CFLAGS="-I$PWD/uthash/src -O0 -ggdb"
  130. make AR=arm-angstrom-linux-gnueabi-ar
  131. /etc/init.d/cgminer.sh stop
  132. ./bfgminer -S knc:auto -c /config/cgminer.conf
  133. ---------------END-------------
  134. BFGMiner has also been incorporated into an unofficial firmware by uski01 called Bertmod this can be found on the kncminer forum.
  135. MONARCH
  136. -------
  137. The Butterfly Labs Monarch devices can be used as either USB devices, or in a
  138. PCI-Express slot. As USB devices, they are essentially plug-and-play. If you
  139. wish to use them via PCI-Express, however, you must first load the proper
  140. driver. BFGMiner can work with either Linux uio (2.6.23+, requires root access)
  141. or Linux vfio (3.6+, requires IOMMU support).
  142. To enable uio on your cards, you may need to do:
  143. sudo modprobe uio_pci_generic
  144. echo 1cf9 0001 | sudo tee /sys/bus/pci/drivers/uio_pci_generic/new_id
  145. Enabling vfio is similar, but more complicated, but allows you to run BFGMiner
  146. without root privileges. First, load the kernel module and tell it to accept the
  147. Monarch:
  148. sudo modprobe vfio-pci
  149. echo 1cf9 0001 | sudo tee /sys/bus/pci/drivers/vfio-pci/new_id
  150. Next, identify what the device ids are for your card(s):
  151. lspci -D | grep 1cf9 # the first number of each line is the device id
  152. From that, you can identify its IOMMU group, and list all devices sharing that
  153. group:
  154. readlink /sys/bus/pci/devices/<device_id>/iommu_group
  155. ls /sys/kernel/iommu_groups/<iommu_group>/devices/
  156. All of the devices listed (other than the Monarch), if any, will need to be
  157. disabled and unbound! To do that, use:
  158. echo <device_id> | sudo tee /sys/bus/pci/devices/<device_id>/driver/unbind
  159. If you want to run BFGMiner as a normal user:
  160. chown <username> /dev/vfio/<iommu_group>
  161. Depending on your system, you may also need to do:
  162. echo 1 | sudo tee /sys/module/vfio_iommu_type1/parameters/allow_unsafe_interrupts
  163. ---
  164. This code is provided entirely free of charge by the programmer in his spare
  165. time so donations would be greatly appreciated. Please consider donating to the
  166. address below.
  167. Luke-Jr <luke-jr+bfgminer@utopios.org>
  168. 1QATWksNFGeUJCWBrN4g6hGM178Lovm7Wh