Pages:
Author

Topic: sgminer: Baikal Giant X10 / N / B - Open Source - Confirmed OC Giant B! - page 17. (Read 38402 times)

member
Activity: 311
Merit: 69
PowerMining.pw
So I thought I would try it out, the code from https://github.com/cod3gen/sgminer-baikal I first downloaded the current version of OrangePI Zero from Baikal at https://www.baikalminer.com/support04.php and installed it on a new micro SD card, to keep the original safe. Then I followed the steps to install and compile cod3gen versions of sgminer (note: I couldn't even do apt-get install git without first setting up the swap). Now, when I got to the part of "driver-baikal.h" and do changes to #define BAIKAL_CLK_DEF I made it 330 for the X10 (just 10% more than 300). When I finished compiling and started it up, it was reporting the clock at 440MHz, but the hash rate was still normal; no overclock. Just to check, I restored the default pools, and checked all the algorithms, and I didn't see any overclocks.

It does not overclock X10 and N. Only Giant B
newbie
Activity: 50
Merit: 0
We need Wolf here Cheesy

Been trying to get WOLF. on board since Jan. He doesn't want to tell his secrets.

Hope someone who figures it out will at least give me a few days to mine and make a little for my effort, not to mention @Cod3gen's hard work.
newbie
Activity: 19
Merit: 0
We need Wolf here Cheesy

Been trying to get WOLF. on board since Jan. He doesn't want to tell his secrets.
newbie
Activity: 60
Merit: 0
So I thought I would try it out, the code from https://github.com/cod3gen/sgminer-baikal I first downloaded the current version of OrangePI Zero from Baikal at https://www.baikalminer.com/support04.php and installed it on a new micro SD card, to keep the original safe. Then I followed the steps to install and compile cod3gen versions of sgminer (note: I couldn't even do apt-get install git without first setting up the swap). Now, when I got to the part of "driver-baikal.h" and do changes to #define BAIKAL_CLK_DEF I made it 330 for the X10 (just 10% more than 300). When I finished compiling and started it up, it was reporting the clock at 440MHz, but the hash rate was still normal; no overclock. Just to check, I restored the default pools, and checked all the algorithms, and I didn't see any overclocks.
legendary
Activity: 1167
Merit: 1009
I have been tinkering with mine but so far no luck getting the hidden Algo's to work
full member
Activity: 230
Merit: 101
Would pay for working x13 ^^
newbie
Activity: 50
Merit: 0
Incorrect link to STM Chip firmware is now updated. Also included is multiple firmwares i have received from others.
Hello! Tell me please, in this way, I get the firmware of my STM chip ?   https://bitcointalksearch.org/topic/m.29642597  

I just created a python script to do it.  Just duplicate one of the python files in /usr/bin/ and paste this code into it.  Then, if successful, then result will reside as /home/baikal/GX10 (Extracted).bin
Code:
#!/usr/bin/env python
import subprocess
import os
import sys
from subprocess import Popen, PIPE
import fcntl
import time
import glob

tmpfile = '/home/baikal/GX10 (Extracted).bin'
USBDEVFS_RESET= 21780

# enter dfu mode
def enter_dfumode():
  subprocess.call('sudo /opt/scripta/startup/miner-stop.sh', shell=True)
  subprocess.call('echo 0 > /sys/class/gpio_sw/PA18/data', shell=True)
  subprocess.call('echo 0 > /sys/class/gpio_sw/PA10/data', shell=True)
  subprocess.call('echo 1 > /sys/class/gpio_sw/PA10/data', shell=True)

def exit_dfumode():
  subprocess.call('echo 1 > /sys/class/gpio_sw/PA18/data', shell=True)
  subprocess.call('echo 0 > /sys/class/gpio_sw/PA10/data', shell=True)
  subprocess.call('echo 1 > /sys/class/gpio_sw/PA10/data', shell=True)

def reset_usb(driver):
  try:
    lsusb_out = Popen("lsusb | grep -i %s"%driver, shell=True, bufsize=64, stdin=PIPE, stdout=PIPE, close_fds=True).stdout.read().strip().split()
    bus = lsusb_out[1]
    device = lsusb_out[3][:-1]
    f = open("/dev/bus/usb/%s/%s"%(bus, device), 'w', os.O_WRONLY)
    fcntl.ioctl(f, USBDEVFS_RESET, 0)
  except Exception, msg:
    print ""

def extract_firmware():
  print "Extracting firmware..."
  cmd = 'sudo dfu-util -a 0 -d 0483:df11 -s 0x08000000:leave -U ' + tmpfile
  subprocess.call(cmd, shell=True)
  #n = os.path.getsize(fwfile[0])
  #cmd = 'cmp '+ fwfile[0] + ' ' + tmpfile + ' -n ' + str(n)
  #ret = subprocess.call(cmd, shell=True)
  #subprocess.call('sudo rm -rf /home/baikal/tmp.bin', shell=True)
  #return ret
 
enter_dfumode()
reset_usb("STM32F407")
reset_usb("DFU")

extract_firmware()
exit_dfumode()

