Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Firmware for Baikal GB #4

Open
hauptmedia opened this issue Mar 25, 2018 · 47 comments
Open

New Firmware for Baikal GB #4

hauptmedia opened this issue Mar 25, 2018 · 47 comments

Comments

@hauptmedia
Copy link

hauptmedia commented Mar 25, 2018

Hi,

i created a new firmware for your device because the original firmware seems to have bugs which crashes the kernel and/or the network connectivity and the device needs a power cycle to recover.

Key facts about the new firmware

  • Debian based distribution (armbian) based on Kernel 4.14.18

  • all of the original Baikal software was ported by me to work with Debian and the newer kernel

  • deactivates wifi chip of the orange pi dev board

  • cpufreqd which will underclock the cpus in the range 240Mhz-816Mhz (important because the orange pi does not have a heatsink or enough copper to cool the cpu when running at 1.2Ghz)

Installation instructions (at the moment only possible via external sd card reader)

Remove SD card from device and put it in an sd card reader on a linux pc.

wget http://5.9.42.238/fw_baikal_giant_b_V1.img.bz2

bzip2 -d fw_baikal_giant_b_V1.img.bz2

dd if=fw_baikal_giant_b_V1.img of=/dev/sdX bs=4MB

(change sdX to the sd card reader device)

Kind regards,

Julian Haupt

P.s. would be cool if you can provide the source code of your changes to sgminer. Sgminer is GPL software, so you should really do it

@vmattprice
Copy link

Thanks for posting this Julian.

I have upgraded my B; however, I have noticed a few glitches..

For starters, the temperature and load numbers at the very bottom right-hand corner appear off (quite a few more numbers than normal)..

Additionally, I was assuming that underclocking the CPU would have had positive effects on the operational temperature of Pi; however, in my setup, it didn't appear to do anything for temps.. If anything, it is running a touch higher.

Lastly,

I have started to notice random outages on the B.. It will be hashing along just fine, then I look at it, and it shows no devices.. Everything is then grayed out.. Connectivity to the WAN and pools are fine during this, and this only started after upgrading the firmware.

I would request that you have a look at these items and if updates need to be made, we update the img file quickly before too many upgrade.

*Figure out a way to enable frequency adjustment ;-) I have personally witnessed the B shoot WAY up with hashing only to fall quite a bit lower, so I know the higher hashrates can occur w/ the proper cooling..

Thanks for your efforts,

Matt

@hauptmedia
Copy link
Author

Hi Matt,

the update fixes the bug that the pi will loose it's connectivity but introduces a new problem that the USB hangs up from time to time.

A workaround for this is this fix:

cat <<EOF > /etc/cron.d/reboot
* * * * * root dmesg | grep 'HC died' >/dev/null && /sbin/reboot 
EOF

/etc/init.d/cron restart

It will just auto reboot the device if this occurs.

Regards,

Julian

@hauptmedia
Copy link
Author

I run 50 devices and they're running now more reliable than ever. However you're right there need to be some more work done in the image. I bought an orange pi devkit and will see what i can do.

@gga888
Copy link

gga888 commented Mar 30, 2018

hello Matt
I have windows 10. there is a solution

@vmattprice
Copy link

Julian,

Thanks for the reply & help.

I tested this with writing the image file on a Linux distro, then again after uncompressing on a Windows machine.. Both had the same result. It booted and worked, with the few hiccups I mentioned above, but in my case, it was unusable because of reliability.. It would literally just completely stop mining within 30-60 minutes and would require manual intervention to bring it back (power cycle).

Not quite sure how you have 50 of the Giant B's on this image running more stable than the base image from Baikal. I have to say, in my experience, it was the opposite.

I applaud you for trying to advance the B and correcting some of its quirks though, because it would appear as though Baikal just puts these devices out and remains fairly hands on with updates and upgrades.. I know they've been promising new algorithms on the X10 for some time now, still nothing.

Thanks again,

Matt

@hauptmedia
Copy link
Author

hauptmedia commented Mar 30, 2018

Matt, as I already wrote the workaround is to auto reboot the device when this happens. For my devices this happens every 1-2 days on 1 device. So this doesn't have a high priority for me right now.
It was worse for me when the devices stop responding on the network (happened every day to 3-5 devices)

I did not integrate the fix in the image yet. It can be deployed by logging via ssh into the device and create this cronjob:

ssh root@<deviceip>
cat <<EOF > /etc/cron.d/reboot
* * * * * root dmesg | grep 'HC died' >/dev/null && /sbin/reboot 
EOF

/etc/init.d/cron restart
exit

Notice to all users: please be aware that the image is beta software and still contains bugs.

@gga888
Copy link

gga888 commented Mar 30, 2018

Hi Matt . You can give step by step information on installing firmware ? for Windows 10

