I made a short guide of how to compile cgminer on an RPi
First download the latest Raspbian image from
http://www.raspberrypi.org/downloads and install it on your RPi. There is lots of good guides on how to do that, so no need to make a worse one here
When you are done with the Raspbian setup, update your distribution and packages. SSH to the RPi and run:
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo reboot
When it is done rebooting. SSH to it, and install the compile tools:
sudo apt-get install pkg-config libtool libcurl4-openssl-dev libncurses5-dev libudev-dev
sudo apt-get install autoconf automake gcc-4.7 g++-4.7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7
We need to use GCC 4.7 to compile, so run this and select the one for GCC 4.7:
sudo update-alternatives --config gcc
Download the source you want to compile, and unpack it:
wget
https://github.com/drillbitsystems/cgminer/archive/avalon_support.tar.gztar -zxf avalon_support.tar.gz
cd cgminer-avalon_support/
On to compiling it:
./autogen.sh
CFLAGS="-O2 -Wall -march=native" ./configure --enable-drillbit
make
I like to run cgminer in screen, so I also install that:
sudo apt-get install screen