Add minion driver into cgminer
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
diff --git a/Makefile.am b/Makefile.am
index 2311ead..de7bf39 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -92,6 +92,10 @@ if HAS_BAB
cgminer_SOURCES += driver-bab.c
endif
+if HAS_MINION
+cgminer_SOURCES += driver-minion.c
+endif
+
if HAS_MODMINER
cgminer_SOURCES += driver-modminer.c
bitstreamsdir = $(bindir)/bitstreams
diff --git a/README b/README
index 080bbaa..40d6374 100644
--- a/README
+++ b/README
@@ -111,6 +111,7 @@ CGMiner specific configuration options:
--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-minion Compile support for BlackArrow Minion ASIC (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 528f10d..c0055bd 100644
--- a/api.c
+++ b/api.c
@@ -25,7 +25,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) || defined(USE_BAB) || defined(USE_DRILLBIT)
+#if defined(USE_BFLSC) || defined(USE_AVALON) || defined(USE_HASHFAST) || defined(USE_BITFURY) || defined(USE_KLONDIKE) || defined(USE_KNC) || defined(USE_BAB) || defined(USE_DRILLBIT) || defined(USE_MINION)
#define HAVE_AN_ASIC 1
#endif
@@ -183,6 +183,9 @@ static const char *DEVICECODE = ""
#ifdef USE_BAB
"BaB "
#endif
+#ifdef USE_MINION
+ "MBA "
+#endif
#ifdef USE_MODMINER
"MMQ "
#endif
diff --git a/cgminer.c b/cgminer.c
index 553ce1e..2aed581 100644
--- a/cgminer.c
+++ b/cgminer.c
@@ -1532,6 +1532,9 @@ static char *opt_verusage_and_exit(const char *extra)
#ifdef USE_BAB
"BaB "
#endif
+#ifdef USE_MINION
+ "minion "
+#endif
#ifdef USE_MODMINER
"modminer "
#endif
diff --git a/configure.ac b/configure.ac
index ae627e4..862d940 100644
--- a/configure.ac
+++ b/configure.ac
@@ -236,6 +236,17 @@ if test "x$knc" = xyes; then
fi
AM_CONDITIONAL([HAS_KNC], [test x$knc = xyes])
+minion="no"
+
+AC_ARG_ENABLE([minion],
+ [AC_HELP_STRING([--enable-minion],[Compile support for BlackArrow Bitfury (default disabled)])],
+ [minion=$enableval]
+ )
+if test "x$minion" = xyes; then
+ AC_DEFINE([USE_MINION], [1], [Defined to 1 if Minion BlackArrow ASIC support is wanted])
+fi
+AM_CONDITIONAL([HAS_MINION], [test x$minion = xyes])
+
modminer="no"
AC_ARG_ENABLE([modminer],
@@ -450,6 +461,12 @@ else
echo " Avalon.ASICs.........: Disabled"
fi
+if test "x$minion" = xyes; then
+ echo " BlackArrowMinion.ASIC: Enabled"
+else
+ echo " BlackArrowMinion.ASIC: Disabled"
+fi
+
if test "x$bab" = xyes; then
echo " BlackArrow.ASICs.....: Enabled"
else
@@ -510,7 +527,7 @@ else
echo " ModMiner.FPGAs.......: Disabled"
fi
-if test "x$avalon$bab$bflsc$bitforce$bitfury$hashfast$icarus$klondike$knc$modminer$drillbit" = xnonononononononononono; then
+if test "x$avalon$bab$bflsc$bitforce$bitfury$hashfast$icarus$klondike$knc$modminer$drillbit$minion" = xnononononononononononono; then
AC_MSG_ERROR([No mining configured in])
fi
diff --git a/miner.h b/miner.h
index 6a1c1fb..cab07c6 100644
--- a/miner.h
+++ b/miner.h
@@ -239,6 +239,7 @@ static inline int fsync (int fd)
DRIVER_ADD_COMMAND(knc) \
DRIVER_ADD_COMMAND(drillbit) \
DRIVER_ADD_COMMAND(bab) \
+ DRIVER_ADD_COMMAND(minion) \
DRIVER_ADD_COMMAND(avalon)
#define DRIVER_PARSE_COMMANDS(DRIVER_ADD_COMMAND) \