@vmattprice
Copy link

Julian,

No I hear you, on the "fix," however my B runs more stable on the OEM firmware was my point. I don't see as many glitches with it, such as the text/numbers w/ temps and load, plus this bug needing the auto-restart of the whole rig..

The main reason I tested this was to underclock the CPU of the Pi to try and keep the operating temps of the Pi itself somewhat cooler.. My chip temps run the same with both firmware versions, and I have cooling setups in place to keep those in check w/ staged A/C.. But, the Pi temp sometimes goes all the way up to high 40's low 50's, which seems excessive.. As you've pointed out, no heatsinks, so cooling can be a challenge.. If anything, I noticed the temps running hotter on the new firmware, so my main reason for upgrading was nullified w/o seeing a temp reduction, plus the instability forced me to go back to OEM.

I would gladly re-image if you make some updates for stability and temp control of the Pi itself (if possible).

Would love to see some frequency adjustment options :)

**gga888, it's real easy to do in Windows.. The only step you need to follow that isn't laid out exactly via Baikal's support page on how to upgrade the Pi software (http://www.baikalminer.com/support02.php) is download an extraction utility like WinRAR (my choice) and decompress the archive that Julian provided above via the link. Just make sure the SD card you insert is prepped properly (all partitions removed [can do this under Windows Disk Management] and create a new FAT32 volume with 4MB allocation units)..

Thanks,

Matt

@hauptmedia
Copy link
Author

Ok thank you for the feedback. I will keep you updated when I do further work on the image. My goal is to get the device 100% stable and reliable. I will share my findings with the community.

@hauptmedia
Copy link
Author

hauptmedia commented Mar 30, 2018

My main pain point was that I run these devices in a far away colocation and everytime they stopped responding on the network it did create some costs for me to let somebody reboot them. The new firmware at least still responds on the network so that you can do remote management.

So for me the new "glitches" are much better than the "old" glitches. However we all agree that no glitches at all would be the best :)

@vmattprice
Copy link

Agreed :) I can see where remote reboot capability trumps bricked status where you need a switchable PDU.. in my case, I have a switchable remotely-accessible PDU, so it's just as easy to bounce the power and logon and restart it..

I am based out of Georgia, USA, so with summer rapidly approaching, I am all for ways to keep the temps down, especially on the Pi w/o a heatsink :) I already have a custom duct attached to the rear of the B to channel the heat out and a flange on the intake fan to channel in direct A/C air..

While you're poking around, see if you can crack the code on frequency adjustment :)

Thanks again for all the correspondence and work!

Matt

@max2322
Copy link

max2322 commented Apr 1, 2018

Indeed on the network now the device is available stably.
However, I found an even stranger feature.
Within 12 hours the performance dropped.
It was decided to reboot the device.
Earlier I did not observe this.
p.s.
I agree. Changing the frequency was great!
gb

@vmattprice
Copy link

Any news on this? I feel like the Giant B has so much more potential :)

@jandertien
Copy link

With this new firmware my profits are less than half. For my two miners I had before 500 euro a month, now it is barely 200 euro. Minus 120 euro's power costs, its now down to 40 euro's for one miner a month. It's beter to place an lemonade stand, I'll earn more.

@vmattprice
Copy link

The firmware didn't have any impact for me on hashrates, it was for other reasons (mentioned above) that I swapped back to the OEM firmware. The profit dropping is simply due to the market getting saturated with more and more hashing power and increasing difficulty.. Unfortunately, this happens with all mining gear (none are immune to this, just a matter of time.)

Part of the frustrating part for me w/ the Giant B is, unlike the X10 (which they just released a new firmware version to add 2 new algorithms taking it from <$10 a day to $45 a day profits for the time being!), it's like they have completely forgot about the Giant B.. No firmware updates, no new posts, meanwhile, they are releasing Giant N's and updating the oldest X10's..

