Author

Topic: Spartan6's on P2Pool using a RaspberryPi? (Read 6646 times)

hero member
Activity: 784
Merit: 500
July 07, 2012, 05:11:17 PM
#32
Nice ill try that, left him a tip of 0.5 BTC

It runs Cheesy but not as good as i expected:

MH is to damn low .... May be my pool or network?  On My main Machine i get the full MH to the pool Sad
hero member
Activity: 560
Merit: 500
If you want to run ztex on RPi, there's an ARM port available:

http://blog.villekangas.com

You will need to have java installed to run it:

sudo apt-get install openjdk-6-jdk

Then just make sure you have ZtexBTCMiner-120417-ARM.jar in the directory where you run it:

java -cp ZtexBTCMiner-120417-ARM.jar BTCMiner etc..

You might want to tip the guy, and hopefully we'll have a RPi port of eldentyrrell's bitstream aswell.

I'm running a cluster with:

root@raspberrypi:~# uptime 14:46:34 up 2 days,  1:41,  1 user,  load average: 0.37, 0.41, 0.46
hero member
Activity: 784
Merit: 500
hmm cgminer isn't stable too ....
member
Activity: 75
Merit: 10
Can u explain how u got Btcminer running on your pi ?

Sure..
1. apt-get install openjdk-6-jre and openjdk-6-jdk
2. Download the SDK here: http://www.ztex.de/downloads/#firmware_kit, extract it you will get "ztex" directory
3. cd to ztex/libusbJava-src, edit Makefile and change JAVAPREFIX to /usr/lib/jvm/java-6-openjdk (i.e JAVAPREFIX=/usr/lib/jvm/java-6-openjdk)
4. type make, it should build libusbJava64.so, libusbJavaSh.so, and libusbJavaSt.so
5. Soft-link (ln -s) these 3 libraries to the directory where you will run BTCMiner in
6. Run BTCMiner regularly

But it is not stable, crashed my RPi twice in one day, I would go back to Mac before troubleshooting it Sad
hero member
Activity: 784
Merit: 500
Can u explain how u got Btcminer running on your pi ?
member
Activity: 75
Merit: 10
Anyone tried mining Spartan6's on P2Pool using a RaspberryPi yet?

I run BTCMiner on RPi to drive my ZTEX FPGA board, it works fine.
I have to compile and use the following libraries, the source is in the SDK:
libusbJava64.so
libusbJavaSh.so
libusbJavaSt.so

Running p2pool makes me worried the I/O will destory my cheap SD card,
so I leave it and bitcoind on my Mac mini Smiley
hero member
Activity: 784
Merit: 500
got cgminer it running on my pi today Cheesy
member
Activity: 79
Merit: 10
Hi

Im not sure where your based but amazon.co.uk do these ones..
LogiLink USB 2.0 Hub 10-Port - Hub - 10 x Hi-Speed    and they are quiet cheap

would a RPi be capable of running a quad FPGA?

I fully believe the RasPi is capable of handling multitudes of icarus' or other USB connected FPGAs. However, there is a really bad USB kernel driver in the current OS images that seems to be jacking with interrupts. Until that is fixed, the most I get is 2 icarus.
newbie
Activity: 28
Merit: 0
Hi

Im not sure where your based but amazon.co.uk do these ones..
LogiLink USB 2.0 Hub 10-Port - Hub - 10 x Hi-Speed    and they are quiet cheap

would a RPi be capable of running a quad FPGA?
member
Activity: 79
Merit: 10
Ok got new meritline 10 port hub. Still cannot get more than two icarus modules to work. I've found out that there may be a problem with the driver that broadcom is using for the usb subsystem. Details here:

http://www.raspberrypi.org/phpBB3/viewtopic.php?t=6929&p=99103
http://lists.infradead.org/pipermail/linux-rpi-kernel/2012-June/000033.html

It seems like it is polling too fast and my dmesg reports things like:

Code:
INFO:: periodic_channel_available: Total channels: 8, Periodic: 5, Non-periodic: 3
INFO:: schedule_periodic: No host channel available for periodic transfer.
ERROR::dwc_otg_hcd_urb_enqueue:487: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008
pl2303 ttyUSB3: pl2303_open - failed submitting interrupt urb, error -4008
INFO:: periodic_channel_available: Total channels: 8, Periodic: 6, Non-periodic: 2
INFO:: schedule_periodic: No host channel available for periodic transfer.
ERROR::dwc_otg_hcd_urb_enqueue:487: DWC OTG HCD URB Enqueue failed adding QTD. Error status -4008
pl2303 ttyUSB2: pl2303_open - failed submitting interrupt urb, error -4008


