Bitcoin Forum
June 24, 2024, 02:58:21 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: FPGA mining using a Raspberry Pi  (Read 7910 times)
toxicocean (OP)
Newbie
*
Offline Offline

Activity: 24
Merit: 0


View Profile
October 01, 2012, 06:43:52 PM
 #1

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://<poolurl>:<poolport> -O <pooluser>:<poolpassword>

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.
vitruvio
Sr. Member
****
Offline Offline

Activity: 850
Merit: 331



View Profile
October 01, 2012, 07:33:05 PM
 #2

Of course is usefull, I've  received last friday mi RaspBerry Pi, I've installed cgminer and bfgminer, and seems to work but I have no  FPGA to test, ASIC's are on the way.

Regards
preparation
Member
**
Offline Offline

Activity: 63
Merit: 10


View Profile
October 01, 2012, 08:31:01 PM
 #3

thx for the summary, will look into it later this week  Smiley
AmDD
Legendary
*
Offline Offline

Activity: 1027
Merit: 1005



View Profile
October 01, 2012, 09:31:54 PM
 #4

I plan on trying this later this week. I had my pi setup with a MMQ and it would run for about a day before locking up. I'll try your process and see if that solves the issue.

thanks!

BTC tip jar: 18EKpbrcXxbpzAZv3T58ccGcVis7W7JR9w
LTC tip jar: Lgp8ERykAgx6Q8NdMqpi5vnVoUMD2hYn2a
dlasher
Sr. Member
****
Offline Offline

Activity: 467
Merit: 250



View Profile WWW
October 01, 2012, 09:44:42 PM
 #5


here (https://bitcointalk.org/index.php?topic=28402.msg1229746#msg1229746) too, in the cgminer thread.


Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!