@baikalminer , you guys really need to spend some time to try and help improve/upgrade what you can on the Giant B's.. I paid damn good money for this, got in early with wide eyes, shame on me for doing that, but profits dropped so incredibly fast on the B's I was not even able to scratch the surface on recooping my investment :(

I know it can hash a good bit higher than it settles in at.. It's all about cooling, if you are able to keep the units cool, I know they are able to hash much much more than they are currently doing.

HELP US OUT!! Tweak them, update the firmware, give us some more algo's those chips can hash on, etc..

Thanks,

-concerned customer

@3156br
Copy link

3156br commented Jun 3, 2018

hi Matt, I feel the same as you. I did jump into three of these B machines here in FL. Just last month I thought same as you a fine hash rate low kw uses, who knows when they will re-coop the investment.
If average rate remains stable now they will do all right over the long run. it seems these have state of art processors run in 40-160gh/s. I agree with you on if the would program in some new algorithms it would
or should increase profits and sales for them also.

@BrminerD9
Copy link

I set cpu to run max and with no problems in the last two months.

@BrminerD9
Copy link

I also upped in settings from 8 to 200000 hz seems to help get users faster on reboot. keeps Gh/s higher a tad
bk-b002
bk-b001
bk-b001
bk-b002

@BrminerD9
Copy link

hi Matt,
Its seems like your a coder. I bet you can code new algo for the bk b miners. I bet you have all ready.
I found by study what algo BK is using to mine the different coins is Blake type . Blake2S is needed in the mix. If you would add than in to the stock rom. I would pay you directly. I have been mining this algo with Blake256r8 the watt stay steady at 255w the Gh/s 170 average I have hit blocks many times but the site show's non yet.

@vmattprice
Copy link

@hauptmedia any progress on tweaking the firmware? Perhaps figuring out a way to overclock and get better hash performance? Any new algorithms that would be supported by the chipsets?

@hauptmedia
Copy link
Author

hey @vmattprice there are indeed some news regarding a new firmware. I started to create a mining operating system from scratch and the Baikal Giant B is the first target.

We have already an alpha version running on 10 of our devices.

I will release a public beta version within the next weeks.

Make sure to join us on Telegram:
News Channel https://t.me/hashland_cc
Discussion Group: https://t.me/joinchat/LKpd5g8ASwqRCXLKpz7SHw

Check out our repos at https://github.com/hashland

@vmattprice
Copy link

@hauptmedia HAPPY to test if you need a ppb tester (pre-public-beta lol)! GiantB is basically on the floor now as far as profits on NiceHash, roughly $1.50 per day. My power isn't bad, $0.07 p/kWh, but still.. HAPPY to test anything that can boost its performance!

Let me know!

-Matt

@hauptmedia
Copy link
Author

hauptmedia commented Nov 8, 2018

We focus on stability, automatic fan control, auto update function and api connectivity to our SaaS / AI solution which can manage your device for our first release. There are no higher hash rates with this first release but your device won't freeze anymore and will be able to auto update itself.

You can expect a beta version which supports all algorithms and a nice interface in the next weeks.

Our current version only supports Lbry & Pascal, and there is no interface showing you hashrates, etc (it's simply not ready yet), you can only set the pool in the webinterface and it will auto connect to it. You can check the system log in the interface if it's running. This is an ALPHA version, so do not expect anything to function properly.

If you're still brave and curious enough:

Sd-card images can be found at: http://cdn.hashland.cc/hlos/

Navigate to folder $VERSION/targets/sunxi/cortexa7, It's the file named hashland-$VERSION-sunxi-cortexa7-baikal-giant-b-squashfs-sdcard.img

Or just log into the web interface using the original image, click terminal, login with baikal / baikal and enter

curl https://hashland.cc/install | sudo VERSION=@beta sh

Warning: This will erase your current installation and replace it with an ALPHA version of hashland os. If you want to revert this you have to manually remove & reflash your sd card with the original image

DISCLAIMER

THIS SOFTWARE AVAILABLE ON THE SITE HASHLAND.CC IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL HASHLAND.CC OR ANY OF THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

@vmattprice
Copy link

@hauptmedia haha nice!

I think I may wait for your official beta code first. It would be nice to see some tweaks to the intensity and hashing power, but I do like the auto-update idea.. Really sucks having to pop out those SD cards lol.. Bitmain really has that down pat, be nice to see a solution for Baikal..

HOWEVER, what good is auto-update if there are NEVER any updates LOL..

-Matt

@hauptmedia
Copy link
Author

We plan to target multiple devices from different vendors with this software, so when we update the software we can update it for all devices.

@vmattprice
Copy link

@hauptmedia Ahh yes, you did mention that (just that you were starting with the GiantB).

I suppose the most important thing for me, and I would argue with any B owner, is more performance (be that in additional algorithms that might work based on the chipsets and/or tweaking options to enhance frequencies and clock speeds).

I'm sure that voids any kinds of warranties that might still exist; however, i'm willing to take that risk if such a software existed, but we can't get @baikalminer to do ANYTHING!

-Matt

@hauptmedia
Copy link
Author

I know your pain, we have a lot of Giant Bs. This is the main reason why we started the whole miner operating system project. We never managed to get them 100% stable with the armbian based solutions. So you can expect that we will try and test everything to squeeze everything possible out of this machine.

@vmattprice
Copy link

@hauptmedia Looking very much forward to it!! Keep me/us posted!

Thanks again,

Matt

@BrminerD9
Copy link

I put your beta in one of my three Giant Bs for testing. neat on auto-fan control.
noted that it seems hash rate is slower than before. I'm running pascal algo.
it is full of information for the want to knows. good show for a networking dude like me.
I noted that speed of cpu seems not to show in logs. I had managed to set cpu speed in the three to max and it help keep production peaked all though it did nothing for the 3 hash cards hash rate.

It would be nice to incorporated and clocking adjuster so each user can peak his machine feather like in CLaymore miners for my video 1070itx card in one of my pc. it starts with low hash rate and you can step it up one step at a time. started at low 90ms end easly at 400+ m/s in pascal. feature like that would be a great one.

@hauptmedia
Copy link
Author

Hi thank you for your feedback. I also started an new miner called hlminer (hashland‘s miner) https://github.com/hashland/hlminer

This is used in the Image. Compared to sgminer it has a lot lower cpu usage. I‘m aware that is still has it‘s problems but they will be fixed in the next weeks.

@BrminerD9
Copy link

I tested it nice work in progress. I purchased two micro cards and wrote the factory image to it. Ha Ha Ha
wally world card were only 16gb and the BK-B Failed to boot on them. some how I did not write to the original sim's card. I put it back into the slot thinking it would boot into your system again was better than no operating system at all. It booted into the original Bk-B software. I was sup-prized but happy.
Funny is it had a mix configurations some were what I had on it others 4 in fact seem like it was hacked.
these extra configuration were mining location that I had never used with strange login and passwords to them. end of story the miner is back working as normal.

@hauptmedia
Copy link
Author

Hi, you can always recover the device with a new sd card image. The control board has 2MB of flash memory integrated which can used to install a network boot loader (we have a test device running with this already) so you can use the device even without a sd card and boot it from network. But if a sd card is inserted it will always have a higher priority and the on board flash will be ignored.

@BrminerD9
Copy link

Apparently it booted from your network image but did not overwrite on original sd card.
Baikal support said using 8+ gb cards should be no problem. it is weird that win32DiskImager did not seem to write properly possible. It did show as a boot drive after write but the miner did not boot from it.

@hauptmedia
Copy link
Author

hauptmedia commented Nov 10, 2018

There is no network image yet, it writes to the sd card. But our image is only 16 MB (vs 4 GB of the original image) so it can be written very fast to the sd card. I don't know win32diskimager because i always use linux command line tools to do these kind of jobs but I'll look into it.

@hauptmedia
Copy link
Author

hauptmedia commented Nov 10, 2018

btw, 16GB cards are working fine for me in these devices. I had to replace some of the original sd cards because they were defect and could not get 8 gb cards, so i used 16gb ones.

We also replaced the filesystems in our image to "Squashfs + F2FS (Flash friendly file system)" to expand the lifetime of the card to the lifetime of the whole device.

The original image uses the default linux ext file system which is not optimized for embedded devices and sd cards.

@BrminerD9
Copy link

Now they did it to us again they **_

forked Pascal coin

_** so it is no longer mined with BK-B .
the only source of income I had from them that I could count on.

@ask4moh
Copy link

ask4moh commented Nov 16, 2018 via email

@BrminerD9
Copy link

https://classic.siamining.com/help try here works on my BK-B's the classic still works

@vmattprice
Copy link

@hauptmedia any updates on the firmware?

@hauptmedia
Copy link
Author

Hi, we deployed our new firmware to 120 devices and they are all running stable now. We have still a few todos open before we can do a stable release. You can join our Telegram group to get the latest news at: https://t.me/joinchat/LKpd5g8ASwqRCXLKpz7SHw

You can follow development at https://github.com/hashland and for the miner https://github.com/hashland/hlminer

@ask4moh
Copy link

ask4moh commented Nov 29, 2018 via email

@hauptmedia
Copy link
Author

Hi, we started to discuss this issue in our Telegram group. We found out so far, that the only change Sia made is that the nonce must be divisible by 1009. So the algorithm for generating the hashes basicly does simply "nonce + 1009" instead of "nonce + 1". What we did not find out so far is if the nonces are being generated by the STM32 microcontroller (which could be upgraded) or the asics.

@vmattprice
Copy link

Any updates? Not really trying to join another chat feed to monitor, but would love an update if you can provide one @hauptmedia

@DfabulaGames
Copy link

please something update for baikal N+ ??

@vmattprice
Copy link

Any news on this @hauptmedia ??

@Reelenovator
Copy link

Hey Julian - is there any chance you have the new upgrade for the Baikal Giant B BK-B to mine Blake2b. My miner won't connect and I heard there may be an update floating around but I can't seem to find it. Any thoughts/suggestions would be greatly appreciated and compensated (name your price)! Thanks!! @vmattprice @gga888 @max2322 @jandertien

@zrusznak
Copy link

zrusznak commented Jan 9, 2021

Good morning everyone
I have 6 Giant Bs
I am trying to replace the original orange Pi zero
With the new Orange Pi Zero Plus
Anyone can help ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests