Browse Source

Build cointerra driver

Luke Dashjr 11 years ago
parent
commit
03129d9aa2
3 changed files with 30 additions and 0 deletions
  1. 1 0
      70-bfgminer.rules.in
  2. 4 0
      Makefile.am
  3. 25 0
      configure.ac

+ 1 - 0
70-bfgminer.rules.in

@@ -7,6 +7,7 @@ LABEL="bfgminer_start"
 @USE_BIFURY_TRUE@ENV{ID_MODEL}=="*bi•fury*", GOTO="bfgminer_add"
 @HAS_BIGPIC_TRUE@ENV{ID_MODEL}=="*Bitfury*BF1*", GOTO="bfgminer_add"
 @HAS_BITFORCE_TRUE@ENV{ID_MODEL}=="*BitFORCE*SHA256*", GOTO="bfgminer_add"
+@USE_COINTERRA_TRUE@ENV{ID_MODEL}=="*GoldStrike*", GOTO="bfgminer_add"
 @USE_DRILLBIT_TRUE@ENV{manufacturer}=="*Drillbit*", GOTO="bfgminer_add"
 @HAS_ICARUS_TRUE@ENV{ID_MODEL}=="*Cairnsmore1*", GOTO="bfgminer_add"
 @HAS_ICARUS_TRUE@ENV{ID_MODEL}=="*Block*Erupter*", GOTO="bfgminer_add"

+ 4 - 0
Makefile.am

@@ -304,6 +304,10 @@ endif
 
 endif
 
+if USE_COINTERRA
+bfgminer_SOURCES += driver-cointerra.c driver-cointerra.h
+endif
+
 if USE_HASHFAST
 bfgminer_SOURCES += driver-hashfast.c
 endif

+ 25 - 0
configure.ac

@@ -619,6 +619,31 @@ PKG_CHECK_MODULES([LIBUSB], [libusb-1.0],[
 ])
 fi
 
+driverlist="$driverlist cointerra"
+AC_ARG_ENABLE([cointerra],
+	[AC_HELP_STRING([--disable-cointerra],[Compile support for CoinTerra (default if libusb)])],
+	[cointerra=$enableval],
+	[cointerra=$ddauto]
+	)
+if test "x$cointerra$want_libusb" = xyesno; then
+	AC_MSG_ERROR([You disabled libusb, required for CoinTerra support])
+elif test "x$cointerra$libusb" = xyesno; then
+	AC_MSG_ERROR([Could not find libusb, required for CoinTerra support])
+elif test "x$cointerra" = xauto; then
+	cointerra="$libusb"
+	if test "x$libusb" = xno; then
+		AC_MSG_WARN([Could not find libusb, required for CoinTerra support])
+		cointerra_enableaction="install libusb 1.0+"
+	fi
+fi
+if test "x$cointerra" = xyes; then
+	AC_DEFINE([USE_COINTERRA], [1], [Defined to 1 if CoinTerra support is wanted])
+	need_lowl_usb=yes
+	has_asic=yes
+	have_udevrules=true
+fi
+AM_CONDITIONAL([USE_COINTERRA], [test x$cointerra = xyes])
+
 driverlist="$driverlist klondike hashbusteravalon/klondike"
 AC_ARG_ENABLE([klondike],
 	[AC_HELP_STRING([--disable-klondike],[Compile support for Klondike (default enabled)])],