Browse Source

Configure source for a new BaB driver

Kano 12 years ago
parent
commit
f792b1be97
8 changed files with 56 additions and 4 deletions
  1. 10 1
      ASIC-README
  2. 4 0
      Makefile.am
  3. 1 0
      README
  4. 4 1
      api.c
  5. 3 0
      cgminer.c
  6. 19 2
      configure.ac
  7. 14 0
      driver-bab.c
  8. 1 0
      miner.h

+ 10 - 1
ASIC-README

@@ -3,7 +3,8 @@ SUPPORTED DEVICES
 Currently supported devices include the Avalon (including BitBurner and
 Currently supported devices include the Avalon (including BitBurner and
 Klondike), the Butterfly Labs SC range of devices, the ASICMINER block
 Klondike), the Butterfly Labs SC range of devices, the ASICMINER block
 erupters, the BF1 (bitfury) USB (red and blue) devices, KnCminer Mercury,
 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
 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
 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.
 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
 
 
 Bitfury devices need the --enable-bitfury option when compiling cgminer.
 Bitfury devices need the --enable-bitfury option when compiling cgminer.

+ 4 - 0
Makefile.am

@@ -100,6 +100,10 @@ if HAS_KLONDIKE
 cgminer_SOURCES += driver-klondike.c
 cgminer_SOURCES += driver-klondike.c
 endif
 endif
 
 
+if HAS_BAB
+cgminer_SOURCES += driver-bab.c
+endif
+
 if HAS_MODMINER
 if HAS_MODMINER
 cgminer_SOURCES += driver-modminer.c
 cgminer_SOURCES += driver-modminer.c
 bitstreamsdir = $(bindir)/bitstreams
 bitstreamsdir = $(bindir)/bitstreams

+ 1 - 0
README

@@ -121,6 +121,7 @@ CGMiner specific configuration options:
   --enable-hashfast       Compile support for Hashfast (default disabled)
   --enable-hashfast       Compile support for Hashfast (default disabled)
   --enable-icarus         Compile support for Icarus (default disabled)
   --enable-icarus         Compile support for Icarus (default disabled)
   --enable-knc            Compile support for KnC miners (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-klondike       Compile support for Klondike (default disabled)
   --enable-modminer       Compile support for ModMiner FPGAs(default disabled)
   --enable-modminer       Compile support for ModMiner FPGAs(default disabled)
   --without-curses        Compile support for curses TUI (default enabled)
   --without-curses        Compile support for curses TUI (default enabled)

+ 4 - 1
api.c

@@ -29,7 +29,7 @@
 #include "miner.h"
 #include "miner.h"
 #include "util.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
 #define HAVE_AN_ASIC 1
 #endif
 #endif
 
 
@@ -194,6 +194,9 @@ static const char *DEVICECODE = ""
 #ifdef USE_KNC
 #ifdef USE_KNC
 			"KnC "
 			"KnC "
 #endif
 #endif
+#ifdef USE_BAB
+			"BaB "
+#endif
 #ifdef USE_MODMINER
 #ifdef USE_MODMINER
 			"MMQ "
 			"MMQ "
 #endif
 #endif

+ 3 - 0
cgminer.c

@@ -1628,6 +1628,9 @@ static char *opt_verusage_and_exit(const char *extra)
 #ifdef USE_KNC
 #ifdef USE_KNC
 		"KnC "
 		"KnC "
 #endif
 #endif
+#ifdef USE_BAB
+		"BaB "
+#endif
 #ifdef USE_MODMINER
 #ifdef USE_MODMINER
 		"modminer "
 		"modminer "
 #endif
 #endif

+ 19 - 2
configure.ac

@@ -287,6 +287,17 @@ if test "x$hashfast" = xyes; then
 fi
 fi
 AM_CONDITIONAL([HAS_HASHFAST], [test x$hashfast = xyes])
 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"
 icarus="no"
 
 
 AC_ARG_ENABLE([icarus],
 AC_ARG_ENABLE([icarus],
@@ -537,14 +548,14 @@ if test "x$opencl" != xno; then
 
 
 	else
 	else
 		echo "  OpenCL...............: NOT FOUND. GPU mining support DISABLED"
 		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])
 			AC_MSG_ERROR([No mining configured in])
 		fi
 		fi
 		echo "  scrypt...............: Disabled (needs OpenCL)"
 		echo "  scrypt...............: Disabled (needs OpenCL)"
 	fi
 	fi
 else
 else
 	echo "  OpenCL...............: Detection overrided. GPU mining support DISABLED"
 	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])
 		AC_MSG_ERROR([No mining configured in])
 	fi
 	fi
 	echo "  scrypt...............: Disabled (needs OpenCL)"
 	echo "  scrypt...............: Disabled (needs OpenCL)"
@@ -597,6 +608,12 @@ else
 	echo "  Hashfast.ASICs.......: Disabled"
 	echo "  Hashfast.ASICs.......: Disabled"
 fi
 fi
 
 
+if test "x$bab" = xyes; then
+	echo "  BlackArrow.ASICs.....: Enabled"
+else
+	echo "  BlackArrow.ASICs.....: Disabled"
+fi
+
 if test "x$icarus" = xyes; then
 if test "x$icarus" = xyes; then
 	echo "  Icarus.ASICs/FPGAs...: Enabled"
 	echo "  Icarus.ASICs/FPGAs...: Enabled"
 else
 else

+ 14 - 0
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
+};

+ 1 - 0
miner.h

@@ -249,6 +249,7 @@ static inline int fsync (int fd)
 	DRIVER_ADD_COMMAND(hashfast) \
 	DRIVER_ADD_COMMAND(hashfast) \
 	DRIVER_ADD_COMMAND(klondike) \
 	DRIVER_ADD_COMMAND(klondike) \
 	DRIVER_ADD_COMMAND(knc) \
 	DRIVER_ADD_COMMAND(knc) \
+	DRIVER_ADD_COMMAND(bab) \
 	DRIVER_ADD_COMMAND(avalon)
 	DRIVER_ADD_COMMAND(avalon)
 
 
 #define DRIVER_PARSE_COMMANDS(DRIVER_ADD_COMMAND) \
 #define DRIVER_PARSE_COMMANDS(DRIVER_ADD_COMMAND) \