tboy32c
Jr. Member
Offline
Activity: 42
Merit: 25
|
|
March 30, 2018, 11:36:30 PM |
|
So, I'm confused by the mystic line of code in driver-baikalu.c: 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): 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://bitcointalk.org/index.php?topic=2790982.msg33090927#msg33090927). If true the max speed might be 490, for a 490/440= 11% overclock (vs 440 stock x10).
|
|
|
|
|
|
|
Each block is stacked on top of the previous one. Adding another block to the top makes all lower blocks more difficult to remove: there is more "weight" above each block. A transaction in a block 6 blocks deep (6 confirmations) will be very difficult to remove.
|
|
|
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
|
|
|
adra12
Newbie
Offline
Activity: 43
Merit: 0
|
|
March 31, 2018, 01:09:35 PM |
|
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
|
|
|
|
cod3gen (OP)
Member
Offline
Activity: 311
Merit: 69
PowerMining.pw
|
|
March 31, 2018, 02:44:31 PM |
|
Nice work on decompile the firmware adra12, will look a little bit on it tonight. What software did you use to decompile it?
|
|
|
|
adra12
Newbie
Offline
Activity: 43
Merit: 0
|
|
March 31, 2018, 07:36:36 PM |
|
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.
|
|
|
|
cod3gen (OP)
Member
Offline
Activity: 311
Merit: 69
PowerMining.pw
|
|
April 01, 2018, 06:04:49 PM |
|
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.
|
|
|
|
CNoteFan
Newbie
Offline
Activity: 50
Merit: 0
|
|
April 01, 2018, 06:30:57 PM |
|
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?
|
|
|
|
cod3gen (OP)
Member
Offline
Activity: 311
Merit: 69
PowerMining.pw
|
|
April 01, 2018, 06:33:18 PM |
|
Dont know yet, but it probably is. Still waiting for access so i can be sure.
|
|
|
|
Mattthev
|
|
April 02, 2018, 06:12:08 AM |
|
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
|
|
|
|
tboy32c
Jr. Member
Offline
Activity: 42
Merit: 25
|
|
April 02, 2018, 09:09:12 AM |
|
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?
|
|
|
|
goga5
Newbie
Offline
Activity: 13
Merit: 0
|
|
April 03, 2018, 01:13:01 AM |
|
After the manipulations, my Giant B did not start. I had to return the old sgminer file.
|
|
|
|
CNoteFan
Newbie
Offline
Activity: 50
Merit: 0
|
|
April 03, 2018, 02:26:50 PM |
|
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: 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.
|
|
|
|
cod3gen (OP)
Member
Offline
Activity: 311
Merit: 69
PowerMining.pw
|
|
April 03, 2018, 02:31:38 PM |
|
Incorrect link to STM Chip firmware is now updated. Also included is multiple firmwares i have received from others.
|
|
|
|
|
CNoteFan
Newbie
Offline
Activity: 50
Merit: 0
|
|
April 04, 2018, 01:14:01 AM |
|
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 #!/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"
|
|
|
|
Dlikrot
|
|
April 05, 2018, 06:35:05 PM |
|
Would pay for working x13 ^^
|
To btc or not to btc - that is the electrum
|
|
|
mindtrip
Legendary
Offline
Activity: 1167
Merit: 1009
|
|
April 05, 2018, 06:40:10 PM |
|
I have been tinkering with mine but so far no luck getting the hidden Algo's to work
|
|
|
|
rogerthat55
Newbie
Offline
Activity: 60
Merit: 0
|
|
April 05, 2018, 09:22:38 PM |
|
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.
|
|
|
|
Swayzeee
Newbie
Offline
Activity: 19
Merit: 0
|
|
April 06, 2018, 01:29:44 AM |
|
We need Wolf here Been trying to get WOLF. on board since Jan. He doesn't want to tell his secrets.
|
|
|
|
CNoteFan
Newbie
Offline
Activity: 50
Merit: 0
|
|
April 06, 2018, 01:36:07 AM |
|
We need Wolf here 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.
|
|
|
|
cod3gen (OP)
Member
Offline
Activity: 311
Merit: 69
PowerMining.pw
|
|
April 06, 2018, 03:21:03 PM |
|
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
|
|
|
|
|