Skip to content

Updated with BFGMiner 3.99 #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
c1cc4a3
Add cgminer-gc3355
mox235 Mar 23, 2014
174ccfc
update readme with changes against Script-1.1
mox235 Mar 23, 2014
dc006f0
update read me
mox235 Mar 23, 2014
f99047b
update read me
mox235 Mar 23, 2014
9eee7a0
update read me
mox235 Mar 23, 2014
927c2a2
update read me
mox235 Mar 23, 2014
3adf263
always use cgminer-gc3355 for now
mox235 Mar 23, 2014
75f6edb
Add gridseed options to miner.conf
mox235 Mar 23, 2014
a665fb4
remove donations
mox235 Mar 23, 2014
612315a
Add back form for miner.conf settings
mox235 Mar 26, 2014
2ebd00b
Fix pool url encoding in miner.conf
mox235 Mar 27, 2014
378923c
Set Frequency for each GridSeed based on Serial #
mox235 Mar 30, 2014
e80a9b7
Show absolute Load value
mox235 Mar 30, 2014
064e119
Add frequency list to read me
mox235 Mar 30, 2014
730a65c
typo
mox235 Mar 30, 2014
7616085
md typo
mox235 Mar 30, 2014
9ca99d8
Reorder pool list based on priority
mox235 Mar 30, 2014
7b83fbf
remove percentage for DiffAccept and DiffReject
mox235 Mar 30, 2014
3a18ade
update readme
mox235 Apr 1, 2014
1e36e4e
scripta-20140330 image
mox235 Apr 1, 2014
8a119e4
scripta-20140330 image link
mox235 Apr 1, 2014
aac2268
todo
mox235 Apr 1, 2014
a15898e
scripta-20140401
mox235 Apr 2, 2014
fda7959
always start cgminer at boot
mox235 Apr 6, 2014
236e09b
add watchdog
mox235 Apr 8, 2014
44d28bb
md format
mox235 Apr 8, 2014
df3a951
md
mox235 Apr 8, 2014
91ee949
md
mox235 Apr 8, 2014
a895639
md
mox235 Apr 8, 2014
afcce7c
md
mox235 Apr 8, 2014
db8343d
md
mox235 Apr 8, 2014
59db768
md
mox235 Apr 8, 2014
1abf6db
mega image link
mox235 Apr 9, 2014
1831f04
md
mox235 Apr 9, 2014
4b15855
md
mox235 Apr 9, 2014
cdca3e4
update watchdog script
mox235 Apr 14, 2014
beb68e3
Add bfgminer to replace cgminer
mox235 Apr 22, 2014
a2456d4
update readme
mox235 Apr 22, 2014
6b1a67b
mega link
mox235 Apr 22, 2014
ee38c7d
fix setting gridspeed option
mox235 Apr 23, 2014
cea6dd1
watchdog use 'MHS av' instead of 'MHS rolling'
mox235 Apr 23, 2014
bc0a9cd
add alert banner for 'Reboot Now'
mox235 Apr 23, 2014
6640983
mega link
mox235 Apr 24, 2014
5ae673c
md
mox235 Apr 24, 2014
5aaa4cb
fix mega link
mox235 Apr 25, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
218 changes: 138 additions & 80 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,83 +1,141 @@
---== Scripta ==---

The turnkey solution for litecoin mining with raspberry pi and fpga/asic boards
Inital information compiled from lots of good stuff around Scripta at litecointalk
[fourm posts](https://litecointalk.org/index.php?topic=9908.msg143787#msg143787)

1. Started with Scripta 1.1 [image](http://www.lateralfactory.com/download.php?file=scripta-1_1.tgz)
* source files in image do not match current Scripta [repo](https://github.com/scriptamining/scripta.git)
* rsync github files to image to get starting code base (all uses of "minepeon" replaced with "scripta")
* origianl MinePeon [project](http://minepeon.com/index.php/Main_Page) has lots of good PI setup and helpful info

2. Update raspberry to newest kernel (3.10.33+) and added 'slub_debug=FP' to bootline.conf
* this should fix the wierd USB debug error logging issues.

3. Set ssh port to 22. Should probably turn off root ssh access and change password.
ssh [email protected]
root password: scripta
web password: scripta

4. Change locales to en_US

5. Add wifi support (wlan0)
* set ssid and psk in `network` block at `/etc/wpa_supplicant/wpa_supplicant.conf`

6. Build GridSeed GS3355 specific version of cgminer with mulit-frequency support from [repo](https://github.com/girnyau/cgminer-gc3355)
* modified cgminer-gc3355 to report Frequency and Serial in API calls: [repo](https://github.com/mox235/cgminer-gc3355)

7. Edit `/opt/scripta/startup/miner-start.sh` to use cgminer-gc3355

8. Remove Scripta LTC donation address. Disable MinePeon BTC hash time donation option. Need to determine the right thing to do since _most_ of the web interface stuff is directly from the [MinePeonUI project](https://github.com/MineForeman/zArchive-MinePeonWebUI.git)
* other Scripta rebranded PI images at [Crypto Pros](http://www.cryptopros.com/2014/03/gridseed-dual-miner-first-look-amazing.html)
* and [Hash Master](https://hash-master.com/blog/using-your-raspberry-pi-as-a-gridseed-mining-controller/)
* different PI web-based controller for Gridseed at [Hashra](https://github.com/HASHRA)

9. Fix pool URL JSON encoding. Add back miner config name/values settings from MinePeonUI. All cgminer settings can be changed or added from miner form.
* priority used to reorder pool list
* ability to set per GSD frequency based on Serial # from freq list:
```
static const int opt_frequency[] = {
700, 706, 713, 719, 725, 731, 738, 744,
750, 756, 763, 769, 775, 781, 788, 794,
800, 813, 825, 838, 850, 863, 875, 888,
900, 913, 925, 938, 950, 963, 975, 988,
1000, 1013, 1025, 1038, 1050, 1063, 1075, 1088,
1100, 1113, 1125, 1138, 1150, 1163, 1175, 1188,
1200, 1213, 1225, 1238, 1250, 1263, 1275, 1288,
1300, 1313, 1325, 1338, 1350, 1363, 1375, 1388,
1400,
-1
};
```
10. Modify Status table
* show KHs instead of MHs
* replace Name with GSD Serial Number
* replace Temperature with Frequency
* remove percentages for DiffAccept and DiffReject

11. Open Issues
* maybe reported [hashrate](http://cryptomining-blog.com/1760-what-is-the-actual-hashrate-you-get-from-your-gridseed-asic/) is not quite accurate
* something weird with system time display, timezone, day-light savings
* graphs should auto-refresh when /status page loads

mega link [scripta-20140330.img](https://mega.co.nz/#!D5RiSZTR!wcDqC3yOeUrYC6tqYM7Lh5YbRjVpdtQhg29CagL4ZsI)

---

scripta-20140401

* updated PI firmware to maybe fix usb slub crash
* fix cgminer to always start at boot `/etc/rc.local`
* gzip image

mega link [scripta-20140401.img.gz](https://mega.co.nz/#!Tx42mJab!XMpNsU6cfS23GAuli3C_BgwrdJ15sFLqEF7QNgrYTN4)

---

scripta-20140408

* install [watchdog](http://linux.die.net/man/8/watchdog) service
* load `bcm2708_wdog` kernel module
* modify `/opt/watchdog.conf` to reboot PI if bad things happen. See below.
* add UI option for cgminer specific watchdog script `/opt/scripta/bin/wdog.py`. See below.
* add/fix UI option for manual reboot
* option for email notification on PI automatic reboot. *YOUR EMAIL PASSWORD IS STORED IN PLAIN TEXT SO PLAN ACCORDINGLY*

Once the watchdog is enabled, it is possible to get in a reboot loop. If this happens, disable the system watchdog by quick edit of `/etc/watchdog.conf` after boot and comment out `watchdog-device = /dev/watchdog`. The cgminer API based watchdog script can be disabled by using the UI checkbox or commenting out `test-binary = /opt/scripta/bin/wdog.py` in the same config file. You will have about 30 seconds each loop to try and unscrew things.

The system watchdog daemon will check the following every 30 seconds:
- sytem load less than 24/18/12
- more than 1 page of RAM available
- syslog still alive
- cgminer specific watchdog script `/opt/scripta/bin/wdog.py` that uses the following logic:

```
if (UI manual reboot)
{
force PI reboot
}
if (UI auto reboot)
{
if (sytem up for more than 60 seconds)
{
if (cgminer process not running)
{
if (UI enable) send email
force PI reboot
}
if (ASIC device count less UI device count)
{
if (UI enable) send email
force PI reboot
}
for (each ASIC device)
{
if (device hashrate less than UI value)
{
if (UI enable) send email
force PI reboot
}
}
}
}
OK (yay!!!)
```
- watchdog details logged to syslog

mega link [scripta-20140408.img.gz](https://mega.co.nz/#!ah4XkCpL!A-b_10rNj1GvfQN36waTzxCRCHB_8UltIA4pFgaXIkw)

---

scripta-20140423

* Install wicd and wicd-curses to help with WiFi network configuration. Use `wicd-curses` to setup your WiFi.
* Fixed double emails from "cgminer process not running" reboot.
* Update openssl (heartbleed)
* Upgrade/downgrade rpi firmware to use 3.10.36+ kernel. Maybe more stable USB than 20140408 version using "next" branch (??)
* Replace miner with bfgminer for stability. Update browser options to display status. No longer able to set/display individual GSD clock frequencies.

Miner bfgminer 3.99.0 seems to be more stable than wierd cgminer 3.7.2 branch. Ongoing gridseed support scheduled to be merged into main bfgminer in next (4.0.0) main version release.

mega link [scripta-20140423.img.gz](https://mega.co.nz/#!PwB0jIzK!ltpfKSBv_IOc1gsyPog3eotnprKFOBoOoEkgiPN3-GY)


---=== INSTALL INTRUCTIONS ===---



---=== The easy way ===---

1) Download the full image here http://www.lateralfactory.com/download.php?file=scripta-1_1.tgz

2) Burn it on a ssd in your favourite way

3) Log in as root from a console (pw is "scripta")

4) Remember to change root password with passwd

5) Enjoy



---=== The way of the turtle ===---

Start from a fresh raspbian wheezy (tested with 2014-01-07) Download here http://downloads.raspberrypi.org/raspbian_latest

$>raspi-config ( if needed "Expand Filesystem" and reboot )

$>sudo apt-get update

$>sudo apt-get install lighttpd

$>sudo apt-get install php5-common php5-cgi php5 (Pay attention to packet's order)

$>sudo lighty-enable-mod fastcgi-php

$>sudo /etc/init.d/lighttpd force-reload

---= Add pi user to www-data group =---

$>sudousermod -a -G www-data pi

$>sudo apt-get install php5-rrd libexpect-php5 php-auth-sasl php-mail php-net-smtp php-net-socket


---= Needed to enable https =---

$>sudo mkdir /etc/lighttpd/certs

$>sudo su

$>cd /etc/lighttpd/certs

$>openssl req -new -x509 -keyout lighttpd.pem -out lighttpd.pem -days 365 -nodes

$>chmod 400 lighttpd.pem

$>/etc/init.d/lighttpd force-reload


---= edit /etc/lighttpd/lighttpd.conf =---

$>pico /etc/lighttpd/lighttpd.conf

---= add the following lines at the end =---

$SERVER["socket"] == ":443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/lighttpd/certs/lighttpd.pem"
}

---= libs for cgminer =---

$>sudo apt-get install libjansson4 libusb-1.0-0 ntpdate screen

---= install scripta package =---

$>cd /

$>tar -xf scripta_1-1.tgz

---= point your browser on raspberry ip address, enjoy! =---
11 changes: 4 additions & 7 deletions etc/rc.local
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,20 @@
#
# By default this script does nothing.

/opt/scripta/startup/miner-start.sh
sleep 10

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then

echo " "
echo " _________ .__ __ "
echo " / _____/ ___________|__|______/ |______ "
echo " \_____ \_/ ___\_ __ \ \____ \ __\__ \ "
echo " / \ \___| | \/ | |_> > | / __ \_ "
echo "/_______ /\___ >__| |__| __/|__| (____ / "
echo " \/ \/ |__| \/ "

printf "Connect to http://%s to manage Scripta.\n" "$_IP"
printf "Happy mining!\n"

sudo /opt/scripta/startup/miner-start.sh &

fi

exit 0

Binary file added opt/scripta/bin/cgminer-gc3355
Binary file not shown.
Loading