Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 29-05-2014, 01:25   #211
Registered User

Join Date: May 2014
Posts: 8
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by boat_alexandra View Post
Also, try enabling texture compression and texture compression caching (both opengl options), then rebuilt the chart database. This should significantly speedup raster charts and reduce memory usage, and make it work well even from an sd card.
Enabled both options and saw another improvement in performance. Using glshim and texture compression, using opencpn on the cubieboard2 is very pleasant, with panning and zooming smooth. Also looks great on the 42' HDTV that I am using to test the cb2.

Though re-building the chart database with compression caching enabled seemed to take a very long time (about an hour for the NOAA raster charts that I downloaded to test opencpn and the cb2). Not sure if this process is normally lengthy or if this is just a reflection of the relatively-limited power of the cb2?
owlhead is offline   Reply With Quote
Old 29-05-2014, 20:33   #212
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by owlhead View Post
Enabled both options and saw another improvement in performance. Using glshim and texture compression, using opencpn on the cubieboard2 is very pleasant, with panning and zooming smooth. Also looks great on the 42' HDTV that I am using to test the cb2.

Though re-building the chart database with compression caching enabled seemed to take a very long time (about an hour for the NOAA raster charts that I downloaded to test opencpn and the cb2). Not sure if this process is normally lengthy or if this is just a reflection of the relatively-limited power of the cb2?
I rebuild the raster charts for all of USA in 2 hours on my chromebook. Some users reported over 8 hours (on really old computers) This is for 4.5GB of charts, the resulting cache is about 6GB.

The cubie truck using opengles uses a completely different compression format, so it probably takes a bit more cpu, and it's a slower machine. The cubie truck has dual processor, and if you look at top or statistics, it should be maxing out both processors. It does take a while and uses a bit of disk space, but you can just run it overnight.
seandepagnier is offline   Reply With Quote
Old 29-05-2014, 21:02   #213
Marine Service Provider
 
bdbcat's Avatar

Join Date: Mar 2008
Posts: 7,401
Re: OpenCPN Runs on Embedded ARM

Sean...

A recent commit may be of interest:
https://github.com/OpenCPN/OpenCPN/c...754d98cc103193

Dave
bdbcat is offline   Reply With Quote
Old 29-05-2014, 21:17   #214
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by bdbcat View Post
Sean...

A recent commit may be of interest:
https://github.com/OpenCPN/OpenCPN/c...754d98cc103193

Dave
Good idea. Sort based on ownship location. I didn't think of that. So you can build the cache until you see that all the charts processed up to X miles, and skip after that.

I think a similar approach for the enc parsing would be very useful. The current approach is very annoying to work with.
seandepagnier is offline   Reply With Quote
Old 02-06-2014, 10:12   #215
Registered User

Join Date: May 2014
Posts: 8
Re: OpenCPN Runs on Embedded ARM

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:

Code:
http://cubian.org/downloads/
-- 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):

Code:
http://cubian.org/2013/08/12/enlarge-cubian-rootfs-partition/
-- Install some additional packages:

Code:
$ sudo apt-get install glxgears build-essential git cmake libx11-dev
--

-- Download the forked version of the glshim:

Code:
$ 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:

Code:
$ 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:

Code:
$ 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:

Code:
$ 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:

Code:
$ git clone github.com/ssvb/glues.git
$ cd glues
$ cmake .
$ make
$ sudo cp libGLU.so.1 /usr/lib
-- Build an OpenCPN .deb package from source, then install the package:

Code:
$ git clone git://github.com/OpenCPN/OpenCPN.git
$ cd OpenCPN/
$ mkdir build
$ cd build
$ cmake ../
$ make
$ 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:

Code:
$ 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).
owlhead is offline   Reply With Quote
Old 02-06-2014, 11:29   #216
Registered User

Join Date: May 2014
Posts: 28
Re: OpenCPN Runs on Embedded ARM

Excellent! Thanks a million for that. I will try the next evenings to follow this recipe in general but for a Raspberry Pi

Sent from my GT-I9505 using Cruisers Sailing Forum mobile app
seglar-lulle is offline   Reply With Quote
Old 02-06-2014, 22:14   #217
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,417
Re: OpenCPN Runs on Embedded ARM

Quote:
Originally Posted by owlhead View Post
-- 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:

