Date:2013-01-17 16:05:58 (7 years 6 months ago)
Author:Xiangfu
Commit:25b0a63d4dbda61c994166c906ccb692c3a1cf5f
Message:cgminer: update to 2.10.4, include root-files

Files: cgminer/Makefile (1 diff)
cgminer/files/20-cgminer.hotplug (2 diffs)
cgminer/files/cgminer.init (1 diff)
cgminer/root-files/etc/config/dhcp (1 diff)
cgminer/root-files/etc/config/firewall (1 diff)
cgminer/root-files/etc/config/network (1 diff)
cgminer/root-files/etc/uci-defaults/01-cgminer (1 diff)

Change Details

cgminer/Makefile
99include $(TOPDIR)/rules.mk
1010
1111PKG_NAME:=cgminer
12PKG_VERSION:=20121225
13PKG_REV:=b9c7f3d169942417e04f13fab6e86d944aff37cb
14# this is upstream version 2.10.2
12PKG_VERSION:=2.10.4
1513PKG_RELEASE:=1
1614PKG_INSTALL:=1
1715
18PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_REV).tar.gz
19PKG_SOURCE_URL:=git://github.com/ckolivas/cgminer.git
20PKG_SOURCE_PROTO:=git
16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
17PKG_SOURCE_URL:=http://ck.kolivas.org/apps/cgminer/
2118PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
22PKG_SOURCE_VERSION:=$(PKG_REV)
2319
2420PKG_FIXUP:=autoreconf
2521
cgminer/files/20-cgminer.hotplug
66if [ "${PRODUCT}" = "403/6001/600" ] && [ "${INTERFACE}" = "255/255/255" ] && [ "$TYPE" = "0/0/0" ]; then
77    case "$ACTION" in
88        add)
9            killall -s 9 cgminer
10            ntpd -d -n -q -N -p 0.openwrt.pool.ntp.org \
11                -p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org && \
9            /etc/init.d/cgminer stop
1210            /etc/init.d/cgminer start &
1311            ;;
1412        remove)
...... 
2018if [ "${PRODUCT}" = "67b/2303/400" ] && [ "$TYPE" = "0/0/0" ] && [ "$INTERFACE" = "255/0/0" ]; then
2119    case "$ACTION" in
2220        add)
23            killall -s 9 cgminer
24            ntpd -d -n -q -N -p 0.openwrt.pool.ntp.org \
25                -p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org && \
21            /etc/init.d/cgminer stop
2622            /etc/init.d/cgminer start &
2723            ;;
2824        remove)
cgminer/files/cgminer.init
99
1010start() {
1111    DEVS=`find /dev/ -type c -name "ttyUSB*" | sed 's/^/-S/' | sed ':a;N;$!ba;s/\n/ /g'`
12    ntpd -d -n -q -N -p 0.openwrt.pool.ntp.org \
13        -p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org && \
1214    cgminer -q --api-allow "W:0/0" --api-listen $POOLS $DEVS &
1315}
1416
cgminer/root-files/etc/config/dhcp
1
2config 'dnsmasq'
3    option 'domainneeded' '1'
4    option 'boguspriv' '1'
5    option 'filterwin2k' '0'
6    option 'localise_queries' '1'
7    option 'rebind_protection' '1'
8    option 'rebind_localhost' '1'
9    option 'local' '/lan/'
10    option 'domain' 'lan'
11    option 'expandhosts' '1'
12    option 'nonegcache' '0'
13    option 'authoritative' '1'
14    option 'readethers' '1'
15    option 'leasefile' '/tmp/dhcp.leases'
16    option 'resolvfile' '/tmp/resolv.conf.auto'
17
18config 'dhcp' 'lan'
19    option 'interface' 'lan'
20    option 'start' '100'
21    option 'leasetime' '12h'
22    option 'limit' '100'
23
24config 'dhcp' 'wan'
25    option 'interface' 'wan'
26    option 'ignore' '1'
27
cgminer/root-files/etc/config/firewall
1
2config 'defaults'
3    option 'syn_flood' '1'
4    option 'input' 'ACCEPT'
5    option 'output' 'ACCEPT'
6    option 'forward' 'REJECT'
7
8config 'zone'
9    option 'name' 'lan'
10    option 'network' 'lan'
11    option 'input' 'ACCEPT'
12    option 'output' 'ACCEPT'
13    option 'forward' 'REJECT'
14
15config 'zone'
16    option 'name' 'wan'
17    option 'input' 'REJECT'
18    option 'output' 'ACCEPT'
19    option 'forward' 'REJECT'
20    option 'masq' '1'
21    option 'mtu_fix' '1'
22    option 'network' 'wan wwan'
23
24config 'forwarding'
25    option 'src' 'lan'
26    option 'dest' 'wan'
27
28config 'rule'
29    option 'name' 'Allow-DHCP-Renew'
30    option 'src' 'wan'
31    option 'proto' 'udp'
32    option 'dest_port' '68'
33    option 'target' 'ACCEPT'
34    option 'family' 'ipv4'
35
36config 'rule'
37    option 'name' 'Allow-Ping'
38    option 'src' 'wan'
39    option 'proto' 'icmp'
40    option 'icmp_type' 'echo-request'
41    option 'family' 'ipv4'
42    option 'target' 'ACCEPT'
43
44config 'rule'
45    option 'name' 'Allow-DHCPv6'
46    option 'src' 'wan'
47    option 'proto' 'udp'
48    option 'src_ip' 'fe80::/10'
49    option 'src_port' '547'
50    option 'dest_ip' 'fe80::/10'
51    option 'dest_port' '546'
52    option 'family' 'ipv6'
53    option 'target' 'ACCEPT'
54
55config 'rule'
56    option 'name' 'Allow-ICMPv6-Input'
57    option 'src' 'wan'
58    option 'proto' 'icmp'
59    list 'icmp_type' 'echo-request'
60    list 'icmp_type' 'destination-unreachable'
61    list 'icmp_type' 'packet-too-big'
62    list 'icmp_type' 'time-exceeded'
63    list 'icmp_type' 'bad-header'
64    list 'icmp_type' 'unknown-header-type'
65    list 'icmp_type' 'router-solicitation'
66    list 'icmp_type' 'neighbour-solicitation'
67    option 'limit' '1000/sec'
68    option 'family' 'ipv6'
69    option 'target' 'ACCEPT'
70
71config 'rule'
72    option 'name' 'Allow-ICMPv6-Forward'
73    option 'src' 'wan'
74    option 'dest' '*'
75    option 'proto' 'icmp'
76    list 'icmp_type' 'echo-request'
77    list 'icmp_type' 'destination-unreachable'
78    list 'icmp_type' 'packet-too-big'
79    list 'icmp_type' 'time-exceeded'
80    list 'icmp_type' 'bad-header'
81    list 'icmp_type' 'unknown-header-type'
82    option 'limit' '1000/sec'
83    option 'family' 'ipv6'
84    option 'target' 'ACCEPT'
85
86config 'include'
87    option 'path' '/etc/firewall.user'
88
89config 'zone'
90    option 'name' 'newzone'
91    option 'input' 'ACCEPT'
92    option 'forward' 'REJECT'
93    option 'network' ' '
94    option 'output' 'ACCEPT'
95
96config 'rule'
97    option 'target' 'ACCEPT'
98    option 'src' 'wan'
99    option 'dest_port' '22'
100    option 'name' 'ssh'
101    option 'family' 'ipv4'
102    option 'proto' 'tcp udp'
103
104config 'rule'
105    option 'target' 'ACCEPT'
106    option 'src' 'wan'
107    option 'dest_port' '80'
108    option 'name' 'web'
109    option 'family' 'ipv4'
110    option 'proto' 'tcp udp'
111
112config 'rule'
113    option 'target' 'ACCEPT'
114    option 'src' 'wan'
115    option 'dest_port' '4028'
116    option 'name' 'cgminer'
117    option 'family' 'ipv4'
118    option 'proto' 'tcp udp'
119
cgminer/root-files/etc/config/network
1
2config 'interface' 'loopback'
3    option 'ifname' 'lo'
4    option 'proto' 'static'
5    option 'ipaddr' '127.0.0.1'
6    option 'netmask' '255.0.0.0'
7
8config 'interface' 'lan'
9    option 'ifname' 'eth0'
10    option 'type' 'bridge'
11    option 'proto' 'static'
12    option 'netmask' '255.255.255.0'
13    option 'ipaddr' '192.168.42.1'
14
cgminer/root-files/etc/uci-defaults/01-cgminer
1#!/bin/sh
2
3# Disable cgminer. because there is hotplug.d already
4/etc/init.d/cgminer enable
5
6# Setup the cron job
7echo "*/5 * * * * /usr/bin/cgminer-monitor" | crontab -
8/etc/init.d/cron enable
9/etc/init.d/cron stop
10/etc/init.d/cron start

Archive Download the corresponding diff file



interactive