summaryrefslogtreecommitdiffstats
path: root/btc
diff options
context:
space:
mode:
Diffstat (limited to 'btc')
-rw-r--r--btc/btcguild/index.js20
-rw-r--r--btc/mining/CONFIGURE5
-rw-r--r--btc/mining/Makefile18
-rw-r--r--btc/mining/README9
-rw-r--r--btc/mining/user/.config/autostart/startup.desktop6
-rwxr-xr-xbtc/mining/user/bin/ati_temper5
-rw-r--r--btc/mining/user/mining.ovdr16
-rw-r--r--btc/mining/user/startup.sh16
8 files changed, 95 insertions, 0 deletions
diff --git a/btc/btcguild/index.js b/btc/btcguild/index.js
new file mode 100644
index 00000000..1f33db06
--- /dev/null
+++ b/btc/btcguild/index.js
@@ -0,0 +1,20 @@
+api_key = process.env.api_key;
+
+var options = {
+ host: 'www.btcguild.com',
+ port: 80,
+ path: '/api.php?api_key=' + api_key
+};
+
+http = require('http');
+http.get(options, function(res) {
+ var data = '';
+ res.on('data', function (chunk) {
+ data += chunk;
+ });
+ res.on('end', function () {
+ console.log(JSON.parse(data));
+ });
+}).on('error', function(e) {
+ console.error('Error: ' + e.message);
+});
diff --git a/btc/mining/CONFIGURE b/btc/mining/CONFIGURE
new file mode 100644
index 00000000..6ddce386
--- /dev/null
+++ b/btc/mining/CONFIGURE
@@ -0,0 +1,5 @@
+How to Configure
+===============
+
+1. change the mining-url in ~/startup.sh
+2. sudo /etc/init.d/gdm restart
diff --git a/btc/mining/Makefile b/btc/mining/Makefile
new file mode 100644
index 00000000..0fab7b1f
--- /dev/null
+++ b/btc/mining/Makefile
@@ -0,0 +1,18 @@
+.PHONY: all format install
+select-target:
+ @echo "You are made of stupid!"
+ echo "look here"
+ @cat Makefile
+format:
+ cat README
+install:
+ apt-get install --yes lm-sensors
+ echo '#!/bin/bash' > /usr/bin/ati_license
+ echo '#!/bin/sh' > /etc/init.d/live-boot
+ echo 'wall "going down"' >> /etc/init.d/live-boot
+ chmod 755 /etc/init.d/live-boot
+ echo 'sudo tar xvf /opt/AMD-APP-SDK-v2.4-lnx64/icd-registration.tgz -C /' >> /usr/bin/ati_license
+ cp -r user /home
+configure:
+ sensors-detect
+ @cat CONFIGURE
diff --git a/btc/mining/README b/btc/mining/README
new file mode 100644
index 00000000..ad8c3468
--- /dev/null
+++ b/btc/mining/README
@@ -0,0 +1,9 @@
+What to do:
+format the usb-stick:
+Device Boot Start End Blocks Id System
+/dev/sda1 * 1 254 976345 c W95 FAT32 (LBA)
+/dev/sda2 255 1017 2932972 83 Linux
+
+1. install coinlinux live system on sda1.
+2. mkfs.ext3 /dev/sda2 -L live-rw
+3. install grub on /dev/sda
diff --git a/btc/mining/user/.config/autostart/startup.desktop b/btc/mining/user/.config/autostart/startup.desktop
new file mode 100644
index 00000000..67c35ef8
--- /dev/null
+++ b/btc/mining/user/.config/autostart/startup.desktop
@@ -0,0 +1,6 @@
+[Desktop Entry]
+Name=LXDE Autostart
+Exec=/home/user/startup.sh
+Terminal=true
+Type=Application
+Categories=Configuration
diff --git a/btc/mining/user/bin/ati_temper b/btc/mining/user/bin/ati_temper
new file mode 100755
index 00000000..283a6024
--- /dev/null
+++ b/btc/mining/user/bin/ati_temper
@@ -0,0 +1,5 @@
+#displays: CARD1TEMP CARD2TEMP CPUTEMP OUTSIDE
+echo -n "`DISPLAY=:0 aticonfig --adapter=1 --od-gettemperature | grep Temperature | sed -n 's/.*Temperature - \([0-9.]*\) C/\1/;p'` "
+echo -n "`DISPLAY=:0 aticonfig --adapter=2 --od-gettemperature | grep Temperature | sed -n 's/.*Temperature - \([0-9.]*\) C/\1/;p'` "
+echo -n "`sensors | grep temp1 | sed -e 's/temp1: *+\([0-9.]*\).*/\1/'` "
+echo "`temper`"
diff --git a/btc/mining/user/mining.ovdr b/btc/mining/user/mining.ovdr
new file mode 100644
index 00000000..d6cf6fec
--- /dev/null
+++ b/btc/mining/user/mining.ovdr
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<OVERDRIVE_PROFILE>
+ <PERFORMANCE_LEVEL level="2" gpu="90000" mem="30000" voltage="1040"/>
+ <PERFORMANCE_LEVEL level="1" gpu="55000" mem="30000" voltage="1000"/>
+ <PERFORMANCE_LEVEL level="0" gpu="15700" mem="30000" voltage="950"/>
+ <FAN_SETTING percentage="AUTO"/>
+ <FAN_CTRL enabled="yes"/>
+ <FAN_CTRL_CURVE type="0"/>
+ <FAN_CTRL_POINT nr="0" temperature="2000" percentage="0"/>
+ <FAN_CTRL_POINT nr="1" temperature="3400" percentage="9300"/>
+ <FAN_CTRL_POINT nr="2" temperature="4800" percentage="10000"/>
+ <FAN_CTRL_POINT nr="3" temperature="7000" percentage="10100"/>
+ <FAN_CTRL_POINT nr="4" temperature="10000" percentage="10100"/>
+ <MONITOR_SAMPLE_TIME interval="10"/>
+ <COLOR_PROFILE enabled="no" longitude="-13.000000" latitude="52.000000" color_temp_day="0" color_temp_night="0" transition="30"/>
+</OVERDRIVE_PROFILE>
diff --git a/btc/mining/user/startup.sh b/btc/mining/user/startup.sh
new file mode 100644
index 00000000..eb2ce13a
--- /dev/null
+++ b/btc/mining/user/startup.sh
@@ -0,0 +1,16 @@
+sudo pkill xscreensaver
+sudo pkill tmux
+sleep 1
+export DISPLAY=:0
+
+export URL="${URL-http://txgen_chinaman:lolwut@uk.btcguild.com:8332}"
+#export URL="http://txgen:qJrXefWX@bitcoinpool.com:8334"
+slock &
+tmux start-server
+tmux new-session -d -s mining -n mining
+printenv > /home/user/environment
+tmux new-window -t mining:1 'AMDOverdriveCtrl -i 0 mining.ovdr'
+tmux new-window -t mining:2 'AMDOverdriveCtrl -i 3 mining.ovdr'
+sleep 5
+tmux new-window -t mining:3 "cd /opt/miners/phoenix; while sleep 1; do sudo python phoenix.py -u $URL -k phatk DEVICE=0 VECTORS BFI_INT WORKSIZE=256 AGGRESSION=12 FASTLOOPS=false;done"
+tmux new-window -t mining:4 "cd /opt/miners/phoenix; while sleep 1;do sudo python phoenix.py -u $URL -k phatk DEVICE=1 VECTORS BFI_INT WORKSIZE=256 AGGRESSION=10 FASTLOOPS=false ; done"