Code:
$ cd glshim/src/gl
$ mv gl.h gl.h.old
$ wget https://raw.githubusercontent.com/lunixbochs/glshim/master/src/gl/gl.h
No doubt this step would confuse a lot of people, myself included. I'm using cubian, and somehow it all worked for me two months ago. Looks like just last week ryan made this small change.. I just cherry-picked it into my fork to eliminate this step.
Quote:
-- Build glshim library and copy the results to a suitable location:

Code:
$ cd ../../glshim
$ cmake .
$ make GL
$ sudo cp glshim/lib/libGL.so.1 /usr/lib
$ sudo cp -r glshim/include/GLES/ /usr/include/
Perhaps it is better to install to /usr/local to avoid needing to set LD_LIBRARY_PATH explicitly below?
Quote:
-- Build an OpenCPN .deb package from source, then install the package:
Is there something wrong with make install? It should do the same like make package, but perhaps it was installing to the wrong prefix? I think that's fixed now in git.

Quote:
Originally Posted by seglar-lulle View Post
Excellent! Thanks a million for that. I will try the next evenings to follow this recipe in general but for a Raspberry Pi

Sent from my GT-I9505 using Cruisers Sailing Forum mobile app
Ok, keep in mind building glshim is slightly different on the raspberry pi, the notes are in the README.md file. You should still be able to verify it's working using glxgears (300 fps or better)
seandepagnier is offline   Reply With Quote
Old 03-06-2014, 11:29   #218
Registered User

Join Date: Mar 2014
Location: Tyne and Wear
Boat: Westerly Tempest
Posts: 15
Re: OpenCPN Runs on Embedded ARM

Thanks Owlhead and Sean for the postings. For some reason I can't get Cubian to run on my CT, it gets stuck in a boot loop and the screen is garbled (HDMI). I tried it on Qbee-X and the opengl is running after lauching from the terminal and I can move the map around smoothly and quickly but I've got a problem with the install. I think its due to the file structure. Version is 3.3.1731. When I zoom right in some of the colours go grey. Heres the read out from the terminal window. The (opencpn:1288) bit keeps repeating.

Code:
cubie@Qbee-X:~$ LD_LIBRARY_PATH=/usr/lib opencpn

(opencpn:1288): Gdk-CRITICAL **: IA__gdk_colormap_new: assertion `GDK_IS_VISUAL (visual)' failed

(opencpn:1288): Gtk-CRITICAL **: IA__gtk_widget_set_colormap: assertion `GDK_IS_COLORMAP (colormap)' failed

(opencpn:1288): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
libGL: built on Jun  2 2014 22:05:38
glXGetProcAddress: glGenFramebuffers not found.
glXGetProcAddress: glGenFramebuffers not found.
glXGetProcAddress: glGenFramebuffers not found.
glXGetProcAddress: glGetCompressedTexImage not found.

(opencpn:1288): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 13

(opencpn:1288): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -5 and height 13
I'll have another go at installing it and spend a bit more time with it and report back.
stu3284 is offline   Reply With Quote
Old 03-06-2014, 12:10   #219
Registered User
 
moorsb's Avatar

Join Date: Jun 2014
Location: Burleson, Tx
Boat: Stamas Tarpon 250
Posts: 7
Re: OpenCPN Runs on Embedded ARM

I am wondering if this will run the software.

IboxA20

seem to be a cubie clone with a case.
moorsb is offline   Reply With Quote
Old 03-06-2014, 13:47   #220
Registered User

Join Date: Mar 2014
Location: Tyne and Wear
Boat: Westerly Tempest
Posts: 15
Re: OpenCPN Runs on Embedded ARM

I take it your the person who is selling it by your user name. If its similar to the cubieboard 2 why not try it.

Stu
stu3284 is offline   Reply With Quote
Old 03-06-2014, 14:36   #221
Registered User

Join Date: Mar 2014
Location: Tyne and Wear
Boat: Westerly Tempest
Posts: 15
Re: OpenCPN Runs on Embedded ARM

I got Cubian on the CT working by pulling out the HDMI lead until it booted and then plugged it back in. Followed the instructions and it runs worse than the Qbee-Z install. I'm getting the same errors on both installs.
Code:
[ 15%] Building C object CMakeFiles/S57ENC.dir/src/tri.c.o
/root/OpenCPN/src/tri.c: In function ‘do_triangulate_polygon’:
/root/OpenCPN/src/tri.c:689:7: warning: this decimal constant is unsigned only in ISO C90 [enabled by default]