print "Done"
newbie
Activity: 13
Merit: 0
Incorrect link to STM Chip firmware is now updated. Also included is multiple firmwares i have received from others.
Hello! Tell me please, in this way, I get the firmware of my STM chip ?   https://bitcointalksearch.org/topic/m.29642597  
member
Activity: 311
Merit: 69
PowerMining.pw
Incorrect link to STM Chip firmware is now updated. Also included is multiple firmwares i have received from others.
newbie
Activity: 50
Merit: 0
For obtaining the assembly code I used eabi objdump, and for generating a more readable C pseudo code I used IDA Pro. Keep in mind that the pseudo code is just a reasonable guess.

Thank you for this information! 

I was able to use the following command to extract the assembly code:
Code:
objdump -D --target binary -EL -Mforce-thumb -marm -z GX10_V16.bin > GX10_V16.bin.asm

Any chance you could explain how you got the pseudo code from IDA?  I'm running the following version "ida_pro_v7.0_and_hex-rays_decompiler_armx64armx64x86."  I'd like to compare all the firmware images against one another.
newbie
Activity: 13
Merit: 0
After the manipulations, my Giant B did not start. I had to return the old sgminer file.
jr. member
Activity: 42
Merit: 25
Its been brought to my attention from multiple points that this version will OC Baikal Giant B!
Compiling and using my version it will deliver ~10-15% more hashes on LBRY than stock version based on pool side results. Great news for Giant B owners, which im not..!! :-S

Some changes in code and it will deliver even more. Will add a new post when i`ve had access to a Giant B.

Interesting!

  • How many people have confirmed with you that a modified sgminer can overclock a Giant B?
  • Did they share their code changes/improvements with you or give you any idea of what they did?
  • What method did they use to measure the 10-15% increase in hash rate?
  • What do you have in mind for further software changes in order to boost the OC higher?

sr. member
Activity: 966
Merit: 359
👉MINING-BIOS.eu💲⛏
Its been brought to my attention from multiple points that this version will OC Baikal Giant B!
Compiling and using my version it will deliver ~10-15% more hashes on LBRY than stock version based on pool side results. Great news for Giant B owners, which im not..!! :-S

Some changes in code and it will deliver even more. Will add a new post when i`ve had access to a Giant B.
Awesome, but we both need Giant N Grin Cheesy
member
Activity: 311
Merit: 69
PowerMining.pw
Dont know yet, but it probably is. Still waiting for access so i can be sure.
newbie
Activity: 50
Merit: 0
Its been brought to my attention from multiple points that this version will OC Baikal Giant B!
Compiling and using my version it will deliver ~10-15% more hashes on LBRY than stock version based on pool side results. Great news for Giant B owners, which im not..!! :-S

Some changes in code and it will deliver even more. Will add a new post when i`ve had access to a Giant B.

Is the Giant B firmware actually accepting the "baikal_set_options" clock command or is this being achieved in another manner?
member
Activity: 311
Merit: 69
PowerMining.pw
Its been brought to my attention from multiple points that this version will OC Baikal Giant B!
Compiling and using my version it will deliver ~10-15% more hashes on LBRY than stock version based on pool side results. Great news for Giant B owners, which im not..!! :-S

Some changes in code and it will deliver even more. Will add a new post when i`ve had access to a Giant B.
newbie
Activity: 43
Merit: 0
For obtaining the assembly code I used eabi objdump, and for generating a more readable C pseudo code I used IDA Pro. Keep in mind that the pseudo code is just a reasonable guess.
member
Activity: 311
Merit: 69
PowerMining.pw
Nice work on decompile the firmware adra12, will look a little bit on it tonight. What software did you use to decompile it?
newbie
Activity: 43
Merit: 0
It seems to me like they're using a lookup table of clock settings to get actual speeds (https://bitcointalksearch.org/topic/m.33090927). If true the max speed might be 490, for a 490/440= 11% overclock (vs 440 stock x10).

Unfortunately I couldn't find any sign of such a lookup table in the X10 STM firmware (not to be confused with the image file, which has nothing to do with the actual firmware).

I uploaded the pseudo code of the X10 firmware, which I used for static analysis:
https://pastebin.com/PQ8e7H7R
jr. member
Activity: 42
Merit: 25
So, I'm confused by the mystic line of code in driver-baikalu.c:

Code:
msg.data[0] = (clk == 0) ? clk : ((clk / 10) % 20) + 2;

I decided to run some common settings.  These resulting values in no way correlate, even if the controller board was accepting input:

mhz  | ((clk / 10) % 20) + 2      
-------------------------------
150   |    17
200   |    2
250   |    7
300   |    12
350   |    17
400   |    2

Perhaps someone smarter can enlighten me?

Also, I found that the following line seems to be leftover from an earlier generation of miner (PiZero_170605_V1.4.img):

Code:
miner->clock        = msg.data[3] << 1;

But I'm not sure why they are bitwise left shifting it.

It seems to me like they're using a lookup table of clock settings to get actual speeds (https://bitcointalksearch.org/topic/m.33090927). If true the max speed might be 490, for a 490/440= 11% overclock (vs 440 stock x10).
Pages:
Jump to: