mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-11-25 16:05:20 +02:00
cgmier: update it automatic detect icarus
This commit is contained in:
parent
ce88966185
commit
6867d67696
@ -47,9 +47,17 @@ endef
|
||||
CONFIGURE_ARGS += --disable-opencl --disable-adl --enable-icarus
|
||||
TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
|
||||
|
||||
define Build/Compile
|
||||
$(call Build/Compile/Default)
|
||||
( cd $(PKG_BUILD_DIR) && $(TARGET_CC) api-example.c -I compat/jansson -o cgminer-api; )
|
||||
endef
|
||||
|
||||
|
||||
define Package/cgminer/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d
|
||||
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/cgminer-api $(1)/usr/bin
|
||||
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgminer $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(FILES_DIR)/cgminer $(1)/etc/init.d
|
||||
endef
|
||||
|
@ -1,11 +1,15 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
START=99
|
||||
|
||||
POOL="-o http://pool.ABCPool.co -O xiangfu.0:x"
|
||||
DEV="-S /dev/ttyUSB0"
|
||||
PARAMETER="$DEV $POOL"
|
||||
POOL1="-o http://pool.ABCPool.co:8332 -O xiangfu.0:x"
|
||||
POOL2="-o http://pit.deepbit.net:8332 -O xiangfu.z@gmail.com_0:x"
|
||||
POOL3=""
|
||||
|
||||
POOLS="$POOL1 $POOL2 $POOL3"
|
||||
|
||||
start() {
|
||||
cgminer -q -T --api-network --api-listen $PARAMETER> /dev/null 2>&1 &
|
||||
DEVS=`find /dev/ -type c -name "ttyUSB*" | sed 's/^/-S/' | sed ':a;N;$!ba;s/\n/ /g'`
|
||||
cgminer -q -T --api-network --api-listen $POOLS $DEVS &
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
Loading…
Reference in New Issue
Block a user