[ 41%] Building CXX object CMakeFiles/opencpn.dir/src/chcanv.cpp.o
/root/OpenCPN/src/chcanv.cpp: In member function ‘void ChartCanvas::OnKeyDown(wxKeyEvent&)’:
/root/OpenCPN/src/chcanv.cpp:2048:15: warning: case label value is less than minimum value for type [enabled by default]

[ 56%] Building CXX object CMakeFiles/opencpn.dir/src/TCDS_Ascii_Harmonic.cpp.o

/root/OpenCPN/src/TCDS_Ascii_Harmonic.cpp: In member function ‘TC_Error_Code TCDS_Ascii_Harmonic::LoadHarmonicData(IDX_entry*)’:
/root/OpenCPN/src/TCDS_Ascii_Harmonic.cpp:431:106: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

[ 72%] Building CXX object plugins/grib_pi/CMakeFiles/grib_pi.dir/src/GribOverlayFactory.cpp.o
/root/OpenCPN/plugins/grib_pi/src/GribOverlayFactory.cpp: In member function ‘void GRIBOverlayFactory::RenderGribNumbers(int, GribRecord**, PlugIn_ViewPort*)’:
/root/OpenCPN/plugins/grib_pi/src/GribOverlayFactory.cpp:1008:70: warning: unused variable ‘a’ [-Wunused-variable]

[ 73%] Building CXX object plugins/grib_pi/CMakeFiles/grib_pi.dir/src/GribSettingsDialog.cpp.o
/root/OpenCPN/plugins/grib_pi/src/GribSettingsDialog.cpp:57:107: warning: missing braces around initializer for ‘const wxString [5]’ [-Wmissing-braces]
/root/OpenCPN/plugins/grib_pi/src/GribSettingsDialog.cpp:57:107: warning: missing braces around initializer for ‘const wxString [5]’ [-Wmissing-braces]
/root/OpenCPN/plugins/grib_pi/src/GribSettingsDialog.cpp:57:107: warning: missing braces around initializer for ‘const wxString [5]’ [-Wmissing-braces]

[ 77%] Building CXX object plugins/grib_pi/CMakeFiles/grib_pi.dir/__/__/src/wxJSON/jsonval.cpp.o
/root/OpenCPN/src/wxJSON/jsonval.cpp: In member function ‘wxJSONRefData* wxJSONValue::COW()’:
/root/OpenCPN/src/wxJSON/jsonval.cpp:3057:20: warning: variable ‘data’ set but not used [-Wunused-but-set-variable]
/root/OpenCPN/src/wxJSON/jsonval.cpp: At global scope:
/root/OpenCPN/src/wxJSON/jsonval.cpp:35:22: warning: ‘traceMask’ defined but not used [-Wunused-variable]
/root/OpenCPN/src/wxJSON/jsonval.cpp:36:22: warning: ‘compareTraceMask’ defined but not used [-Wunused-variable]
/root/OpenCPN/src/wxJSON/jsonval.cpp:37:22: warning: ‘cowTraceMask’ defined but not used [-Wunused-variable]
[ 77%] Building CXX object plugins/grib_pi/CMakeFiles/grib_pi.dir/__/__/src/wxJSON/jsonreader.cpp.o
/root/OpenCPN/src/wxJSON/jsonreader.cpp:174:22: warning: ‘traceMask’ defined but not used [-Wunused-variable]
/root/OpenCPN/src/wxJSON/jsonreader.cpp:175:22: warning: ‘storeTraceMask’ defined but not used [-Wunused-variable]
[ 77%] Building CXX object plugins/grib_pi/CMakeFiles/grib_pi.dir/__/__/src/wxJSON/jsonwriter.cpp.o
/root/OpenCPN/src/wxJSON/jsonwriter.cpp:23:22: warning: ‘writerTraceMask’ defined but not used [-Wunused-variable]

