Please forgive if this has been posted here before.
I admit it is a drive by post, I did not read the whole thread.
I did search, I know similar exists, I blunder on anyways!
How to build cgminer on a KnCMiner Neptune while it hashes
My directory tree is as follows
/config
/config/opkg.cache
/config/other
/config/other/cgminer
/config/other/jansson-2.5
If ya dosent likes it season to taste...
First you need a build environment.
I save the downloaded opkg files for faster reconfig.
(better ways exist but I have not implimented yet, I just wait for reinstall of opkg files)
mkdir /config/opkg.cache
cat >/etc/opkg/feeds.conf <<\EOF
src/gz noarch http://feeds.angstrom-distribution.org/feeds/v2013.06/ipk/eglibc/all/
src/gz base http://feeds.angstrom-distribution.org/feeds/v2013.06/ipk/eglibc/armv7ahf-vfp-neon/base/
src/gz beaglebone http://feeds.angstrom-distribution.org/feeds/v2013.06/ipk/eglibc/armv7ahf-vfp-neon/machine/beaglebone/
EOF
opkg --cache /config/opkg.cache install update-alternatives
opkg --cache /config/opkg.cache install automake autoconf make gcc cpp binutils git less pkgconfig-dev ncurses-dev libtool nano bash i2c-tools-dev
while ! opkg --cache /config/opkg.cache install libcurl-dev; do true; done
ln -s /usr/bin/arm-angstrom-linux-gnueabi-gcc /usr/bin/gcc
ln -s /usr/bin/arm-angstrom-linux-gnueabi-ar /usr/bin/ar
ln -s /usr/bin/arm-angstrom-linux-gnueabi-nm /usr/bin/nm
At this point most compile stuff kinda works.
You can skip the symlinks if you want to modify every Makefile and ./config you will probably ever use
You may need more symlinks to default program names for other build projects.
The following scripts do not assume symlinks exist
I struggled with errors compiling the jansson-2.5 that comes with the KnC cgminer git.
Operator error is suspected!
I forced my intentions
mkdir /config/other
cd /config/other
curl http://www.digip.org/jansson/releases/jansson-2.5.tar.bz2 | tar -xjvp
cd /config/other/jansson-2.5
./configure --prefix=/usr CC=arm-angstrom-linux-gnueabi-gcc NM=arm-angstrom-linux-gnueabi-nm
make install && ldconfig
cd /config/other
next need to grab bleeding edge cgminer code from KnC git
cd /config/other
git clone git://github.com/KnCMiner/cgminer
cd cgminer
Skip this part if my jansson-2.5 challenge was operator error
cd /config/other/cgminer/compat
mv jansson-2.5 jansson-2.5.orig
cp -r /config/other/jansson-2.5 .
cd ..
finally try and build cgminer
autoconf
./configure CC=arm-angstrom-linux-gnueabi-gcc NM=arm-angstrom-linux-gnueabi-nm AR=arm-angstrom-linux-gnueabi-ar --enable-knc
make cgminer
make api-example
ls -alrt
If everything worked you should see new 'cgminer' and 'api-example' at the bottom of dir list.
You can run it in place or copy it over the original.
The following will preserve the original as /usr/bin/cgminer.orig and replace existing with new and run it.
This is also needed after reboot to run new cgminer
/etc/init.d/cgminer.sh stop
mv /usr/bin/cgminer /usr/bin/cgminer.orig
cp /config/other/cgminer/cgminer /usr/bin
/etc/init.d/cgminer.sh restart
At this point IF IT WORKS it is running
wait a few for cgminer to start then ....
'screen -r'
same as always
N'Joy!
HUGE disclaimer, above scripts are from memory, cut, and paste.
There may exist errors, I am not gonna rerun it and see until I have too!
YMMV
EDIT
The build stuff is swiped from the README.ASIC in bfgminer.
I did not figure out any of it.