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