[ 88%] Building CXX object plugins/dashboard_pi/CMakeFiles/dashboard_pi.dir/src/baro_history.cpp.o
/root/OpenCPN/plugins/dashboard_pi/src/baro_history.cpp: In member function ‘void DashboardInstrument_BaroHistory::DrawWindSpeedScale(wxGCDC*)’:
/root/OpenCPN/plugins/dashboard_pi/src/baro_history.cpp:155:10: warning: unused variable ‘val1’ [-Wunused-variable]
/root/OpenCPN/plugins/dashboard_pi/src/baro_history.cpp:156:10: warning: unused variable ‘WindSpdScale’ [-Wunused-variable]
/root/OpenCPN/plugins/dashboard_pi/src/baro_history.cpp: In member function ‘void DashboardInstrument_BaroHistory::DrawForeground(wxGCDC*)’:
/root/OpenCPN/plugins/dashboard_pi/src/baro_history.cpp:259:10: warning: unused variable ‘dir’ [-Wunused-variable]
[ 88%] Building CXX object plugins/dashboard_pi/CMakeFiles/dashboard_pi.dir/src/from_ownship.cpp.o
[ 88%] Building CXX object plugins/dashboard_pi/CMakeFiles/dashboard_pi.dir/src/wxJSON/jsonval.cpp.o
/root/OpenCPN/plugins/dashboard_pi/src/wxJSON/jsonval.cpp: In member function ‘wxJSONRefData* wxJSONValue::COW()’:
/root/OpenCPN/plugins/dashboard_pi/src/wxJSON/jsonval.cpp:3051:20: warning: variable ‘data’ set but not used [-Wunused-but-set-variable]
/root/OpenCPN/plugins/dashboard_pi/src/wxJSON/jsonval.cpp: At global scope:
/root/OpenCPN/plugins/dashboard_pi/src/wxJSON/jsonval.cpp:31:22: warning: ‘traceMask’ defined but not used [-Wunused-variable]
/root/OpenCPN/plugins/dashboard_pi/src/wxJSON/jsonval.cpp:32:22: warning: ‘compareTraceMask’ defined but not used [-Wunused-variable]
/root/OpenCPN/plugins/dashboard_pi/src/wxJSON/jsonval.cpp:33:22: warning: ‘cowTraceMask’ defined but not used [-Wunused-variable]
[ 90%] Building CXX object plugins/dashboard_pi/CMakeFiles/dashboard_pi.dir/src/wxJSON/jsonreader.cpp.o
/root/OpenCPN/plugins/dashboard_pi/src/wxJSON/jsonreader.cpp:170:22: warning: ‘traceMask’ defined but not used [-Wunused-variable]
/root/OpenCPN/plugins/dashboard_pi/src/wxJSON/jsonreader.cpp:171:22: warning: ‘storeTraceMask’ defined but not used [-Wunused-variable]
[ 90%]
I'll try again with an older build.
stu3284 is offline   Reply With Quote
Old 03-06-2014, 17:27   #222
Registered User

Join Date: Feb 2010
Location: Tierra del Fuego
Boat: Phantom 19
Posts: 6,211
Re: OpenCPN Runs on Embedded ARM

Stu...
I don't see any error in the part of the build log you posted, just warnings (harmless)

Pavel
nohal is offline   Reply With Quote
Old 03-06-2014, 21:02   #223
Registered User

Join Date: Mar 2014
Location: Tyne and Wear
Boat: Westerly Tempest
Posts: 15
Re: OpenCPN Runs on Embedded ARM

Thanks for the reply Pavel.

Stu
stu3284 is offline   Reply With Quote
Old 04-06-2014, 04:17   #224
Registered User
 
moorsb's Avatar

Join Date: Jun 2014
Location: Burleson, Tx
Boat: Stamas Tarpon 250
Posts: 7
Re: OpenCPN Runs on Embedded ARM

I bought several of these boards, hoping to get them to work with gnuradio. I guess my linux skills are lacking. The learning curve is huge. I have downloaded many distro and it seems that the A20 cpu and graphic are not that popular. It does seem to run cubieboard A20 images. I keep running into issue when I try to build from source which each distro. I will try it, what SD distro should I start off with?
moorsb is offline   Reply With Quote
Old 04-06-2014, 08:59   #225
Registered User
 
moorsb's Avatar

Join Date: Jun 2014
Location: Burleson, Tx
Boat: Stamas Tarpon 250
Posts: 7
Re: OpenCPN Runs on Embedded ARM

I am starting with fresh distro Desktop

I get an error message that it can not find glxgears

sudo apt-get install glxgears build-essential git cmake libx11-dev

I am using a cubieboard A20 clone
The network connection is ok as I am posting this from the sbc.
moorsb is offline   Reply With Quote
Reply

Tags
opencpn


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open CPN and Google Earth bgrimwade OpenCPN 19 09-12-2011 15:32
OpenCPN Version 2.5 Release bdbcat OpenCPN 86 02-09-2011 18:14
OpenCPN Stops Running BobLarkin OpenCPN 2 30-08-2011 23:38
Route Properties, Missing Functions James Baines OpenCPN 13 13-07-2011 04:31

Advertise Here


All times are GMT -7. The time now is 04:46.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.