Author

Topic: Building Bmminer from Bitmain's Github (Read 969 times)

newbie
Activity: 16
Merit: 15
June 19, 2018, 04:44:31 PM
#14
You also got some points, hope someone will be able to modify source code to accept different freq or voltage control for each board or much better select voltage from menu.
jr. member
Activity: 31
Merit: 1
June 19, 2018, 04:05:40 PM
#13
Awsome!
Everybody can now do as they want with their miners.

This thread now contains enough info for us to do as the title says, build the original Bmminer from Bitmaintech's github.
I think we can close here.
Thank you Alexander1560 for making this tutorial public.
Thank you RadekG2 for your input.

Best regards,
Mihail
newbie
Activity: 16
Merit: 15
June 19, 2018, 02:16:15 PM
#12
I have small revolution for you. I found recent tutorial on youtube. Everything works, fans can be disabled, voltage can be modified... here is the link:

https://www.youtube.com/watch?v=eD5F_KHkkqQ
jr. member
Activity: 31
Merit: 1
June 18, 2018, 01:03:51 PM
#11
Ok, so I got some time today. SmileySmiley
I don't think crosscompiling is even necessary, everybody has an android device lying around that he can mess with right?
Well, it has to be a rooted Android device. (google can help you here.)
You need about 3Gb of free space on it to install LinuxDeploy, and configure a Debian jessie armhf linux. (Google here also)
Then install Connectbot and ssh into the linux that is now running on your handheld. 
 From here, follow  the Mreadme.txt from https://github.com/SpatariuMihail/kcolivas/blob/S9-bmm/Mreadme.txt

And bonus: you can also compile the original Bmminer from Bitmain: https://github.com/SpatariuMihail/bmminer-bitmaintech/blob/mymods/readme.txt

This is the best I can do for now.

DISCLAIMER, I have not tested the actual functionality of cgminer/bmminer from the above. I am NOT responsible for any harm, defects, downtime or whatever you can think of.

I am arround for questions, and help you as best as I can.
Regards,
Mihail
jr. member
Activity: 31
Merit: 1
June 18, 2018, 11:34:47 AM
#10
All the github repos that I found throw errors while compiling, including Codyle's.

I've been on it for quite some hours every day last week and managed to port the bitmain-c5 drivers to kcolivas's Cgminer 4.10.0, including clement-bitmain-c5.
Just look for "S9-bmm" branch and read Mreadme.txt.
This one compiles cgminer with "--enable-bitmain-c5" without any warning on a Debian-jessie armhf beaglebone black.
Basicly, it is the Bmminer-mix files with Cgminer makefile...
There are no mods in it, but it is a verry good starting point.
I cannot make "cgminer-api" succesfully but makes "api-example" without errors.(I wonder if it is neccesarry anyway).
Also Codyle's upgrade/downgrade scripts are here.

I would love to test it out , but I managed to burn my S9 controller by dropping a metal on it while it was powered on... I got to see "magic smoke" from the proccesor... Smiley. Oh well, I have an S7 controller on the way, maybe I will be able to use that one on S9 hashblades... If not, I will be searching for another S9 controller.
 
Oh, I also made another branch  called "S9" where I used files that were found on Codyle's, JamesHillard, and UBI (don't remember exactly wich file came from where)...
 This one also compiles succesfully, but with some warnings.


Check them out.

So then, next up: Crosscompiling... When I have time... Smiley
Maybe some of you can look into it... 

Regards,
Mihail
full member
Activity: 538
Merit: 175
June 18, 2018, 10:02:49 AM
#9
I have not yet tried anything with it, but I know that Zwilla's repo was forked to https://github.com/Codyle/bmminer-cgminer492

Let me know how things go and I will probably try my hand at this as well
jr. member
Activity: 31
Merit: 1
June 11, 2018, 09:31:37 AM
#8
Dibblah,
Do you, by any chance, have a local zip of the repo?
Or does anyone have one that compiles succesfully?

All the "cgminer" git repos that I found (github.com/SpatariuMihail/) throw errors when it comes to compiling the Bitmain-c5 drivers.
I was trying to correct the errors of compile env/make files, etc.., and then it hit me that I do have an armhf device that runs Debian and I could compile it directly without cross compiling.
The problem is that I got up to the point where ./autogen, ./configure run without errors but "make" comand fails when building bitmain-c5 drivers...
I do not have logs atm.

Please, all you devs here. Some of you actually wrote the program, or contributed to it.
Help us out. Smiley
newbie
Activity: 2
Merit: 0
June 08, 2018, 03:39:15 PM
#7
Unfortunately Zwillas github is no longer available.
newbie
Activity: 56
Merit: 0
June 08, 2018, 06:56:31 AM
#6
Apologies, I've been meaning to post this for a while but have had little free time.

