Bitcoin Forum

Bitcoin => Hardware => Topic started by: gr0bi42 on December 29, 2013, 09:44:53 PM



Title: Building a custom KncMiner Firmware
Post by: gr0bi42 on December 29, 2013, 09:44:53 PM
Hi folks,

here comes a straight forward HowTo build a custom KncMiner Firmware useable for the normal web upgrade process.

It worked for me, BUT IT MIGHT NOT WORK FOR YOU. I'M NOT RESPONSIBLE FOR ANY DAMAGE YOU MIGHT GONNA HAVE!!!

If you are not familar with the u*inx shell commands & stuff, please don't even try it.

I will also not give any tutorials about how to use all these commands and what they are mean. It's up to you (RTFM).

OK let's start.

First step is to unpack an existing KncMiner firmware to have something to start/play with. I'm using still 0.98, so I will use it in this HowTo, but any other firmware will do it too.

I'm using > as the shell prompt and # as comment.
Code:
# install u-boot-tools and mkimage (only once)
# under ubuntu (and debian)
> sudo apt-get install u-boot-tools uboot-mkimage

# become root (it's necessary for cpio to create the device nodes)
> su - root

# create a base directory to work in
> mkdir knc
> cd knc

# download (or copy if already downloaded) the KncMiner firmware to be used
> wget http://www.kncminer.com/userfiles/file/kncminer-0.98.bin

# extract firmware into directory orig
> mkdir orig
> cd orig
> tar xfz ../kncminer-0.98.bin
> dd if=kncminer-0.98.u-boot of=initramfs.cpio.gz bs=64 skip=1
> gunzip initramfs.cpio.gz

# continue to work in another directory modified
> cd ..
> mkdir modified
> cd modified
> mkdir fs
> cd fs
> cpio -vidF ../../orig/initramfs.cpio

# DONE! Now you have all the files under fs/

# Feel free to make any modifications like:
# - replace cgminer with the lastest version
# - install bfgminer instead of cgminer
# - enable all 8 DC/DC's on 8DC/DC jupiters
# - tweak voltage and/or pll
# - install bertmod
# - install other sw (angstrom)
# - do whatever you like

# What I've done:
# - lastest cgminer 3.9.0 with special patches to feed my custom webinterface
# - enable all 8 DC/DC's on my october jupiter. They are running less than 30A each within spec.
# - pll mod to speedup my jupiter to around 650GH/s - WU:9150.

Code:
# replace firmware version string to be shown on the upgrade page
> vi www/pages/firmware_upgrade.html
# find "Current firmware revision" and edit it to whatever you like.


# Now it's time to pack the new modified firmware
# you are still in knc/modified/fs/
> find . | cpio -H newc -o > ../initramfs.cpio
> cd ..
> gzip initramfs.cpio
> mkimage -n 'KncMiner 0.98 Custom'  -A arm -O linux -T ramdisk -C gzip -d initramfs.cpio.gz kncminer-0.98.u-boot
> tar cfz ../kncminer-0.98_modified.bin kncminer-0.98.u-boot ../orig/reboot.cgi ./orig/reboot.safe ./orig/runme.sh

# DONE! Your new and modified firmware knc/kncminer-0.98_modified.bin is ready to use.
# Use it as always via webinterface upgrade.


PLEASE consider to tip something if you use my HowTo and/or if you find it helpful: 1Btf3BqUegfe5iFdWsgfBf1Ew3YsAvsrLT

Comments are welcome.

Here are some screenshots of my own webinterface (ported from BTCMiner ;-).

You can switch pools by clicking the number.
Clicking the pool name opens the (configured) pool site.

https://i.imgur.com/cRlc81g.jpg (http://imgur.com/cRlc81g)


Title: Re: Building a custom KncMiner Firmware
Post by: gr0bi42 on December 29, 2013, 09:45:04 PM
Reserved


Title: Re: Building a custom KncMiner Firmware
Post by: gr0bi42 on December 29, 2013, 09:51:20 PM
Any interest how to setup a normal BeagleBone Black as a backup device for the KNC BBB?


Title: Re: Building a custom KncMiner Firmware
Post by: RickJamesBTC on December 29, 2013, 09:58:01 PM
Damn, that's nice. You got october jupiters to run at 650 without extra modules?


