Bitcoin Forum
November 21, 2018, 03:07:23 AM *
News: Latest Bitcoin Core release: 0.17.0 [Torrent].
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: how to compile cgminer for antminer s1  (Read 3742 times)
tolazy
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
November 14, 2015, 03:47:01 PM
 #1

Hi.

how do i compile https://github.com/nicehash/cgminer-ckolivas for antminer s1
or is there a binary for s1 and #xnsub on latest cgminer  4.9.2
1542769643
Hero Member
*
Offline Offline

Posts: 1542769643

View Profile Personal Message (Offline)

Ignore
1542769643
Reply with quote  #2

1542769643
Report to moderator
1542769643
Hero Member
*
Offline Offline

Posts: 1542769643

View Profile Personal Message (Offline)

Ignore
1542769643
Reply with quote  #2

1542769643
Report to moderator
1542769643
Hero Member
*
Offline Offline

Posts: 1542769643

View Profile Personal Message (Offline)

Ignore
1542769643
Reply with quote  #2

1542769643
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
tolazy
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
November 15, 2015, 11:14:10 AM
 #2

or is there someone that can make binary for antminer s1 from that git repo for me
toptek
Legendary
*
Offline Offline

Activity: 1274
Merit: 1000


View Profile
November 15, 2015, 08:35:58 PM
 #3

Here you go that explains it .  Smiley really it does .

https://github.com/kanoi/cgminer-binaries/tree/master/AntS1


you also need this to do it http://winscp.net/eng/download.php#putty it can only be done inside the antminer S1 i do it all the time .


from the read me

To update your executable:
--------------------------
Login to your ant, with ssh or putty, using the same root username and password
you use on the luci web interface
If your password is blank, then use the "System/Administration" tab in the web
interface to set a password, since you cannot login with a blank password

If you haven't done an update like this before (or undid the change), run the
following commands:
 cd /usr/bin/
 mv cgminer cgminer.original
 wget http://kano.is/AntS1/cgminer-ants1-4.9.1c-e6ad32a
 chmod +x cgminer-ants1-4.9.1c-e6ad32a
 ln -s cgminer-ants1-4.9.1c-e6ad32a cgminer

If you HAVE done an update like this before and cgminer.original has
already been saved, then run:
 cd /usr/bin/
 wget http://kano.is/AntS1/cgminer-ants1-4.9.1c-e6ad32a
 chmod +x cgminer-ants1-4.9.1c-e6ad32a
 rm cgminer
 ln -s cgminer-ants1-4.9.1c-e6ad32a cgminer

Next you need to restart cgminer on your AntS1
You can restart it, when logged into your ant, with the command
 /etc/init.d/cgminer restart
You will get a message saying "stopped cgminer" if it was running
You will get a message "no cgminer found; none killed" if it wasn't running
If you also get a message "cgminer is already running" then wait 10 seconds
then reissue the command to restart cgminer
 /etc/init.d/cgminer restart
The AntS1 system itself also checks to restart cgminer if it isn't running,
every 3 minutes

You can also restart it from the web interface by clicking the
"Save & Apply" button on the "Status/Miner Configuration" tab
It can sometimes take up to 3 minutes before the AntS1 restarts cgminer
if you use the web interface to restart it

Note that this binary file is also in my cgminer-binaries git here:
 https://github.com/kanoi/cgminer-binaries/tree/master/AntS1
However, wget on the AntS1 won't allow https by default so I've copied it
to my link specified in the wget above
The md5sum checksum is in:
 https://github.com/kanoi/cgminer-binaries/blob/master/MD5SUM
The md5sum value is:
 a341853fa6461efb054294336e9d78e9  AntS1/cgminer-ants1-4.9.1c-e6ad32a
You can check the md5sum value when logged in to the ant with:
 md5sum /usr/bin/cgminer-ants1-4.9.1c-e6ad32a

You can also request the version number of cgminer via the API
If you ssh into your ant, the command is
 cgminer-api version
For this version, it will reply with text containing:
 [CGMiner] => 4.9.1c
 [API] => 3.5

If you don't have one of the original AntS1 miners, but a newer one,
you may find that the luci "Miner Status" display shows LSTime on the end of
the pools table, as a long number rather than a date, after you update cgminer.
The easy fix for this - provided on the bitcointalk forum by artpego,
is to edit /usr/lib/lua/luci/controller/cgminer.lua to undo the change
commented out in there. Around line 287, look for:
  --lst_date = os.date("%c", lst)
  lst_date = lst
and change it back to:
  lst_date = os.date("%c", lst)
  --lst_date = lst

Note that you may need to power cycle your AntS1 for the above change to take
effect

The source for this binary cgminer version (4.9.1c-e6ad32a) is here:
 https://github.com/kanoi/cgminer/tree/ants1-4.9.1c-e6ad32a

To undo the change:
 cd /usr/bin/
 rm cgminer
 mv cgminer.original cgminer
then restart cgminer (as explained above)


To update the cgminer-monitor script:
-------------------------------------
This new cgminer-monitor script will kill and restart cgminer if the Elapsed
Time is greater than 4 weeks.
This is useful if the clock in the OpenWRT was wrong when cgminer started but
ntp has since corrected it - if this happened then the Elapsed Time will show,
incorrectly, a very large number and the calculated hash rates and other
numbers will be very small due to the large Elapsed Time value

Login to your ant, with ssh or putty, using the same root username and password
you use on the luci web interface
If your password is blank, then use the "System/Administration" tab in the web
interface to set a password, since you cannot login with a blank password

If you haven't done an update like this before (or undid the change), run the
following commands:
 cd /usr/bin/
 mv cgminer-monitor cgminer-monitor.original
 wget http://kano.is/AntS1/cgminer-monitor
 chmod +x cgminer-monitor
 
If you HAVE done an update like this before and cgminer-monitor.original has
already been saved, then run:
 cd /usr/bin/
 rm cgminer-monitor
 wget http://kano.is/AntS1/cgminer-monitor
 chmod +x cgminer-monitor

You won't need to power cycle your AntS1

To undo this change:
 cd /usr/bin/
 rm cgminer-monitor
 mv cgminer-monitor.original cgminer-monitor


Feel free to donate BTC to help support the developer Smiley
1Jjk2LmktEQKnv8r2cZ9MvLiZwZ9gxabKm
Or mine at my pool https://kano.is/


For security, your account has been locked. Email acctcomp15@theymos.e4ward.com
toptek
Legendary
*
Offline Offline

Activity: 1274
Merit: 1000


View Profile
November 15, 2015, 09:08:14 PM
 #4

once you do that if you need the one from nicehash it's here in a more understand way  Smiley


The readme inside in ant 1 zip on nicehash explains how to replace the above one after you update it which i  would do first Smiley .


https://www.nicehash.com/index.jsp?p=software#sha256



For security, your account has been locked. Email acctcomp15@theymos.e4ward.com
toptek
Legendary
*
Offline Offline

Activity: 1274
Merit: 1000


View Profile
November 15, 2015, 09:10:36 PM
 #5

from the nice hash read me hope it helps . trust me it better you learn how to on your own  Smiley_ .


How to use:

1. (this step is optional but recommended) update your AntMiner S1 firmware to the latest one: https://bitmaintech.com/support.htm?pid=00720140411033846942qQqjOD460695

2. after firmware update is successful, connect via ssh to your miner (use putty under Windows)

3. enter this command to stop cgminer:

/etc/rc.d/S99cgminer stop

4. backup existing cgminer binary

mv /usr/bin/cgminer /usr/bin/cgminer-original

5. upload patched cgminer binary from your computer

scp [path where you download and extracted patched cgminer]/cgminer root@[IP of your miner]:/usr/bin/cgminer

(or use WinSCP under Windows)

6. make the new uploaded cgminer binary executable:

chmod +x /usr/bin/cgminer

7. start cgminer

/etc/rc.d/S99cgminer start

8. go to the AntMiner's web interface and append #xnsub at nicehash or westhash pool URL, press "Save & Apply"

stratum.nicehash.com:3334#xnsub

9. wait a minute and then go to the nicehash or westhash miner's details web page and make sure you have a green checkmark in "Extranonce subscription" column

https://www.nicehash.com/index.jsp?p=miners&a=1&addr=your-Bitcoin-address

***

cgminer-solo additional instructions:

You will need to install libcurl, libncurses and libpolarssl for this binary to
function.

With the most recent Bitmain S1 image Check /etc/opkg.conf line:
src/gz barrier_breaker

make sure it is:
http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/generic/packages/base

Then issue:
# opkg update
# opkg install libcurl
# opkg install libncurses
# opkg install libpolarssl

For security, your account has been locked. Email acctcomp15@theymos.e4ward.com
tolazy
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
November 16, 2015, 07:17:16 AM
 #6

the cgminer-ants1-4.9.1c-e6ad32a dont have #xnsub support.
cgminer 4.7.1 from nicehash works. but i want to have 4.9.2 with #xnsub support thats why i need cross compile or if soneone has it allredy
tolazy
Full Member
***
Offline Offline

Activity: 196
Merit: 100


View Profile
November 17, 2015, 11:59:49 AM
 #7

found this script https://gist.github.com/llazzaro/56cd3af47af4f4910757 and downloaded toolchain

but i get configure: error: C compiler cannot create executables

still noone that knows how to compile cgminer 4.9.2 for mips-openwrt ?

even tried qemu-mips and compiled there no luck Sad
pekatete
Hero Member
*****
Offline Offline

Activity: 518
Merit: 500



View Profile WWW
November 23, 2015, 12:32:39 AM
 #8

but i get configure: error: C compiler cannot create executables

That error, mostly, occurs due to not having the complete toolchain required to build the executable that your configure script is set to build. Ensure you have the mips-openwrt-linux toolchain before trying to compile.

bitsolutions
Sr. Member
****
Offline Offline

Activity: 261
Merit: 254



View Profile
November 23, 2015, 08:00:51 PM
 #9

FYI S1/S3 support has been merged into mainline OpenWRT so firmware images can be compiled from there. Note this should not be attempted unless you are sure you know how to do a TTL recovery due to the high risk of bricks from untested firmware.

Mining Software Developer.
toptek
Legendary
*
Offline Offline

Activity: 1274
Merit: 1000


View Profile
December 29, 2015, 12:05:25 AM
 #10

FYI S1/S3 support has been merged into mainline OpenWRT so firmware images can be compiled from there. Note this should not be attempted unless you are sure you know how to do a TTL recovery due to the high risk of bricks from untested firmware.
'


wow nice just noticed you posted we can compile on openwrt now, i haven't done much with openwrt in a month, kind of gave up on it . I  know how to un brick a router on openwrt but would only use one of the cheaper ones for testing . i read some place un bricking with TTL might not work, you may even end up taking off the chip and have to reprogram it that way Sad or buy a new one. if you brick it beyond using TTL ( why i use the cheap routers ) .

I have bricked mine a few times trying new stuff but was able to recover it. Smiley .

btw i know this is off topic but just got my own fully working bitcoin core working on a cubieboard 2 with a 128 gb ssd using nand to ssd Smiley it took me a few weeks to figure out and a lot of trial and error but was fun.
And have a firefly pi type coming to me in a few days that's much better at a really good price about the same price the CB2 cost me for a kit, the Firefly is a kit or it has all i need to get it going.

For security, your account has been locked. Email acctcomp15@theymos.e4ward.com
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!