Bitcoin Forum
June 27, 2024, 11:20:16 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Mining software (miners) / Re: OFFICIAL CGMINER mining software thread for linux/win/osx/mips/arm/r-pi 4.5.0 on: September 05, 2014, 03:28:05 AM
A quick question for ckolivas or kano...

A while back I started looking at cgminer with a view to making a few minor modifications.  It took a while to get my head around how the software worked but I really couldn't find an important bit of code, i.e. the code that actually calculates the final hash value.  Obviously sha2.c contains the sha256 code but it is the part that calls it to generate the final hash I am looking for.  After the Merkle root etc. have been calculated the hash routine should be called 3 times, twice for the first hash due to the length being 80 and then once with the resulting 32 byte result to give the final result.  I can see that the first part of the first hash only needs to be calculated once as the nonce changes as that is beyond the first 64 bytes and this appears to be then stored in midstate but I can't see where that is then used with the nonce to finish the first hash and then do the second hash to get the result.

Also, is regen_hash only used once a result within difficulty is found to double check the result?

It's a while since I last looked at the code but I'm sure you understand what I mean and hopefully can point me in the right direction.
2  Bitcoin / Hardware / Re: [GUIDE] Undervolt antminer s1 [1.19W/GH at the wall] on: August 14, 2014, 05:39:09 PM
Anyone did the potentiometer modding with also removing the SMD completely? How is that done ?

The first one I did (OK, so I have only actually done one of the two boards on that one) I used a very hot soldering iron to remove the SMD which was not ideal (pressed on the top mainly as it didn't matter if it got fried).  Also the bit was way too big to solder on the wires and it took ages - hence only the one board done.  I haven't done the other board yet as the pencil is working really well on that one.

After purchasing a much smaller pointy bit I also discovered an old soldering iron I still had and using two to desolder with, one on each end, was really easy!  I was also using a hands free magnifying glass thing which helped a lot.  With the smaller bit, it was also a lot easier to solder the wires on, again with the magnifying glass really helping.

I am currently using c. 0.85V through the chips but am tempted to try lowering it even more and probably will do soon, probably when I get around to soldering the second board on the first one I modded, although I have one other that is still relying just on pencil (and 2 running at full speed still).

One of the two completely modded S1s is running at 275MHz for around 141GH/s at c. 168 Watts at the wall (0.20% errors), the other is running at 262.5MHz for around 135GH/s at c. 160 Watts at the wall (0.65% errors).
3  Bitcoin / Mining software (miners) / Problems with editing CGMiner for Antminer S1 on: July 10, 2014, 11:44:52 PM
I have taken a copy of the latest CGMiner source and can cross-compile that fine to work on my Antminer S1, although the resulting file is larger than the corresponding, downloadable already build version but that's not an issue.  I also have a copy of the cgminer-openwrt-packages git for the makefile etc.

I would like to make a few minor changes to the software but am having trouble getting the resulting files to run at all.  It is not my coding at fault as even if I make the smallest change possible or just swap 2 independent consecutive lines around I get the same problem.

Basically the code still builds fine but when loaded into the S1, it won't run.  On restarting (or Submit Changes) CGMiner will not appear in the processes tab at all so no mining takes place.  I have tried making minor changes (that do absolutely nothing) to both the cgminer.C file and to one of the other .C files but get the same result.

I commit the changes to the git, make a new branch and give it a new number, alter the makefile accordingly with the new number and new MD5 and cross-compile which appears to go through without a hitch.  What am I missing?

If I undo the changes and rebuild the code, it all works fine again, even with a new number, so the cross compiling also appears to be correct.  Is there another checksum buried in there somewhere maybe?

Any ideas?
4  Bitcoin / Mining software (miners) / Re: CGMINER ASIC miner monitoring RPC linux/win/osx/mips/arm/r-pi 4.4.1 on: June 26, 2014, 12:16:52 PM
...
The problem is that I am using an already written Makefile so don't really want to mess around with it.  I have yet to find out how to pass any switches to the build, if it is actually possible, when cross compiling.
The Makefile is in the feed.
Did you not look in there when I pointed it out?
https://bitcointalk.org/index.php?topic=28402.msg7462671#msg7462671
Yes, that is the Makefile I am using (or will be for the S1).

Firstly though I am trying to get this to work using the Avalon instructions as you suggested.  I appear to have everything I need for the build but am just having problems with LIBCURL.

Can I please ask what set up you use to build this on?

Also, can I ask which of the 2 .config files you use?
5  Bitcoin / Mining software (miners) / Re: CGMINER ASIC miner monitoring RPC linux/win/osx/mips/arm/r-pi 4.4.1 on: June 26, 2014, 09:24:50 AM
Ok, back to trying to build cgminer for the Antminer S1.

Thanks to some pointers from kano and norgan and in between watching way too much football I have made some progress but am still a little stuck.

I figured the best bet would be to try to get the Avalon instructions to work and once successful there adapt it for the S1 but that isn't being too successful!

I am basing this on the instructions here : https://forum.openwrt.org/viewtopic.php?id=45693 changing cp package/cgminer/data/config .config to copy config.avalon.703n to .config (I have tried a couple of the others as well)

The error I am getting is "checking for LIBCURL... no" and the build stops with an error.  Having searched and searched the internet, not helped by the openwrt wiki being down, I have not got around that error.  However, in the cgminer readme it mentions curl is optional so does the Avalon (and susequently the Antminer S1) need curl, and if not how would I disable it.  If it does, how the heck do I get the make to find it?  I believe libcurl needs to be in the openwrt buildroot rather than associated with Ubuntu - but please correct me if this is wrong.  This error probably isn't really anything to do with cgminer but I figured someone on here may know the solution.

Also, when building I get the OpenWrt Configuration screen come up.  Does anything need changing in there?  Again I could find no help searching the internet.

Once I crack this, it should be straight forward to get this to work for the S1 as I already have the Makefile for that although the config files with it are still named after the Avalon but the actual code appears to have been changed for the S1 but there are a couple of choices still.

So, any further pointers would be greatly appreciated.

I'm not sure when I will be online today as our electricity meter is being changed so I can move to a cheaper supplier!



you may need to pass the build switch that excludes drivers other than Bitmain. One of them would have the dependency for curl.
The problem is that I am using an already written Makefile so don't really want to mess around with it.  I have yet to find out how to pass any switches to the build, if it is actually possible, when cross compiling.
6  Bitcoin / Mining software (miners) / Re: CGMINER ASIC miner monitoring RPC linux/win/osx/mips/arm/r-pi 4.4.1 on: June 26, 2014, 02:51:35 AM
Ok, back to trying to build cgminer for the Antminer S1.

Thanks to some pointers from kano and norgan and in between watching way too much football I have made some progress but am still a little stuck.

I figured the best bet would be to try to get the Avalon instructions to work and once successful there adapt it for the S1 but that isn't being too successful!

I am basing this on the instructions here : https://forum.openwrt.org/viewtopic.php?id=45693 changing cp package/cgminer/data/config .config to copy config.avalon.703n to .config (I have tried a couple of the others as well)

The error I am getting is "checking for LIBCURL... no" and the build stops with an error.  Having searched and searched the internet, not helped by the openwrt wiki being down, I have not got around that error.  However, in the cgminer readme it mentions curl is optional so does the Avalon (and susequently the Antminer S1) need curl, and if not how would I disable it.  If it does, how the heck do I get the make to find it?  I believe libcurl needs to be in the openwrt buildroot rather than associated with Ubuntu - but please correct me if this is wrong.  This error probably isn't really anything to do with cgminer but I figured someone on here may know the solution.

Also, when building I get the OpenWrt Configuration screen come up.  Does anything need changing in there?  Again I could find no help searching the internet.

Once I crack this, it should be straight forward to get this to work for the S1 as I already have the Makefile for that although the config files with it are still named after the Avalon but the actual code appears to have been changed for the S1 but there are a couple of choices still.

So, any further pointers would be greatly appreciated.

I'm not sure when I will be online today as our electricity meter is being changed so I can move to a cheaper supplier!

7  Bitcoin / Mining software (miners) / Re: CGMINER ASIC miner monitoring RPC linux/win/osx/mips/arm/r-pi 4.4.1 on: June 23, 2014, 06:10:02 AM
...
I now have OpenWrt up and running in VirtualBox but have ground to a halt and can't find any helpful instructions  Huh  I didn't realise how much of the S1 interface was literally just OpenWrt so it looks very familiar!
One of my replies to people who have asked in PM:
...
Cross compile.
Same process as avalon.
See their details for how to do it ... or OpenWRT that document how to cross compile also.
I've not documented it and I wont be - too much effort and there are those 2 sources already.

The cgminer feed that I change each time:
https://github.com/kanoi/cgminer-openwrt-packages
Thanks, I'll search along those line.
8  Bitcoin / Mining software (miners) / Re: CGMINER ASIC miner monitoring RPC linux/win/osx/mips/arm/r-pi 4.4.1 on: June 23, 2014, 05:10:26 AM
Hi, I've read through a good chunk of this thread and wanted some guidance or at least to clarify some things.

I am running S1s and S2s and have only recently come across this thread.  I have had a little look at the CGMiner source code, most of which is beyond me at the moment but I haven't delved that deeply yet.

First question, there is mention that Bitmain's S1 (and S2) drivers have a few flaws and kano recommends using his (for the S1 so far anyway).  If I load kano's latest version of CGMiner onto my S1s is that issue addressed and can be forgotten about?

Secondly I would really like to compile a version of CGMiner from the source and load it onto one of my S1s, even if it is just a copy of an existing version.  Can this be compiled on anything (e.g. Windoze 7) or does it need to be compiled on Ubuntu to then run on the S1?  Once I have a machine that is set up to compile CGMiner successfully so it can be loaded onto an S1, I want to delve deeper into the workings of CGMiner (not that there will probably much benefit to that, it is more out of interest).  I have MinGW etc. on my system and there appear to be a couple of issues building CGMiner on it but haven't really looked into that yet as there is little point if I can't then run it on the S1.

Any help would be greatly appreciated.

as I understand it Kano's patch makes more of a difference in regards to p2pool mining and you need to build it on the same flavour of Linux. in this case openwrt and there are guides if you just search build cgminer on openwrt
Thanks norgan.  That's what I understood with the driver.  Didn't know it had to be openwrt so I shall have a search for that as there are loads of guides about for other operating systems but needed to know if they were any good to me.

If all you care about is the end result, you can just install kano's binary: https://github.com/kanoi/cgminer-binaries/tree/master/AntS1.  Runnning this on six S1s and it is rock solid.
I already have it running on one of my S1s and will probably update the rest in the next day or so.

I want to know how to build cgminer for myself though.  Partly out of interest and partly as I want to have a mess around with the code - if I mess up then I can always reload kano's version or hit the reset button  Smiley

I now have OpenWrt up and running in VirtualBox but have ground to a halt and can't find any helpful instructions  Huh  I didn't realise how much of the S1 interface was literally just OpenWrt so it looks very familiar!
9  Bitcoin / Mining software (miners) / Re: CGMINER ASIC miner monitoring RPC linux/win/osx/mips/arm/r-pi 4.4.1 on: June 23, 2014, 02:37:22 AM
Hi, I've read through a good chunk of this thread and wanted some guidance or at least to clarify some things.

I am running S1s and S2s and have only recently come across this thread.  I have had a little look at the CGMiner source code, most of which is beyond me at the moment but I haven't delved that deeply yet.

First question, there is mention that Bitmain's S1 (and S2) drivers have a few flaws and kano recommends using his (for the S1 so far anyway).  If I load kano's latest version of CGMiner onto my S1s is that issue addressed and can be forgotten about?

Secondly I would really like to compile a version of CGMiner from the source and load it onto one of my S1s, even if it is just a copy of an existing version.  Can this be compiled on anything (e.g. Windoze 7) or does it need to be compiled on Ubuntu to then run on the S1?  Once I have a machine that is set up to compile CGMiner successfully so it can be loaded onto an S1, I want to delve deeper into the workings of CGMiner (not that there will probably much benefit to that, it is more out of interest).  I have MinGW etc. on my system and there appear to be a couple of issues building CGMiner on it but haven't really looked into that yet as there is little point if I can't then run it on the S1.

Any help would be greatly appreciated.

as I understand it Kano's patch makes more of a difference in regards to p2pool mining and you need to build it on the same flavour of Linux. in this case openwrt and there are guides if you just search build cgminer on openwrt
Thanks norgan.  That's what I understood with the driver.  Didn't know it had to be openwrt so I shall have a search for that as there are loads of guides about for other operating systems but needed to know if they were any good to me.
10  Bitcoin / Mining software (miners) / Re: CGMINER ASIC miner monitoring RPC linux/win/osx/mips/arm/r-pi 4.4.1 on: June 22, 2014, 11:42:36 PM
Hi, I've read through a good chunk of this thread and wanted some guidance or at least to clarify some things.

I am running S1s and S2s and have only recently come across this thread.  I have had a little look at the CGMiner source code, most of which is beyond me at the moment but I haven't delved that deeply yet.

First question, there is mention that Bitmain's S1 (and S2) drivers have a few flaws and kano recommends using his (for the S1 so far anyway).  If I load kano's latest version of CGMiner onto my S1s is that issue addressed and can be forgotten about?

Secondly I would really like to compile a version of CGMiner from the source and load it onto one of my S1s, even if it is just a copy of an existing version.  Can this be compiled on anything (e.g. Windoze 7) or does it need to be compiled on Ubuntu to then run on the S1?  Once I have a machine that is set up to compile CGMiner successfully so it can be loaded onto an S1, I want to delve deeper into the workings of CGMiner (not that there will probably much benefit to that, it is more out of interest).  I have MinGW etc. on my system and there appear to be a couple of issues building CGMiner on it but haven't really looked into that yet as there is little point if I can't then run it on the S1.

Any help would be greatly appreciated.
11  Bitcoin / Hardware / Re: [GUIDE] Undervolt antminer s1 [1.19W/GH at the wall] on: May 25, 2014, 10:09:44 PM
Just gave this a go.

I reduced the resistances to between 2920 and 2950 and the chip voltage range is now between 855mV and 870mV, so pretty consistent although I only measured the top four on each board.

Having set the frequency to 275MHz I am getting around 0.25% errors (although this appears to be slowly creeping up) and my meter is showing 180W (240V).  With the sudden increase in the price of Bitcoin I calculate I am losing around 5% of my income after allowing for the cost of the electric which is pretty good and that will decrease should the price go down again (or when the difficulty goes up next).  The plus side is a reduction of around 10C in chip temperature and it is a lot quieter.  Now to decide which other ones to do as that S2 would only really run at 375MHz anyway, although at that speed there were little to no errors, any quicker and they really racked up!

I have another one that only likes 375MHz and gives a few more errors so might as well do that one as well!

Thanks for the research on this guys.
12  Bitcoin / Hardware / Re: AntMiner S2 1TH/s Miner Batch 4, Price changes daily, now 2319 USD for 1TH/s on: May 16, 2014, 07:23:23 PM
I returned home earlier to find the power off - the meter ran out!

My S2 wouldn't restart (I did turn the switch off before putting the power back on!), just the blue screen and the fans spinning.

Stole an 8GB Micro SD card from my kids MP3 player (oops!) and installed the software on it.

Now back up and running :-)

Simple - although it took ages to find a Micro SD card!!  I did back up all his songs (there weren't many on it) first and have ordered a replacement for him off ebay.

Now rewriting the image to the original 2GB SD card hopefully as a spare.

So basically it doesn't even need to be a power surge, just a break in the power can corrupt the SD so I guess even turning the machine off from it's switch could as well.  Is there a safer way?

Thanks to those on here for the downloadable and the instructions/links, which were on page 86 of this thread.
13  Bitcoin / Hardware / Re: AntMiner S2 1TH/s Miner Batch 4, Price changes daily, now 2494 USD for 1TH/s on: May 12, 2014, 07:50:51 AM
Has anyone paid by Bank Transfer for an S2?  I did for this latest batch and since sending it have heard nothing from Bitmaintech despite numerous emails trying to check they have received the payment OK.  Maybe a nice shiny S2 will arrive on my doorstep in the next couple of days but it would be nice to know what is going on!
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!