You saved my sanity, buddy! I tried this once as per some other thread, and after a night of twarting about with linux on multiple devices and the nwools fork of bfgminer, i was ready to quit for the night. Before I tried this tweak to driver-bmsc.c
Now a hilarious 32-bit ASUS EEE netbook with 2GB of ram, 4GB of SSD and a cracked screen gets to run my ants for the night. (i need more hubs.)
Will be applying same to pi tomorrow.
MWAH <3except... I had to
./autogen.sh
./configure --enable-bmsc
[b]make -j 6[/b]
it a second time after editing the code in nano.
Now, its time to tackle cgminer itself.....
sudo apt-get install autoconf
git pull
https://github.com/bitmaintech/cgminerwget
http://ck.kolivas.org/apps/cgminer/3.8/cgminer-3.8.5.tar.bz2tar xvf cgminer-3.8.5.tar.bz2
mv ./cgminer-3.8.5/configure ./cgminer/configure
///This is done because the next command kept moaning that there was no configure directory, so I gave it one....\\\./autogen.sh
This takes a long time...../configure --enable-bmsc
This also takes a long time....make-j
Next, is that all important file change to stop cgminer crashing as discussed on page 2 of this topic, but basically...
cd
cd cgminer
sudo nano driver-bmsc.c
///Press ctrl+w then paste this...\\\memcpy((char *)&nonce, nonce_bin, sizeof(nonce_bin));
///Remove that and replace with this...\\\memcpy((char *)&nonce, nonce_bin, sizeof(nonce));
///Press ctrl+x to exit, y to save the file and then the Enter key to confirm...\\\To test, run the following...
sudo ./cgminer/cgminer --config /home/pi/cgminer.conf --bmsc-options 115200:20
You should see CGminer start mining, if you do, press CTRL+c to exit.
Then, I launch with the following line on bootup by typing...
sudo nano /etc/rc.local
Paste the line below befpore the Exit 0 line in there...nohup ./cgminer/cgminer --config /home/pi/cgminer.conf --bmsc-options 115200:20
This was (as im sure people realise) based heavily off of the adafruit PiMiner tutorial, but im putting it here in one single place so anyone such as me finds it easier to start mining with their Antminers.