So we may be SOL until the USB kernel folks reverse engineer or find a replacement USB driver.

FWIW the new hub identifies itself as:
TERMINUS TECHNOLOGY INC.
member
Activity: 79
Merit: 10
Just a quick update... initially it seemed that bitcoind was running great on the raspberry pi, however as the blockchain grew in length it appears to be slowing down. I tried copying the blockchain from my desktop but kept getting errors when launching. So I decided I'd had to get the blockchain from scratch. I'm running this way:

sudo dphys-swapfile swapoff
./bitcoind -listen=0 -checkblocks=10 -checklevel=0 &

I turned swap off to keep from thrashing the SD card. The system uses all but about 12 MB of ram! Everything is stable, just slow to load the blockchain and by slow I mean about 10000 blocks per day! It spends more time in mmcqd (the flash memory driver) for disk reads/writes than it does in bitcoind. There is some room for improvement in bitcoind.

My thoughts are once it finally catches up with the blockchain it should be able to keep up fine with the network and should be able to run with P2Pool...

I'll keep you posted.




donator
Activity: 448
Merit: 250
I spent some time getting bitcoind to build on RaspberryPi. Here are my steps...

I'm using a Transcend 8GB SDHC Card (Class 10)

First I started with the Debian Wheezy test image from: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=50&t=8071
On first boot it will run raspi-config. Here you will increase the size of your root partition, set the maximum RAM to the CPU, and enable SSH server.

Get build tools and deps:
sudo apt-get install build-essential autoconf pkg-config git libcurl4-openssl-dev libncurses5-dev libssl-dev libdb5.1++-dev libboost-all-dev

Adjust virtual memory:
sudo vi /etc/dphys-swapfile
Change:
CONF_SWAPSIZE=100
to:
CONF_SWAPSIZE=400
(I was getting an "g++: internal compiler error: Killed (program cc1plus)" with the default size)

sudo dphys-swapfile setup
sudo dphys-swapfile swapon

Get source and build bitcoind:
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin/
git branch -r
git checkout origin/0.6.2

cd src/
make -f makefile.unix

Go to dinner... Smiley

bitcoind seems to run fine on the RasPi.

Very cool, thank you!
member
Activity: 79
Merit: 10
I spent some time getting bitcoind to build on RaspberryPi. Here are my steps...

I'm using a Transcend 8GB SDHC Card (Class 10)

First I started with the Debian Wheezy test image from: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=50&t=8071
On first boot it will run raspi-config. Here you will increase the size of your root partition, set the maximum RAM to the CPU, and enable SSH server.

Get build tools and deps:
sudo apt-get install build-essential autoconf pkg-config git libcurl4-openssl-dev libncurses5-dev libssl-dev libdb5.1++-dev libboost-all-dev

Adjust virtual memory:
sudo vi /etc/dphys-swapfile
Change:
CONF_SWAPSIZE=100
to:
CONF_SWAPSIZE=400
(I was getting an "g++: internal compiler error: Killed (program cc1plus)" with the default size)

sudo dphys-swapfile setup
sudo dphys-swapfile swapon

Get source and build bitcoind:
git clone https://github.com/bitcoin/bitcoin.git
cd bitcoin/
git branch -r
git checkout origin/0.6.2

cd src/
make -f makefile.unix

Go to dinner... Smiley

