I received a few requests about how I went about running openCPN with HW accelaration on the cubieboard2. The thread contains most of the information, but it might be useful to have it all in a single
place specific to the CB2. Below are notes that I took of the process. I mostly recorded this as I went along, but some of it was written down after-the-fact: if something is unclear, let me know and I can try to fill in the details.
I own a cubieboard2: I am not sure if the cubietruck is exactly the same, but hopefully enough is common that this still works for you.
-- Start with a fresh install of the desktop
version of cubian on an SD card, from here:
-- The stock cubian image has a small amount of free space on the root filesystem. You need to follow the instructions here to expand (I just told it to use the entire amount of my 16GB card):
-- Install some additional packages:
$ sudo apt-get install glxgears build-essential git cmake libx11-dev
-- Download the forked version of the glshim:
$ git clone https://github.com/seandepagnier/glshim.git
-- Cubian had a different naming scheme for some of the library locations. The forked version of the gl.h header file could not find that location, but the mainline one did, so you just need to download that one:
$ cd glshim/src/gl
$ mv gl.h gl.h.old
$ wget https://raw.githubusercontent.com/lunixbochs/glshim/master/src/gl/gl.h
-- Build glshim library and copy the results to a suitable location:
$ cd ../../glshim
$ cmake .
$ make GL
$ sudo cp glshim/lib/libGL.so.1 /usr/lib
$ sudo cp -r glshim/include/GLES/ /usr/include/
-- Install some additional packages to build OpenCPN:
$ sudo apt-get install libgtk2.0-dev gettext git-core cmake gpsd gpsd-clients libgps-dev build-essential wx-common libwxgtk2.8-dev libglu1-mesa-dev libgtk2.0-dev wx2.8-headers libbz2-dev libtinyxml-dev libportaudio2 portaudio19-dev
-- Build and install glues from source:
$ git clone github.com/ssvb/glues.git
$ cd glues
$ cmake .
$ sudo cp libGLU.so.1 /usr/lib
-- Build an OpenCPN .deb package from source, then install the package:
$ git clone git://github.com/OpenCPN/OpenCPN.git
$ cd OpenCPN/
$ mkdir build
$ cd build
$ cmake ../
$ make package
$ sudo dpkg -i opencpn_3.3.1715-1_armhf.deb
-- Run openCPN, making sure to specify that it should look into the location where you copied glshim and glues libraries:
$ LD_LIBRARY_PATH=/usr/lib opencpn
-- Within OpenCPN, enable opengl, texture compression, and the texture compression cache. Then rebuild
the chart database (took a long time on my cubieboard2).