Change Details
cgminer/Makefile |
47 | 47 | CONFIGURE_ARGS += --disable-opencl --disable-adl --enable-icarus |
48 | 48 | TARGET_LDFLAGS += -Wl,-rpath-link=$(STAGING_DIR)/usr/lib |
49 | 49 | |
| 50 | define Build/Compile |
| 51 | $(call Build/Compile/Default) |
| 52 | ( cd $(PKG_BUILD_DIR) && $(TARGET_CC) api-example.c -I compat/jansson -o cgminer-api; ) |
| 53 | endef |
| 54 | |
| 55 | |
50 | 56 | define Package/cgminer/install |
51 | 57 | $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d |
52 | 58 | |
| 59 | $(INSTALL_BIN) $(PKG_BUILD_DIR)/cgminer-api $(1)/usr/bin |
| 60 | |
53 | 61 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cgminer $(1)/usr/bin |
54 | 62 | $(INSTALL_BIN) $(FILES_DIR)/cgminer $(1)/etc/init.d |
55 | 63 | endef |
cgminer/files/cgminer |
1 | 1 | #!/bin/sh /etc/rc.common |
2 | 2 | START=99 |
3 | 3 | |
4 | | POOL="-o http://pool.ABCPool.co -O xiangfu.0:x" |
5 | | DEV="-S /dev/ttyUSB0" |
6 | | PARAMETER="$DEV $POOL" |
| 4 | POOL1="-o http://pool.ABCPool.co:8332 -O xiangfu.0:x" |
| 5 | POOL2="-o http://pit.deepbit.net:8332 -O xiangfu.z@gmail.com_0:x" |
| 6 | POOL3="" |
| 7 | |
| 8 | POOLS="$POOL1 $POOL2 $POOL3" |
| 9 | |
7 | 10 | start() { |
8 | | cgminer -q -T --api-network --api-listen $PARAMETER> /dev/null 2>&1 & |
| 11 | DEVS=`find /dev/ -type c -name "ttyUSB*" | sed 's/^/-S/' | sed ':a;N;$!ba;s/\n/ /g'` |
| 12 | cgminer -q -T --api-network --api-listen $POOLS $DEVS & |
9 | 13 | } |
10 | 14 | |
11 | 15 | stop() { |
Download the corresponding diff file