bitcoind seems to run fine on the RasPi.
hero member
Activity: 686
Merit: 564
Hopefully it's powerful enough to run P2Pool.
Doubt it. P2Pool's quite RAM-hungry and it requires running a full Bitcoin daemon which is fairly IO-heavy. Remember that by default the Raspberry Pi only has 128 MB of RAM available to the CPU, which can be increased to a maximum of 224 MB if you're willing to essentially disable GPU acceleration (presumably you're not using that anyway).
hero member
Activity: 560
Merit: 500
I can report http://www.dealextreme.com/p/high-speed-usb2-0-1-1-10-port-usb-hub-pink-39715 works fine with additional 5V power running 10 Ztex 1.15x's. Without the power I had 4 ports underpowered. I'm feeding my pi through Nokia N9 power supply. I'm mining with cgminer 2.4.2 on EclipseMC.

Nice color choice!

It's sexy and it was the cheapest Smiley Btw, system had crashed during night's test run. When I disconnected the power from Pi, all the LEDs kept shining, thus indicating power from USB port being drawn into the Pi(?!). I'll keep investigating..
member
Activity: 79
Merit: 10
I can report http://www.dealextreme.com/p/high-speed-usb2-0-1-1-10-port-usb-hub-pink-39715 works fine with additional 5V power running 10 Ztex 1.15x's. Without the power I had 4 ports underpowered. I'm feeding my pi through Nokia N9 power supply. I'm mining with cgminer 2.4.2 on EclipseMC.

Nice color choice!
hero member
Activity: 560
Merit: 500
There is no directory /dev/usb

I've found out a couple of things...

First, the hub I'm using is listed as a problem hub here: http://elinux.org/RPi_VerifiedPeripherals#Problem_USB_Hubs

On a whim I modified a USB cable to cut the +5V power wire between the RasPi and the hub. According to some forums even powered hubs can draw too much current from the RasPi. When I did that, the hub was no longer recognized by debian. I stopped testing at that point.

From the same verified hw website it looks like the LogiLink UA0096 10 port USB hub works. After a brief search it appears that this brand/hub is only available in the EU. After a brief search I found one that looks just like at at Meritline: http://www.meritline.com/10-ports-usb-hub---p-40830.aspx so I bought one. When it comes I'll update this thread. Until then I'll mine with my PC as the host.



I can report http://www.dealextreme.com/p/high-speed-usb2-0-1-1-10-port-usb-hub-pink-39715 works fine with additional 5V power running 10 Ztex 1.15x's. Without the power I had 4 ports underpowered. I'm feeding my pi through Nokia N9 power supply. I'm mining with cgminer 2.4.2 on EclipseMC.
member
Activity: 79
Merit: 10
There is no directory /dev/usb

I've found out a couple of things...

First, the hub I'm using is listed as a problem hub here: http://elinux.org/RPi_VerifiedPeripherals#Problem_USB_Hubs

On a whim I modified a USB cable to cut the +5V power wire between the RasPi and the hub. According to some forums even powered hubs can draw too much current from the RasPi. When I did that, the hub was no longer recognized by debian. I stopped testing at that point.

From the same verified hw website it looks like the LogiLink UA0096 10 port USB hub works. After a brief search it appears that this brand/hub is only available in the EU. After another search I found one that looks just like at at Meritline: http://www.meritline.com/10-ports-usb-hub---p-40830.aspx so I bought one. When it comes I'll update this thread. Until then I'll mine with my PC as the host.

legendary
Activity: 1795
Merit: 1208
This is not OK.
Have a look in /dev/usb/tts/ when your devices are plugged in
anything there?
member
Activity: 79
Merit: 10

Are those two showing up always ttyUSB0 and ttyUSB1? I.e. Does the problem specifically occur when a ttyUSB higher than 0 or 1 is needed?
How is it when you open two FPGA devices manually in cgminer (instead of the -S auto option), one of them being attached to ttyUSB2?
What I'm trying to get at is, is this specific to the used ttyUSB port (like only ttyUSB0 and ttyUSB1 work), which would point to an issue with the USB kernel model then. 

Please keep us updated, that is very concerning indeed. 


FWIW: It doesn't happen just on higher enumerations, It will also happen on /dev/ttyUSB0
member
Activity: 79
Merit: 10
lsusb shows the following:
ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

The following posts indicate others might be having issues with the Prolific usb to serial adapter:
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=6218
http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=6629&p=90223

I'm using a Dlink DUB-H7 7-port USB hub to connect the RasPi to the Icarus boards. I'm NOT powering RasPi from hub, I'm using a 2A HP TouchPad micro usb adapter.

Still gathering data at this point...
donator
Activity: 448
Merit: 250
I was able to get the Icarus attached to a Dlink usb hub. It seems there is a problem with either the kernel or the raspberrypi. I have three icarus connected and they show up as /dev/ttyUSB0, 1, and 2. However, cgminer and RG7Miner clients cannot open more than 2 at a time. The last port opened gives an error that the port does not exist, even though it is clearly listed in /dev. It appears to be random of which of the 3 is not available. When I use my regular ubuntu pc everything works as expected (even using the dlink usb hub).

Anyone have similar info? solutions?

Thanks,
J

Are those two showing up always ttyUSB0 and ttyUSB1? I.e. Does the problem specifically occur when a ttyUSB higher than 0 or 1 is needed?
How is it when you open two FPGA devices manually in cgminer (instead of the -S auto option), one of them being attached to ttyUSB2?
What I'm trying to get at is, is this specific to the used ttyUSB port (like only ttyUSB0 and ttyUSB1 work), which would point to an issue with the USB kernel model then. 

Please keep us updated, that is very concerning indeed. 

member
Activity: 79
Merit: 10
I was able to get the Icarus attached to a Dlink usb hub. It seems there is a problem with either the kernel or the raspberrypi. I have three icarus connected and they show up as /dev/ttyUSB0, 1, and 2. However, cgminer and RG7Miner clients cannot open more than 2 at a time. The last port opened gives an error that the port does not exist, even though it is clearly listed in /dev. It appears to be random of which of the 3 is not available. When I use my regular ubuntu pc everything works as expected (even using the dlink usb hub).

Anyone have similar info? solutions?

Thanks,
J
donator
Activity: 448
Merit: 250
I used the Debian preinstall image from raspberrypi.org then

apt-get install git build-essential autoconf pkg-config libcurl4-openssl-dev libncurses5-dev

got the latest from github and built it. Binaries seem to be GTG!

Just make sure your micro usb charger is at least 1 amp or it will act squirrely. I'm using an HP 2 amp designed for their no defunct webos tablet (you can pick one up for about 5 bucks).

I tried this, run autogen.sh then tried CFLAGS="-O2 -Wall -march=native" ./configure --enable-ztex but I get:
Code:
checking whether the C compiler works... no
configure: error: in `/home/pi/git/cgminer':
configure: error: C compiler cannot create executables
See `config.log' for more details

I really don't think you need to use the CFLAGS="-O2 -Wall -march=native" directive.

Have you tried following my guide I linked in the above post? Do it in the suggested order, and I don't think you should get the C compiler issue, that doesn't sound like a ztex issue at all. Given that you downloaded the Debian squeeze for your Raspberry and if you follow my instructions like a cooking recipe (and don't forget the apt-get update at the beginning, or the aclocal before autogen.sh, ...) I don't really see the issue (unless cgminer changed since release ckolivas-cgminer-v2.4.1-9-gb69d735.zip).  

Probably add the 'sudo apt-get install' commands for libudev and libusb in the first section too, just to make sure.
hero member
Activity: 560
Merit: 500
Check out the post I have made here:
https://bitcointalksearch.org/topic/m.919685

It's BFL, but the cgminer install is very similar, just activate the proper FPGA type for ./configure



Cheers!
donator
Activity: 448
Merit: 250
Check out the post I have made here:
https://bitcointalksearch.org/topic/m.919685

It's BFL, but the cgminer install is very similar, just activate the proper FPGA type for ./configure

hero member
Activity: 560
Merit: 500
I used the Debian preinstall image from raspberrypi.org then

apt-get install git build-essential autoconf pkg-config libcurl4-openssl-dev libncurses5-dev

got the latest from github and built it. Binaries seem to be GTG!

Just make sure your micro usb charger is at least 1 amp or it will act squirrely. I'm using an HP 2 amp designed for their no defunct webos tablet (you can pick one up for about 5 bucks).

I tried this, run autogen.sh then tried CFLAGS="-O2 -Wall -march=native" ./configure --enable-ztex but I get:
Code:
checking whether the C compiler works... no
configure: error: in `/home/pi/git/cgminer':
configure: error: C compiler cannot create executables
See `config.log' for more details
member
Activity: 79
Merit: 10
I used the Debian preinstall image from raspberrypi.org then

apt-get install git build-essential autoconf pkg-config libcurl4-openssl-dev libncurses5-dev

got the latest from github and built it. Binaries seem to be GTG!

Just make sure your micro usb charger is at least 1 amp or it will act squirrely. I'm using an HP 2 amp designed for their no defunct webos tablet (you can pick one up for about 5 bucks).

legendary
Activity: 938
Merit: 1000
What's a GPU?
Got cgminer compiled and ready to go... just waiting on my icarus boards!

I'm the opposite, waiting for my pi!
member
Activity: 79
Merit: 10
Got cgminer compiled and ready to go... just waiting on my icarus boards!
hero member
Activity: 481
Merit: 502
I'm working on it at the moment.

I'll let you know when I receive my FPGAs.

Hopefully it's powerful enough to run P2Pool.
legendary
Activity: 1372
Merit: 1003
Anyone tried mining Spartan6's on P2Pool using a RaspberryPi yet?
Jump to: