Bitcoin Forum
June 17, 2024, 02:32:07 PM *
News: Voting for pizza day contest
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Antminer s1-s3 .bin modding - is it possible?  (Read 1274 times)
l8nit3 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


View Profile
March 20, 2016, 05:45:26 PM
Last edit: March 23, 2016, 11:41:34 PM by l8nit3
 #1

Hello again BCT members,

I had a question, and decided I'd reach out to some of the knowledgeable people here at BCT. Smiley

I have an old antminer s1 kicking around, and just got an s3 for around 20$. Now, after mining with nicehash for awhile, I noticed they have custom firmware binaries for some of the newer S series, however they only offer the 'extra-nonce' cgminer binary for s1 and s3. This got me thinking, why just the newer models? Why not make a full .bin thats easily flashable by everyone?

My question is this, how was nicehash able to open and modify the s4-s7 bin files? is there possibly a linux program that will open the file to a semi readable state? Or am I going to have to try some type of debugger and hex-editing?

UPDATE
Ok, so from the bit of research i've done it seems that the firmware file is strictly binary info. It is not a cd-rom image that has been converted to bin... which would allow modification directly.

So .... I've moved to a new avenue, when taking a backup through the LUCI interface, the /etc/config folder is backed up into a tar.gz file.
Through the combination of the backup, and a bit of scp work, Ive got a complete (or a close as possible) backup of the entire firmware. Now as I only have one s3+, and any mistakes require me wipe changes and start from scratch again, this project is going to take awhile.

UPDATE #2
So, after some messing around, it seems that (as i expected) files outside the etc/config folder can be added to an antminer s3+ backup, and during the flash the corresponding files are modified. So heres a small Proof Of Concept to show this goal is attainable
link to beta (p.o.c) = https://mega.nz/#!btBxBQyS!34-QS3Vzw11jztwnYq2DGiVf1HNgSXHBaI0iRnvlZYo

I suggest everyone who decides to try it, open the .tar.gz and read the changes firsthand..... all about transparency here.
My semi-custom backup currently:
-uses the newest s3 firmware available from bitmain
-add frequencies to the asic-freq config file, allowing smaller steps for overclocking (more to come)
-sets default asic-freq to 231.25
-changes antminer logo slightly (still want to give credit to the OG creators of course)
-changes antminer hostname to antMiner-L8nit3-MOD
-sets the static IP to 192.168.0.13 - avoids having to screw with your router or eth settings if your network is x.x.0.1 (will be switching on dhcp next)
-Changes default timezone to America/Toronto EST-5
-Changes default pool settings (as a normal backup would) - If you like the work, throw a few hashes my way Smiley


Still in the works:
-Dhcp by default, no longer have to mess with ip settings to do initial setup.
-updated cgminer binary with nicehash extranonce patches
-hashrate graph
-auto-refresh stats page
-VDD re-enable (disabled in most recent firmware)
-small UI tweaks
-Packaging into an OpenWRT flashable bin file (final step)

Clarification
My goal is for slightly customized binaries (or update packages) for s3/s3+ and eventually s1. In no way am I attempting anything that will magically convert an asic into a faster machine with higher hashrates. This would require different hardware (asic chips).

IMAGES



Racey
Legendary
*
Offline Offline

Activity: 1134
Merit: 1000


Soon, I have to go away.


View Profile
March 20, 2016, 05:51:58 PM
 #2

You have to convert the bin to ISO then burn it to dvd/cd, if you don't want to do that you can create a virtual disc drive for the purpose of seeing the files and running the exe inside.

Been a long time since i did this, cannot remember all the fine details.

Hope it helps somehow. 

And its gone.
adaseb
Legendary
*
Offline Offline

Activity: 3794
Merit: 1723


View Profile
March 20, 2016, 06:46:09 PM
 #3

You have to convert the bin to ISO then burn it to dvd/cd, if you don't want to do that you can create a virtual disc drive for the purpose of seeing the files and running the exe inside.

Been a long time since i did this, cannot remember all the fine details.

Hope it helps somehow. 

Its easy extracting the BIN but how do you put it back together after you make the changes?

Racey
Legendary
*
Offline Offline

Activity: 1134
Merit: 1000


Soon, I have to go away.


View Profile
March 20, 2016, 06:53:35 PM
 #4

You have to convert the bin to ISO then burn it to dvd/cd, if you don't want to do that you can create a virtual disc drive for the purpose of seeing the files and running the exe inside.

Been a long time since i did this, cannot remember all the fine details.

Hope it helps somehow. 

Its easy extracting the BIN but how do you put it back together after you make the changes?



convert the bin to ISO which will make it an image, load the image using your iso virtual drive or whatever software you can.
Last I used was ultra ISO which is very good.
When you load the image it shows in your virtual drive as a normal disc, and can be run from there.

And its gone.
l8nit3 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


View Profile
March 20, 2016, 07:25:08 PM
 #5

You have to convert the bin to ISO then burn it to dvd/cd, if you don't want to do that you can create a virtual disc drive for the purpose of seeing the files and running the exe inside.

Been a long time since i did this, cannot remember all the fine details.

Hope it helps somehow. 
SWEET! this is exactly what I was looking for Smiley Thanks so much for the info. Now time to journey 'down the rabbit hole' lol see you all in 2 weeks lmao
Racey
Legendary
*
Offline Offline

Activity: 1134
Merit: 1000


Soon, I have to go away.