Yes, you can cross-compile and remove the fan checks. Below I think misses some required bits (specifically, installing the _linux toolchain from below, setting environment variables and installing the x86 compatibility stuff) but might set you on the right track. If I get time, I'll rerun through this from scratch.

You need:
bmminer-mix
gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux.tar.bz2
gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_runtime.tar.bz2
zlib-1.2.11.tar.gz

(Google to find)

git clone https://github.com/Zwilla/bmminer-cgminer492
apt-get install build-essential
cd bmminer-cgminer492/
chmod 755 autogen.sh
apt-get install autogen
apt-get install autoconf
apt-get install libtool
autoconf
automake
./autogen.sh CC=/usr/bin/arm-angstrom-linux-gnueabi-gcc NM=/usr/bin/arm-angstrom-linux-gnueabi-gcc-nm AR=/usr/bin/arm-angstrom-linux-gnueabi-ar --enable-bitmain-c5 --with-system-jansson --host=x86_64-pc-linux-gnu
make

jr. member
Activity: 31
Merit: 1

Hy Tim,
I have found a hardware hack that solved this issue of only 1 fan being detected:
First, find out wich fan conector is the one that does not see the actual fan, then move the conector, 2 resistors and 3 capacitors to an unpopulated fan plug.
Are you good with soldering, or maybe you have a friend that can do SMD soldering? (Difficulty level=low, I managed this with only a soldering iron- but crappy job, oh well, it works...)

https://drive.google.com/folderview?id=1klSzNzI1Z7DLqtzd1NGQxUKRSR2RB_mo

Notice that I moved the fan conector from Fan 5 (this was not detecting the fan in my case) to Fan 4, also R145, R147, C192,C194 and C195 to their respective counterparts for Fan 4.

When measuring with a multimeter, R145 showed only a few ohms (should have measured in Kohm range). The actual smd components were not defect, but something else in the controller was defect.
Also, you cannot move the plug to any unpopulated plugs on the board, because I also had to measure to see ifMihailnpopulated plug was defect. (Probably it had the same conection to the controller). In my case the Fan 3 plug also showed 0 ohms for R141.
Measure first!

Now the controller works as expected.


BUT,  I still want to learn to compile bmminer succesfully. Smiley Because I am curious... Smiley
Any help would be apreciated, I am an electronics hobbyist  advanced level, but a noob in compiling/crosscompiling.

Regards,
Mihail

full member
Activity: 538
Merit: 175
I would also be interested to hear from anyone who has had experience compiling bmminer onto a miner from the bitmain github. I too have some controller boards that won't read the tach output from a fan.
jr. member
Activity: 31
Merit: 1
Hy Fanatic26,
I am trying to build a version of the original bmminer with only one change: minimum fans 0 or 1; and this would be replacing the original bmminer on the actual S9 controlboard.

The reason(s) for this need is that I have a "defective" controlboard that can only detect one Fan... (I have bought it as defect, but that is the only defect it has, and I do not want to put it in the garbage bin).
The other reason is just to learn a bit of linux/compiling/crosscompiling...
 
This would also help people that want fanless S9's for oil immersion.. Wink.
Reading through the source-code, I saw a line that mentioned "minimum number of fans"   which default has a value of 2.
Changing that line means that the whole bmminer needs to be recompiled.

Can you help me with this?
hero member
Activity: 756
Merit: 560
bmminer is meant to be run on the bitmain miner controller hardware, AKA Xilinx SoC card. Its not meant for regular linux.

If you want to run something in linux, you need to run cgminer. No idea why you are trying to run bitmain software on non bitmain hardware.

You can see right here:

me/XILINX/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux


ARM processor, not x86
jr. member
Activity: 31
Merit: 1
Hello all
Sorry for the noob question.
Could you please share some info regarding building Bmminer?
_---------
environment setup:
need 2 PATH: toolchain base path and other open source lib binary and include files base path.

for example:
XILINX_BASE_PATH=/ho
me/XILINX/gcc-linaro-arm-linux-gnueabihf-4.7-2012.11-20121123_linux
XILINX_OTHER_LIB_BASE_PATH=/home/XILINX/bin
--------------

I did get gcc... forXILINX_BASE_PATH , but I have no idea what files go into XILINX_OTHER_LIB_BASE_PATH.
Can you ,please, tell me what to include in this folder?
I am trying to build on a Linux Mint machine.

I have done linux builds of cgminer following guides before, but I never tried to crossbuild on linux for different distributions before.

So better, a little tutorial for me and everybody who needs it would be great if some more savy people have the time to write-up.

Edit: see post 12 for the tutorial link.

Beat regards, Mihail

Jump to: