Configure source for a new BaB driver
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
diff --git a/ASIC-README b/ASIC-README
index 5d71f05..bf83045 100644
--- a/ASIC-README
+++ b/ASIC-README
@@ -3,7 +3,8 @@ SUPPORTED DEVICES
Currently supported devices include the Avalon (including BitBurner and
Klondike), the Butterfly Labs SC range of devices, the ASICMINER block
erupters, the BF1 (bitfury) USB (red and blue) devices, KnCminer Mercury,
-Saturn and Jupiter devices, and upcoming Hashfast devices.
+Saturn and Jupiter devices, BlackArrow Bitfury devices and upcoming
+Hashfast devices.
No COM ports on windows or TTY devices will be used by cgminer as it
communicates directly with them via USB so it is normal for them to not exist or
@@ -34,6 +35,14 @@ in the FPGA-README. Configuring them uses the same mechanism as outlined
below for getting started with butterfly labs ASICs.
+BlackArrow Bitfury devices
+
+BlackArrow Bitfury devices need the --enable-bab option when compiling cgminer.
+
+The current BlackArrow Bitfury devices are similar to the Bitfury GPIO mining
+boards and come up as BaB. There are no options available for them.
+
+
BITFURY devices
Bitfury devices need the --enable-bitfury option when compiling cgminer.
diff --git a/Makefile.am b/Makefile.am
index e6899e9..e7a0993 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -100,6 +100,10 @@ if HAS_KLONDIKE
cgminer_SOURCES += driver-klondike.c
endif
+if HAS_BAB
+cgminer_SOURCES += driver-bab.c
+endif
+
if HAS_MODMINER
cgminer_SOURCES += driver-modminer.c
bitstreamsdir = $(bindir)/bitstreams
diff --git a/README b/README
index b8da21f..a7d144b 100644
--- a/README
+++ b/README
@@ -121,6 +121,7 @@ CGMiner specific configuration options:
--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-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)
diff --git a/api.c b/api.c
index 3ceaa8e..a9b16f8 100644
--- a/api.c
+++ b/api.c
@@ -29,7 +29,7 @@
#include "miner.h"
#include "util.h"
-#if defined(USE_BFLSC) || defined(USE_AVALON) || defined(USE_HASHFAST) || defined(USE_BITFURY) || defined(USE_KLONDIKE) || defined(USE_KNC)
+#if defined(USE_BFLSC) || defined(USE_AVALON) || defined(USE_HASHFAST) || defined(USE_BITFURY) || defined(USE_KLONDIKE) || defined(USE_KNC) || defined(USE_BAB)
#define HAVE_AN_ASIC 1
#endif
@@ -194,6 +194,9 @@ static const char *DEVICECODE = ""
#ifdef USE_KNC
"KnC "
#endif
+#ifdef USE_BAB
+ "BaB "
+#endif
#ifdef USE_MODMINER
"MMQ "
#endif
diff --git a/cgminer.c b/cgminer.c
index 00e358d..62455fb 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -1628,6 +1628,9 @@ static char *opt_verusage_and_exit(const char *extra)
#ifdef USE_KNC
"KnC "
#endif
+#ifdef USE_BAB
+ "BaB "
+#endif
#ifdef USE_MODMINER
"modminer "
#endif
diff --git a/configure.ac b/configure.ac
index 4975449..e5de221 100644
--- a/configure.ac
+++ b/configure.ac
@@ -287,6 +287,17 @@ if test "x$hashfast" = xyes; then
fi
AM_CONDITIONAL([HAS_HASHFAST], [test x$hashfast = xyes])
+bab="no"
+
+AC_ARG_ENABLE([bab],
+ [AC_HELP_STRING([--enable-bab],[Compile support for BlackArrow Bitfury (default disabled)])],
+ [bab=$enableval]
+ )
+if test "x$bab" = xyes; then
+ AC_DEFINE([USE_BAB], [1], [Defined to 1 if BlackArrow Bitfury support is wanted])
+fi
+AM_CONDITIONAL([HAS_BAB], [test x$bab = xyes])
+
icarus="no"
AC_ARG_ENABLE([icarus],
@@ -537,14 +548,14 @@ if test "x$opencl" != xno; then
else
echo " OpenCL...............: NOT FOUND. GPU mining support DISABLED"
- if test "x$avalon$bitforce$bitfury$icarus$modminer$bflsc$hashfast$klondike$knc" = xnonononononononono; then
+ if test "x$avalon$bitforce$bitfury$icarus$modminer$bflsc$hashfast$klondike$knc$bab" = xnononononononononono; then
AC_MSG_ERROR([No mining configured in])
fi
echo " scrypt...............: Disabled (needs OpenCL)"
fi
else
echo " OpenCL...............: Detection overrided. GPU mining support DISABLED"
- if test "x$avalon$bitforce$bitfury$icarus$modminer$bflsc$hashfast$klondike$knc" = xnonononononononono; then
+ if test "x$avalon$bitforce$bitfury$icarus$modminer$bflsc$hashfast$klondike$knc$bab" = xnononononononononono; then
AC_MSG_ERROR([No mining configured in])
fi
echo " scrypt...............: Disabled (needs OpenCL)"
@@ -597,6 +608,12 @@ else
echo " Hashfast.ASICs.......: Disabled"
fi
+if test "x$bab" = xyes; then
+ echo " BlackArrow.ASICs.....: Enabled"
+else
+ echo " BlackArrow.ASICs.....: Disabled"
+fi
+
if test "x$icarus" = xyes; then
echo " Icarus.ASICs/FPGAs...: Enabled"
else
diff --git a/driver-bab.c b/driver-bab.c
new file mode 100644
index 0000000..fe29547
--- /dev/null
+++ b/driver-bab.c
@@ -0,0 +1,14 @@
+#include "config.h"
+#include "compat.h"
+#include "miner.h"
+
+static void bab_detect(__maybe_unused bool hotplug)
+{
+}
+
+struct device_drv bab_drv = {
+ .drv_id = DRIVER_bab,
+ .dname = "BlackArrowBitFuryGPIO",
+ .name = "BaB",
+ .drv_detect = bab_detect
+};
diff --git a/miner.h b/miner.h
index ebbfa00..66e85b5 100644
--- a/miner.h
+++ b/miner.h
@@ -249,6 +249,7 @@ static inline int fsync (int fd)
DRIVER_ADD_COMMAND(hashfast) \
DRIVER_ADD_COMMAND(klondike) \
DRIVER_ADD_COMMAND(knc) \
+ DRIVER_ADD_COMMAND(bab) \
DRIVER_ADD_COMMAND(avalon)
#define DRIVER_PARSE_COMMANDS(DRIVER_ADD_COMMAND) \