View Profile
March 20, 2016, 07:36:41 PM
 #6

Youre welcome, glad to help.
Two weeks eh, down that hole, hope it's not too deep lol

And its gone.
l8nit3 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


View Profile
March 20, 2016, 07:50:18 PM
 #7

Ok, so Ive hit a bit of a roadbump with this project. (I know, on step 1 lol) The binary files provided by bitmain, at least for s1 and s3, are NOT cd files that have been converted into a .bin (such as for emulators). Due to this, magicISO, daemon tools, and UltraISO all give an error when attempting to convert to ISO filetype. All with different wording, but similar to 'Cannnot locate file or file is not cd image file'.

Now after some quick research I've come to realize that firmware for s4 and up actually come in .tar.gz format, making extraction and modification FAR easier. With this new info, I've come to the conclusion that without some serious hex and debugging knowledge, that this project may be dead before it starts.

Does anyone have any ideas on how to turn a non cd-rom .bin into ISO (since its not mountable)? or is hex-editing the only option at this point?
Racey
Legendary
*
Offline Offline

Activity: 1134
Merit: 1000


Soon, I have to go away.


View Profile
March 20, 2016, 07:57:10 PM
 #8

You can try using all the files instead, put them in a  new custom folder in ultra iso (new project) and try that way, maybe it will work. I had problems like this myself long time ago, not sure if it worked now.

I shall have a nose around, see what I can come up with.

And its gone.
Subw
Hero Member
*****
Offline Offline

Activity: 672
Merit: 500


View Profile
March 20, 2016, 08:00:29 PM
 #9

Magiciso... lol
Your computer skills lack for what you wish to achieve.
Hint: wait some time maybe there will be new firmware for ants family later
l8nit3 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


View Profile
March 20, 2016, 08:03:13 PM
 #10

You can try using all the files instead, put them in a  new custom folder in ultra iso (new project) and try that way, maybe it will work. I had problems like this myself long time ago, not sure if it worked now.

I shall have a nose around, see what I can come up with.
Well, either way Im not ready to give up yet Smiley I'm in the process of familiarizing myself with the different types of bin file, how they are created, and how they are extracted. Thank you for the help. I'd love to have a self-customized front-end on my s3+ running solo right now. Smiley And, who knows, if it works out, maybe I'll link a copy for any brave s3/s3+ owners willing to give it a go lol. (after a proper testing period of course)

However at this point, these are all just big dreams lol

Magiciso... lol
Your computer skills lack for what you wish to achieve.
Hint: wait some time maybe there will be new firmware for ants family later
I have tried other software aswell, and as soon as some of my projects are done running on my winblows partition, I'll be switching over to my linux for a real go at it.
I think it's a tad over-reaching to tie my 'computer skills' to a single piece of software I mentioned. I have accomplished some neat projects in my short time (~ 5 years) learning all areas of tech. I run my own custom android kernel (5.1 kali nethunter) with some neat additions such as overclocking, multiple filesystem support, and OTG support, all from a vanilla kernel source. ( a feat I accomplished as my FIRST android project)
This is my first attempt with .bin files, and as such, the learning curve is likely to be steep, which Im prepared for.
Racey
Legendary
*
Offline Offline

Activity: 1134
Merit: 1000


Soon, I have to go away.


View Profile
March 20, 2016, 08:13:09 PM
 #11

Do you have Winzip?

If you need to extract the contents of a complex archive, such as a tar.gz or tgz file (each being an archive with a tar file inside), you would need two commands:

unzip file.tar.gz to your custom [folder] then put them in the new ultra iso custom as you see.
unzip file.tar to your custom [folder] then put them in the new ultra iso custom as seen

These things used to annoy me in the past, still do now.

You just have to try, and try anything.

Code:
wzunzip file.tar.gz [PATH]
wzunzip file.tar [PATH]

And its gone.
l8nit3 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


View Profile
March 20, 2016, 08:15:26 PM
 #12

Do you have Winzip?

If you need to extract the contents of a complex archive, such as a tar.gz or tgz file (each being an archive with a tar file inside), you would need two commands:

unzip file.tar.gz to your custom [folder] then put them in the new ultra iso custom as you see.
unzip file.tar to your custom [folder] then put them in the new ultra iso custom as seen

These things used to annoy me in the past, still do now.

You just have to try, and try anything.
will do Smiley I think my first step is going to be getting a look at the newer firmwares, such as s5 or s7, to get a feel for the file tree setup. Then switching over to linux for a better attempt at the s3 .bin file.
Racey
Legendary
*
Offline Offline

Activity: 1134
Merit: 1000


Soon, I have to go away.


View Profile
March 20, 2016, 08:38:25 PM
 #13

Here for us tools http://tartool.codeplex.com/

And its gone.
RaginglikeaBoss
Sr. Member
****
Offline Offline

Activity: 302
Merit: 250

Never before 11 P.M.


View Profile WWW
March 22, 2016, 09:01:09 PM
 #14

Please make this work... lol I have a shed of S1's that I'm too lazy to upgrade the blades.

l8nit3 (OP)
Legendary
*
Offline Offline

Activity: 1007
Merit: 1000


View Profile
March 22, 2016, 09:28:33 PM
 #15

Please make this work... lol I have a shed of S1's that I'm too lazy to upgrade the blades.
Well, the current project is for the s3/s3+, however if its successful, I'll be dusting off the s1 and giving it a go aswell Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!