Some quick instructions on how to use the Raspberry Pi for mining using FPGA's.
I wrote this one since I got a few private messages asking for tips, so it might be useful for some people.
I'm mining using a single Cairnsmore-1 using cgminer, but the instructions should also work for any other FPGA miner.
First of all: make sure you have the maximum amount of memory available for the Raspberry Pi system.
By default the PI has 128MB available for itself, and 128MB for the GPU. If you're only mining with it, you don't want to waste that memory reserved for an unused GPU.
The following command will make 224MB of memory available for the Raspberry PI (execute under root or using sudo):
cp /boot/arm224_start.elf /boot/start.elf
Install some pre-req's for cgminer:
apt-get update
apt-get install autoconf
apt-get install libcurl4-openssl-dev
Download cgminer (you can also use other miner software) and install. In the cgminer directory:
autoconf
./configure --disable-opencl --disable-cpumining --enable-icarus
make
make install
Install screen so you can disconnect and reconnect to the mining session later on:
apt-get install screen
Install some USB libs (might not all be needed, but I installed them just in case):
apt-get install libftdi1
apt-get install libusb-dev
Now, putting the udev rules in the /lib/udev/rules.d/ directory won't work (well, you can put them there, but apparently they aren't used when booting), so you'll have to type the following command every time after booting the Raspberry PI (or put it in some start-up script):
modprobe ftdi_sio product=0x8350 vendor=0x0403
So after all previous actions are done, reboot your Raspberry PI and do NOT connect any miner to it yet.
You'll need to execute the following steps every time you're rebooting your PI:
- login
- su to root (or use sudo) to execute: modprobe ftdi_sio product=0x8350 vendor=0x0403
- connect your FPGA device (you should see it's connected in the dmesg output)
- start a screen session: screen
- start your miner: cgminer --quiet --disable-gpu --icarus-timing long -S /dev/ttyUSB0 -S /dev/ttyUSB1 -S /dev/ttyUSB2 -S /dev/ttyUSB3 -o http://
: -O :
You should now be mining.
press CTRL-a-d to exit the screen session, and after that exit to log off from your PI.
Next time you want to check the cgminer status, just login, and type screen -r to reconnect to the screen session (and after that CTRL-a-d to disconnect again).
Hope this is useful for somebody.