Title: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: Lantis on July 10, 2013, 10:02:45 AM Newbie here, but as all other newbies are thinking, better mine now or never ::)
I plan to use my Synology NAS to mine with ASIC erupters since it's running 24/7. This guide is using Synology DSM 4.2 (3202) as a base, with a DS410j (Marvell MV6281) NAS (I cannot guarantee that this guide will work for DSM versions lower than 4.2!) Even if it is slow and will void warranty, I will be doing native compiling which is mostly documented here (http://forum.synology.com/wiki/index.php/Overview_on_modifying_the_Synology_Server,_bootstrap,_ipkg_etc). You can also do cross-compiling but it gives me more headache since there are a lot of library dependencies, it's much easier to do it natively (albeit there are things to be fixed in the NAS though to get cgminer/bfgminer to be compiled properly). Since I'm waiting for my USB erupters, might as well write a guide here while waiting. DISCLAIMER : Since this will void your warranty, I am not responsible for any result leading to corruption of your NAS. Step 1. Setting up the bootstrap/toolchain Login as user "root", password is the same as for admin via SSH. Change to a directory such as "/volume1/@tmp" Download the script for installing bootstrap for your CPU. To find out which kind of CPU your NAS have check it here (http://forum.synology.com/wiki/index.php/What_kind_of_CPU_does_my_NAS_have). Code: wget <bootstrap script link> For Intel XScale FW IXP420 BB ARM Processor http://ipkg.nslu2-linux.org/feeds/optware/ds101/cross/unstable/ds101-bootstrap_1.0-4_armeb.xsh For Intel Atom CPU's: D410, D425, D510, D525 and D2700 Processors http://ipkg.nslu2-linux.org/feeds/optware/syno-i686/cross/unstable/syno-i686-bootstrap_1.2-7_i686.xsh For 8241 PPC models http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/stable/ds101-bootstrap_1.0-4_powerpc.xsh For Freescale PowerPC QorIQ P1022, 8533/8543 PPC models http://ipkg.nslu2-linux.org/feeds/optware/syno-e500/cross/unstable/syno-e500-bootstrap_1.2-7_powerpc.xsh For mv5281 ARM models http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2-7_arm.xsh For Marvel Kirkwood mv6281 ARM models http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/syno-mvkw-bootstrap_1.2-7_arm.xsh For Marvel Kirkwood mv6282 ARM models http://wizjos.endofinternet.net/synology/archief/syno-mvkw-bootstrap_1.2-7_arm-ds111.xsh In my case, it's Code: wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/syno-mvkw-bootstrap_1.2-7_arm.xsh Set the .xsh script to be executable and run the script: Code: chmod +x syno-mvkw-bootstrap_1.2-7_arm.xsh After the script has finished, do not reboot yet. Do the following: make symlink of opt: Code: cd / check that /etc/profile contains: Code: PATH=/opt/bin:/opt/sbin:$PATH In /root/.profile comment the following lines by adding #: Code: #PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin Now you can reboot. Reboot the NAS and login again as user "root", then Code: ipkg update Now you can get the toolchain! Run these series of commands: Code: ipkg install gcc Toolchain done! You can now start compiling natively! (Still a long way to compile cgminer/bfgminer though... :P) Step 2. Setting up the environment and dependencies Run the following commands: Code: ipkg install libcurl libcurl-dev check libcurl if properly installed by typing: Code: pkg-config --libs libcurl Fix ldconfig path Code: export PATH=$PATH:/volume1/@optware/share/ipkg/intercept Fixing libpthread the libpthread installed in optware is corrupted, so we copy the original libpthread installed. Make a backup of libpthread: Code: mkdir /opt/arm-none-linux-gnueabi/lib_disabled Copy and link libpthread to /opt Code: cp /lib/libpthread.so.0 /opt/arm-none-linux-gnueabi/lib/ Step 3. Compiling dependencies download and install jansson: Code: wget http://www.digip.org/jansson/releases/jansson-2.1.tar.gz download uthash header files (located in https://github.com/troydhanson/uthash/tree/master/src) and put it in /opt/include download and install libusb: Code: wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2 Step 4. Compiling cgminer/bfgminer[TODO] To be continued in a moment... Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: crazyates on July 10, 2013, 04:12:37 PM Now this is the kind of shit I like to see. Are you using it with USB devices? How much power does it use? Good work!
Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: Lantis on July 11, 2013, 07:36:33 AM Now this is the kind of shit I like to see. Are you using it with USB devices? How much power does it use? Good work! The NAS I have (410j) consumes about 42w, but since it's always on, it's "free" electricity so to speak. The native compiling of cgminer/bfgminer should have been straightforward, but there are just some nags that you would encounter and I merely pointed the solution to it :) Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: xjack on July 12, 2013, 04:19:13 AM watching - thanks for this!
Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: bronan on July 12, 2013, 02:47:23 PM As i was running the guide i got into some errors fairly quick
first error is : Configuring tcl Configuring zlib An error ocurred, return value: 1. Collected errors: Cannot find package crosstool-native. Check the spelling or perhaps run 'ipkg update' ERROR: The following packages conflict with wget-ssl: wget DiskStation> ipkg update Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable /Packages.gz Inflating http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/P ackages.gz Updated list of available packages in /opt/lib/ipkg/lists/cross Successfully terminated. I tried again the update but it did not do anything other then after the reboot second error comes when i try : DiskStation> pkg-config --libs libcurl Unknown keyword 'URL' in '/opt/lib/pkgconfig/libcurl.pc' any and all other commands went fine and worked as should i seen no other errors so i think the crosstool-native is not found or the name is wrong I checked the page where the file should be and its not present at all Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: Lantis on July 12, 2013, 05:04:37 PM As i was running the guide i got into some errors fairly quick first error is : Configuring tcl Configuring zlib An error ocurred, return value: 1. Collected errors: Cannot find package crosstool-native. Check the spelling or perhaps run 'ipkg update' ERROR: The following packages conflict with wget-ssl: wget DiskStation> ipkg update Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable /Packages.gz Inflating http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/P ackages.gz Updated list of available packages in /opt/lib/ipkg/lists/cross Successfully terminated. I tried again the update but it did not do anything other then after the reboot First: which DSM version do you have? I see you got until ipkg update, that means you can get the precompiled binaries for the toolchain. When you try these commands nothing happens? Code: ipkg install gcc type in Quote ipkg list_installed and paste here the output. Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: bronan on July 12, 2013, 06:50:27 PM No no lol your missing the point
crosstools package totally not exits from the packages goto the link provided as in my post and browse through the packages it is not there the second error is because it can not find the needed crosstools hence it error out http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/ try to find the crosstools Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: Lantis on July 12, 2013, 06:58:16 PM No no lol your missing the point crosstools package totally not exits from the packages goto the link provided as in my post and browse through the packages it is not there the second error is because it can not find the needed crosstools hence it error out http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/ try to find the crosstools No no no-- because you can't run "ipkg update" without ipkg-- and from the message you sent: Quote DiskStation> ipkg update Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable /Packages.gz Inflating http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/P ackages.gz Updated list of available packages in /opt/lib/ipkg/lists/cross Successfully terminated. That means you got "ipkg" already. There's nothing there in "/opt/lib/ipkg/lists/cross", but there is something in "/opt/lib/ipkg/lists" which is the cross file (that contains packages that you can download). EDIT: ah-- I see what you mean on the error. Ignore this: Code: Cannot find package crosstool-native. and do this: Code: cd /volume1/@tmp it will show you something like this (example for sysfsutils): Code: DiskStation> ipkg install -verbose_wget sysfsutils take note of the url and do Code: wget <url you got from the libidn> do the same thing for wget-ssl: Code: ipkg install -verbose_wget wget-ssl then do Code: ipkg install filename1 Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: bronan on July 13, 2013, 01:06:17 AM Ok the first i got and worked well
wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/libidn_1.25-1_arm.ipk but the second did error again out DiskStation> ipkg install -verbose_wget wget-ssl Installing wget-ssl (1.12-2) to root... Nothing to be done An error ocurred, return value: 1. Collected errors: ERROR: The following packages conflict with wget-ssl: wget So i just installed the succesfull received package which now ended succesfull I see clearly that somehow for wget it message nothing to be done but for the wget-ssl it fails. Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: whisper on August 13, 2013, 08:29:14 AM once version libcurl 7.32 is complied, how do I make the Synology see it? When I check the version I get:
DiskStation> curl-config --version libcurl 7.24.0 Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: Cranky4u on August 30, 2013, 11:37:22 PM SO now the bugs are out can we get a bug free step by step guide for non-native linux people...pls
Also, would this set up work for a DNS-320? Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: clanie on October 20, 2013, 12:36:00 PM OK, I got to this part:
Step 4. Compiling cgminer/bfgminer[TODO] To be continued in a moment... So I tried to build it as described in the CGMiner README (version 3.6.4), but when doing ./configure I get this errormessage: configure: error: Missing required libudev dev Is there any way to build it without udev? Or to get udev on the NAS (mine is a DS411slim with DSM 4.3)? Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: bronan on October 20, 2013, 08:09:52 PM I think the thread is kinda dead
Since the fail to get it working on my 411j, i have stopped trying to get it to work Also because i sold all small miners Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: clanie on October 26, 2013, 06:59:16 AM OK - in case others are trying to run a miner on a synology nas: go for bfgminer. It is far easier to build on the (ARMv5 based) synology.
Once you have your toolchain set up as described above, it is quite straight forward to build first its dependencies and then bfgminer itself, following the instructions given in its README. To actually run it you will need kernelmodules usbserial and ftdi_sio. They are not installed by default, but you can build them as described here: http://hallard.me/how-to-install-kernel-modules-on-synology-ds1010/ (http://hallard.me/how-to-install-kernel-modules-on-synology-ds1010/) (change ARCH to match your system). Then activate these modules with Code: insmod usbserial.ko Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: achib on March 24, 2014, 06:59:16 AM Hi,
maybe this is a bit off topic but did anyone get the stratum proxy running on any synology device ? This would really help me further in safing electricity ;) and for the bfgminer meanwhile there is a package for synology devices: https://bitbucket.org/polandj/synominer/ Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: clanie on March 25, 2014, 04:26:04 PM Hi, maybe this is a bit off topic but did anyone get the stratum proxy running on any synology device ? This would really help me further in safing electricity ;) and for the bfgminer meanwhile there is a package for synology devices: https://bitbucket.org/polandj/synominer/ No, but why would you use that? bfgminer already supports stratum, but maby you need it for something entirely different? Title: Re: [GUIDE] Running cgminer/bfgminer on Synology NAS Post by: achib on March 25, 2014, 04:52:02 PM I want to connect my old blades to them - but I sold em today :D
At least i got more then I paid .. ebay is wonderful :p |