Thanks Xiangfu. To answer my own question, this was the process I used :
CGMiner does not detect the Avalon2 by default. CGMiner is primarily a USB-only application and while the Avalon2 singles have USB ports on them they are essentially still serial devices (just with a Prolific RS232 adapter stuck on them). For this reason CGMiner doesn't auto-detect Avalon2 units, this has two implications :
1. You always have to compile with --enable-avalon2 and something else (CGMiner just quits if I only enable Avalon2 and nothing else)
and
2. CGMiner must be given the serial device to which the AVA2 is attached : cgminer -S /dev/ttyUSB0 .
To start from scratch on your own Ubuntu/Debian system (I followed this process on both Raspbian and an x86_64 machine) :
Install dependencies as per
ckolivas/cgminer git readme :
sudo apt-get install build-essential autoconf automake libtool pkg-config libcurl3-dev libudev-dev libncurses5-dev
Then clone the repo :
git clone
https://github.com/ckolivas/cgminer.gitchange into the directory :
cd cgminer
Autogen :
./autogen.sh
Then configure (with the pipe option so that everything is done in RAM) :
export CFLAGS="-pipe"
./configure --enable-avalon --enable-avalon2
Then compile :
make
You can also go "make -j 4" if you have a 4-core machine (or however many cores your machine has).
Once it's done compiling, you can optionally install it with "make install" or you can run it from the directory with "./cgminer". Either way you'll need to execute cgminer with the following arguments :
./cgminer -S /dev/ttyUSB0 --avalon2-voltage 10000 --avalon2-freq 1500 --avalon2-fan 100
The ttyUSB0 device is your first USB serial port. CGMiner seems to handle multiple -S arguments correctly (multiple singles per cgminer instance).
avalon2-voltage at 10000 is 1.0V (the max is 1.1V).
avalon2-freq is the core frequency... the default is 1500... but I've overclocked mine to 1700 with a 1.1V.
avalon2-fan is obviously the fan speed as a percentage, I just keep mine at 100%.
At a clock of 1500 and 1.0V the device at a room temperature of 24 degrees C with good airflow hits about 64 degrees C. At 1700 with a 1.1V set the device hits around 74 degrees C in the same environment. Both of these assume the fan is at 100%.
The device does not have a thermal throttle/cut-out, so it's important to watch the temperature when overclocking. Xiangfu indicated on IRC that 80 degrees C is acceptable.
You can monitor temperature by adding "--api-listen" to cgminer's arguments and compiling cgminer-api :
gcc api-example.c -Icompat/jansson-2.5 -Icompat/libusb-1.0/libusb -o cgminer-api
If you run "./cgminer-api stats" one of the fields output will be the temperature. Another useful field that's output is the hardware error %.