Title: Re: Building a custom KncMiner Firmware
Post by: Bogart on December 30, 2013, 12:30:11 AM
That's some nice work.  Kudos.

I had heard that KnC only enables 4 DCDCs on the October modules because they will tend to "fight" if all 8 are enabled.  Have you given this much consideration, or seen any evidence of this happening?


Title: Re: Building a custom KncMiner Firmware
Post by: j03 on December 30, 2013, 03:55:38 AM
Thanks for the contribution! And here's the question you were probably expecting:

Quote
# - pll mod to speedup my jupiter to around 650GH/s - WU:9150.

^^ WTF is this PLL mod you speak of? :)  I have scoured the net for the past 15 minutes with no luck. Thanks! Tip awaits!


Title: Re: Building a custom KncMiner Firmware
Post by: r1senfa17h on December 30, 2013, 04:16:30 AM
Thanks for the contribution! And here's the question you were probably expecting:

Quote
# - pll mod to speedup my jupiter to around 650GH/s - WU:9150.

^^ WTF is this PLL mod you speak of? :)  I have scoured the net for the past 15 minutes with no luck. Thanks! Tip awaits!

Here's everything you need to know:
https://bitcointalk.org/index.php?topic=313978.0


Title: Re: Building a custom KncMiner Firmware
Post by: j03 on December 30, 2013, 04:56:10 PM
Thanks! Looks like I'll need a bigger PSU before I try anything. I've got my 1000W maxed-out with a Jupiter + 2.

Edit: Tip sent


Title: Re: Building a custom KncMiner Firmware
Post by: helmax on December 30, 2013, 05:07:02 PM
Sd card ISO?
overclock ?


Title: Re: Building a custom KncMiner Firmware
Post by: mwarrior on February 01, 2014, 07:26:06 PM
Any interest how to setup a normal BeagleBone Black as a backup device for the KNC BBB?

I would be highly interested as I have one... and have had 2 BBB's go out already.  If You know how I would LOVE the info.  Thanks!



Title: Re: Building a custom KncMiner Firmware
Post by: jmevz on February 21, 2014, 01:15:12 PM
Hi,

Edit: Main reason for asking, would this firmware edit help my miner?

I have a Mercury that crashed a little while ago, and now will only accept and hash on firmware 98. If I try 99 or above, it just says Status: Stopped. Surely it's not the dead die causing this issue? As before the crash, I was able to tweak all dies on with the 99-tune firmware.

Any suggestions as to how I can fix this myself? I've tried Beaglebone flash as well, but nothing.

Thanks,
Jeff

Edit: It'll hash on .96 firmware too, but only to 10GHS and decides to jump up and down through the hashes from 10 to 0 to 11 to 0.

Any ideas?


Title: Re: Building a custom KncMiner Firmware
Post by: antimatterone on April 22, 2014, 06:53:07 AM
Hi,

Edit: Main reason for asking, would this firmware edit help my miner?

I have a Mercury that crashed a little while ago, and now will only accept and hash on firmware 98. If I try 99 or above, it just says Status: Stopped. Surely it's not the dead die causing this issue? As before the crash, I was able to tweak all dies on with the 99-tune firmware.

Any suggestions as to how I can fix this myself? I've tried Beaglebone flash as well, but nothing.

Thanks,
Jeff

Edit: It'll hash on .96 firmware too, but only to 10GHS and decides to jump up and down through the hashes from 10 to 0 to 11 to 0.

Any ideas?

Hi m8,
I have Jupiter, but exactly same symptoms, did you find any solutions? I tried a lot, but I always have to go back to 0.98 to run at least 430GH/s, cos I have DIE issue, that is mean I need to run some tuning FW and increase temperature.
I'll be glad for any help. Thank's


Title: Re: Building a custom KncMiner Firmware
Post by: specialed101 on June 17, 2014, 09:52:48 PM
Hi,

    I've only just started mining; so I'm not really in a position to tip you.  ;) However, I wanted to thank you for your terrific walk-through. I had two brand new Bitmain Antminer S2 arrive yesterday, and was very frustrated that any changes to network and pool configurations would not persist through a reboot... or worse yet, a power outage.

    I was able to apply what you had written to making customized firmware loads for each S2. Now they will remember who they are, and what they are supposed to be doing.  ;D

    Thanks again!!!