1
0
mirror of git://projects.qi-hardware.com/openwrt-packages.git synced 2025-04-21 12:27:27 +03:00

cgminer: update to 2.10.4, include root-files

This commit is contained in:
Xiangfu
2013-01-17 23:05:58 +08:00
parent 78fe5e43a1
commit 25b0a63d4d
7 changed files with 177 additions and 13 deletions
+3 -7
View File
@@ -9,17 +9,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=cgminer
PKG_VERSION:=20121225
PKG_REV:=b9c7f3d169942417e04f13fab6e86d944aff37cb
# this is upstream version 2.10.2
PKG_VERSION:=2.10.4
PKG_RELEASE:=1
PKG_INSTALL:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
PKG_SOURCE_URL:=git://github.com/ckolivas/cgminer.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_URL:=http://ck.kolivas.org/apps/cgminer/
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=$(PKG_REV)
PKG_FIXUP:=autoreconf
+2 -6
View File
@@ -6,9 +6,7 @@
if [ "${PRODUCT}" = "403/6001/600" ] && [ "${INTERFACE}" = "255/255/255" ] && [ "$TYPE" = "0/0/0" ]; then
case "$ACTION" in
add)
killall -s 9 cgminer
ntpd -d -n -q -N -p 0.openwrt.pool.ntp.org \
-p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org && \
/etc/init.d/cgminer stop
/etc/init.d/cgminer start &
;;
remove)
@@ -20,9 +18,7 @@ fi
if [ "${PRODUCT}" = "67b/2303/400" ] && [ "$TYPE" = "0/0/0" ] && [ "$INTERFACE" = "255/0/0" ]; then
case "$ACTION" in
add)
killall -s 9 cgminer
ntpd -d -n -q -N -p 0.openwrt.pool.ntp.org \
-p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org && \
/etc/init.d/cgminer stop
/etc/init.d/cgminer start &
;;
remove)
+2
View File
@@ -9,6 +9,8 @@ POOLS="$POOL1 $POOL2 $POOL3"
start() {
DEVS=`find /dev/ -type c -name "ttyUSB*" | sed 's/^/-S/' | sed ':a;N;$!ba;s/\n/ /g'`
ntpd -d -n -q -N -p 0.openwrt.pool.ntp.org \
-p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org && \
cgminer -q --api-allow "W:0/0" --api-listen $POOLS $DEVS &
}
+27
View File
@@ -0,0 +1,27 @@
config 'dnsmasq'
option 'domainneeded' '1'
option 'boguspriv' '1'
option 'filterwin2k' '0'
option 'localise_queries' '1'
option 'rebind_protection' '1'
option 'rebind_localhost' '1'
option 'local' '/lan/'
option 'domain' 'lan'
option 'expandhosts' '1'
option 'nonegcache' '0'
option 'authoritative' '1'
option 'readethers' '1'
option 'leasefile' '/tmp/dhcp.leases'
option 'resolvfile' '/tmp/resolv.conf.auto'
config 'dhcp' 'lan'
option 'interface' 'lan'
option 'start' '100'
option 'leasetime' '12h'
option 'limit' '100'
config 'dhcp' 'wan'
option 'interface' 'wan'
option 'ignore' '1'
+119
View File
@@ -0,0 +1,119 @@
config 'defaults'
option 'syn_flood' '1'
option 'input' 'ACCEPT'
option 'output' 'ACCEPT'
option 'forward' 'REJECT'
config 'zone'
option 'name' 'lan'
option 'network' 'lan'
option 'input' 'ACCEPT'
option 'output' 'ACCEPT'
option 'forward' 'REJECT'
config 'zone'
option 'name' 'wan'
option 'input' 'REJECT'
option 'output' 'ACCEPT'
option 'forward' 'REJECT'
option 'masq' '1'
option 'mtu_fix' '1'
option 'network' 'wan wwan'
config 'forwarding'
option 'src' 'lan'
option 'dest' 'wan'
config 'rule'
option 'name' 'Allow-DHCP-Renew'
option 'src' 'wan'
option 'proto' 'udp'
option 'dest_port' '68'
option 'target' 'ACCEPT'
option 'family' 'ipv4'
config 'rule'
option 'name' 'Allow-Ping'
option 'src' 'wan'
option 'proto' 'icmp'
option 'icmp_type' 'echo-request'
option 'family' 'ipv4'
option 'target' 'ACCEPT'
config 'rule'
option 'name' 'Allow-DHCPv6'
option 'src' 'wan'
option 'proto' 'udp'
option 'src_ip' 'fe80::/10'
option 'src_port' '547'
option 'dest_ip' 'fe80::/10'
option 'dest_port' '546'
option 'family' 'ipv6'
option 'target' 'ACCEPT'
config 'rule'
option 'name' 'Allow-ICMPv6-Input'
option 'src' 'wan'
option 'proto' 'icmp'
list 'icmp_type' 'echo-request'
list 'icmp_type' 'destination-unreachable'
list 'icmp_type' 'packet-too-big'
list 'icmp_type' 'time-exceeded'
list 'icmp_type' 'bad-header'
list 'icmp_type' 'unknown-header-type'
list 'icmp_type' 'router-solicitation'
list 'icmp_type' 'neighbour-solicitation'
option 'limit' '1000/sec'
option 'family' 'ipv6'
option 'target' 'ACCEPT'
config 'rule'
option 'name' 'Allow-ICMPv6-Forward'
option 'src' 'wan'
option 'dest' '*'
option 'proto' 'icmp'
list 'icmp_type' 'echo-request'
list 'icmp_type' 'destination-unreachable'
list 'icmp_type' 'packet-too-big'
list 'icmp_type' 'time-exceeded'
list 'icmp_type' 'bad-header'
list 'icmp_type' 'unknown-header-type'
option 'limit' '1000/sec'
option 'family' 'ipv6'
option 'target' 'ACCEPT'
config 'include'
option 'path' '/etc/firewall.user'
config 'zone'
option 'name' 'newzone'
option 'input' 'ACCEPT'
option 'forward' 'REJECT'
option 'network' ' '
option 'output' 'ACCEPT'
config 'rule'
option 'target' 'ACCEPT'
option 'src' 'wan'
option 'dest_port' '22'
option 'name' 'ssh'
option 'family' 'ipv4'
option 'proto' 'tcp udp'
config 'rule'
option 'target' 'ACCEPT'
option 'src' 'wan'
option 'dest_port' '80'
option 'name' 'web'
option 'family' 'ipv4'
option 'proto' 'tcp udp'
config 'rule'
option 'target' 'ACCEPT'
option 'src' 'wan'
option 'dest_port' '4028'
option 'name' 'cgminer'
option 'family' 'ipv4'
option 'proto' 'tcp udp'
+14
View File
@@ -0,0 +1,14 @@
config 'interface' 'loopback'
option 'ifname' 'lo'
option 'proto' 'static'
option 'ipaddr' '127.0.0.1'
option 'netmask' '255.0.0.0'
config 'interface' 'lan'
option 'ifname' 'eth0'
option 'type' 'bridge'
option 'proto' 'static'
option 'netmask' '255.255.255.0'
option 'ipaddr' '192.168.42.1'
@@ -0,0 +1,10 @@
#!/bin/sh
# Disable cgminer. because there is hotplug.d already
/etc/init.d/cgminer enable
# Setup the cron job
echo "*/5 * * * * /usr/bin/cgminer-monitor" | crontab -
/etc/init.d/cron enable
/etc/init.d/cron stop
/etc/init.d/cron start