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. 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/toolchainLogin 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.
wget
For Intel XScale FW IXP420 BB ARM Processor
http://ipkg.nslu2-linux.org/feeds/optware/ds101/cross/unstable/ds101-bootstrap_1.0-4_armeb.xshFor 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.xshFor 8241 PPC models
http://ipkg.nslu2-linux.org/feeds/optware/ds101g/cross/stable/ds101-bootstrap_1.0-4_powerpc.xshFor 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.xshFor mv5281 ARM models
http://ipkg.nslu2-linux.org/feeds/optware/syno-x07/cross/unstable/syno-x07-bootstrap_1.2-7_arm.xshFor Marvel Kirkwood mv6281 ARM models
http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable/syno-mvkw-bootstrap_1.2-7_arm.xshFor Marvel Kirkwood mv6282 ARM models
http://wizjos.endofinternet.net/synology/archief/syno-mvkw-bootstrap_1.2-7_arm-ds111.xshIn my case, it's
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:
chmod +x syno-mvkw-bootstrap_1.2-7_arm.xsh
sh syno-mvkw-bootstrap_1.2-7_arm.xsh
After the script has finished,
do not reboot yet. Do the following:
make symlink of opt:
cd /
ln -s /volume1/@optware /opt
check that /etc/profile contains:
PATH=/opt/bin:/opt/sbin:$PATH
if not, add it.
In /root/.profile comment the following lines by adding #:
#PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
#export PATH
Now you can reboot. Reboot the NAS and login again as user "root", then
ipkg update
Now you can get the toolchain! Run these series of commands:
ipkg install gcc
ipkg install make automake autoconf libtool binutils
ipkg install crosstool-native optware-devel
Toolchain done! You can now start compiling natively! (Still a long way to compile cgminer/bfgminer though...
)
Step 2. Setting up the environment and dependenciesRun the following commands:
ipkg install libcurl libcurl-dev
ipkg install ncurses-dev
ipkg install sysfsutils
check libcurl if properly installed by typing:
pkg-config --libs libcurl
Fix ldconfig pathexport PATH=$PATH:/volume1/@optware/share/ipkg/intercept
Fixing libpthreadthe libpthread installed in optware is corrupted, so we copy the original libpthread installed. Make a backup of libpthread:
mkdir /opt/arm-none-linux-gnueabi/lib_disabled
mv /opt/arm-none-linux-gnueabi/lib/libpthread* /opt/arm-none-linux-gnueabi/lib_disabled
Copy and link libpthread to /opt
cp /lib/libpthread.so.0 /opt/arm-none-linux-gnueabi/lib/
cd /opt/arm-none-linux-gnueabi/lib/
ln -s libpthread.so.0 libpthread.so
ln -s libpthread.so.0 libpthread-2.5.so
Step 3. Compiling dependenciesdownload and install jansson:
wget http://www.digip.org/jansson/releases/jansson-2.1.tar.gz
tar xvf jansson-2.1.tar.gz
cd jansson-2.1
./configure --prefix=/opt
make install
download uthash header files (located in
https://github.com/troydhanson/uthash/tree/master/src) and put it in /opt/include
download and install libusb:
wget http://sourceforge.net/projects/libusb/files/libusb-1.0/libusb-1.0.9/libusb-1.0.9.tar.bz2
tar xvf libusb-1.0.9.tar.bz2
cd libusb-1.0.9
./configure --prefix=/opt
make install
Step 4. Compiling cgminer/bfgminer[TODO]To be continued in a moment...