I have running the binary from ckolivas for some hours now. Looks realy fine, thanks ckolivas!
If someone want to do the same, even after restart here is how I got it running.
ATTANTION!!! Do this only if you know what you are doing! Do not expand with too many text, as if it gets to big you can't change anything in your avalon and you have ro reflash!!!1. Go to System -> Startup
2. Disable cgminer, this prevents the start of the standard cgminer binary after reboot
3. Delete anything in the "Local Startup" text area
4. Copy the script below in the "Local Startup" text area
5. Edit betwen "Settings start" and "Settings end"
5. Click the "Submit" button
6. Restart/Reboot
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
### custom cgminer ###
#
# Settings start
#
FTPpath="http://content.wuala.com/contents/ebereon/Shared/bitcoin/cgminer/cgminer" # Path to cgminer binary on a server (http or ftp)
DIRcgminer=/tmp/cgminer # Path to new directory on avalon (ddwrt)
APP=cgminer # name of the cgminer binary
PID_FILE=/var/run/$APP.pid # PID file
# Pool 1
_pool1url=
_pool1user=
_pool1pw=1
# Pool 2
_pool2url=
_pool2user=
_pool2pw=
# Pool 3
_pool3url=stratum+tcp://stratum.mining.eligius.st:3334
_pool3user=19hauaqtbJ8CFL7947YzkrJZY9ZXBpMoae
_pool3pw=1
# chip_frequency (only allowed: 256,270,282,300,325,350,375)
_cf=350
# miner_count
_mc=24
# api_allow
_aa=W:127.0.0.1
# default pool_balance
_pb=
# more_options
_mo=
#
# Settings end
#
mkdir $DIRcgminer # create new directory in tmp (tmpfs)
wget -P $DIRcgminer $FTPpath # download the custom cgminer binary
chmod +x $DIRcgminer/$APP
##########################
# cgminer startup script:
if [ "$_pool1url" != "" -a "$_pool1user" != "" -a "$_pool1pw" != "" ]; then
POOL1="-o $_pool1url -O $_pool1user:$_pool1pw"
fi
if [ "$_pool2url" != "" -a "$_pool2user" != "" -a "$_pool2pw" != "" ]; then
POOL2="-o $_pool2url -O $_pool2user:$_pool2pw"
fi
if [ "$_pool3url" != "" -a "$_pool3user" != "" -a "$_pool3pw" != "" ]; then
POOL3="-o $_pool3url -O $_pool3user:$_pool3pw"
fi
case "$_cf" in
256)
CF="50:256"
;;
270)
CF="47:270"
;;
282)
CF="45:282"
;;
300)
CF="43:300"
;;
325)
CF="39:325"
;;
350)
CF="36:350"
;;
375)
CF="34:375"
;;
esac
AOPTIONS=" --avalon-options 115200:$_mc:10:$CF "
PARAMS=" --lowmem $AOPTIONS $POOL1 $POOL2 $POOL3 $_pb --api-allow $_aa --api-listen $_mo"
$DIRcgminer/$APP --avalon-options 115200:$_mc:10:50:256 -q >/dev/null 2>&1
sleep 1
if [ ! -f /tmp/cgminer-ntpd-done ]; then
while [ "$NTPD_RET" != "0" ]; do
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
NTPD_RET=$?
done
touch /tmp/cgminer-ntpd-done
fi
start-stop-daemon -S -x $DIRcgminer/$APP -p $PID_FILE -m -b -- $PARAMS
exit 0
This script downloads the cgminer binary from ckolivas from my webspace to the tmpfs (ram). (You can change this to your own server. I will keep it on my webspace, so if you don't have an own place, let it unchanged.)
After it is downloaded it starts the new cgminer binary with the config from the settings you have given to the script. It wont load any setting from the web gui, but you can still view the cgminer status page. If you use the cgminer settings page, it will crash the modified cgminer and start the old one.
If its helpful for you, any tips are welcome
Happy mining
ebereon
EDIT: To make sure the cronjob start the correct cgminer now, please change "/usr/bin/cgminer-monitor" as below:
#!/bin/sh
# This file is for cron job
# This if for make sure the start cgminer when there is network problem
C=`pidof cgminer | wc -w`
if [ "$C" != "1" ]; then
killall -s 9 cgminer
sleep 1
chmod +x /etc/rc.local
/etc/rc.local
exit 0;
fi
A=`cat /tmp/cm.log`
B=`cgminer-api devs | grep "^ \[Last Valid Work\]"`
echo "$B" > /tmp/cm.log
if [ "$B" != "" -a "$A" == "$B" ]; then
killall -s 9 cgminer
sleep 1
chmod +x /etc/rc.local
/etc/rc.local
exit 0;
fi
I know it's not fine, but it works and thats what I count