Building and Installing the OVMS Software

The SVN repository is

The make environment for OVMS is automake, after running the configure command with the appropriate options. There are bugs in the makefiles, so not all options will work. We found a lot of them during the rehost to 64-bit, but there are likely more.

The build procedure here: OVMS Installation and Administration Manual (509g501) is really close -- should this document be updated to have new sections for LBTO specifics? Or should we just update it to be LBTO-specific?

Build and Release

For maintenance changes and upgrades, to build in the existing OVMS environment, starting from the repository version, follow this example which builds a release called 0.5.0 :

  login to as ovms
  build in the /home/ovms directory and release to /lbt/ovms

  > svn checkout 0.5.0
  .....    (this takes a few minutes because the uei-tools has a dump of a CD in there)
  > cd 0.5.0
  >    edit the (AC_INIT line) file for the version you want - in this case "0.5.0"
  >    if you are modifying the real-time code, change the version number in ovmsrtService.c
     export INSROOT=/lbt/ovms/0.5.0
     export PATH=$INSROOT/bin:$PATH
     export MANPATH=$INSROOT/share/man:$MANPATH
     export CDPATH=.:$INSROOT
     export UEIPACROOT=/lbt/ovms_runtime/uei-tools/ueipac-2.1.2
     make -f Makefile.cvs
  > configure --prefix=$INSROOT \
                --with-Ice=/lbt/ovms_runtime/Ice-3.4.2 \
                --with-Qt=/lbt/ovms_runtime/qt-3.3.8 \
                --with-Qwt3=/lbt/ovms_runtime/qwt-5.0.2  \
                --with-boost=/lbt/ovms_runtime/boost_1_37_0 \
                --with-boost-unit-test-framework=gcc44-mt \
                --enable-Telemetry --enable-uei
  > make
  ...             a couple of minutes for the build
  > make install
  ...             a couple of minutes for other builds and installation
  > cd /lbt/ovms/
  > rm current; ln -s 0.5.0 current           update current link to new version
  > chmod u+s current/bin/ovmsTelemetry     to make the daemon run as the ovms user on reboot
  > ovmsTelemetryClient -x                    to stop the current daemon
  > sudo /etc/init.d/ovms-svc start            to start the new daemon

Check for errors all along the way - there should not be any except some associated with documentation if you build the docs target.

You can run the test cases if you like from the same place:
login to as ovms

> cd 0.5.0
> make check
...     builds test programs and executes

make  check-TESTS
make[3]: Entering directory `/home/ovms/0.8.0/test/Utils'
Running 1 test case...

*** No errors detected
PASS: ovmsendianTest
Running 2 test cases...

*** No errors detected
PASS: cmdParserTest
Running 1 test case...

*** No errors detected
PASS: TimeValTest
Running 4 test cases...

*** No errors detected
PASS: TelescopeComponentTest
Running 2 test cases...

*** No errors detected
PASS: AccelerometerTest
Running 1 test case...

*** No errors detected
PASS: ThresholdAlarmTest
Running 2 test cases...

*** No errors detected
PASS: SampleTest
Running 2 test cases...

*** No errors detected
PASS: ovmstypesTest
All 8 tests passed

If you need to update the real-time racktangle software, it should have built with the make command above. The executable and config file need to be copied to the ovms-uei machine:

  > login to the as root
  > cp -p ovmsrtService ovmsrtService.todaysdate    to save the current version for reversion

  > login to
  > cd 0.5.0/src/RTService/
  > scp -p ovmsrtService  
  > scp -p config.txt  
  > scp -p scalings.txt  

  > stop and restart the ovmsrtService on the ovms-uei (se
  > kill <pid>
  > ./ovmsrtService -f 1000 -d 12 -D 3.0 -H 0 -G 0 -P LBTI-noM1 -E 2 &

  Multicast IP Address is set to
  Operation Frequency is set to 1000.000000 Hz
  #Board is set to 11
  Estimation mode set to 1 (3 estimation channels)
  Mirror configuration successfully loaded!
  OPD-estimator successfully initialized! 
  ~ # Opening the datagram socket...OK.
  Adding multicast group...OK.
  Disabling the loopback...OK.
  Setting the local interface...OK
  Setting the socket priority...OK
  One shot mode: Setting task period to 1000000 ns (1 ms)

Building out a New OVMS System

If starting from scratch on a new OVMS system, you have to make sure the third party libraries are available and the SDK for the racktangle is installed and built.

Required 3rd Party Software - follow the instructions in the Installation and Administration Manual (509g501) for setting up NTP, the cross-compiler, and SDK.
  • boost
  • NTP
  • update to sysctl.conf to force igmp version 2.0
  • UEI SDK for cross-compiling the real-time software - from CD
    the CD is an iso file in SVN in the uei-tools directory this can be mounted in a CentOS environment with the commands:
    sudo mkdir /mnt/uei-mount
    sudo mount -t iso9660 -o loop ueipac_toolkit-2.1.2.iso /mnt/uei-mount

Required Setup for Telemetry Collection
  • /lbt/UT/leap-seconds.list file
  • Make sure the /tmp/telemetry_buf file does not exist, or is writeable by the ovms user; this directory is specified in the ovmsTelConfig.cfg file for the ovmsTelemetry daemon

Required System Configuration
  • environment variables are set from /etc/profile.d/ and ovms.csh files (captured in svn in scripts directory)
  • scripts/ovms-svc file can be copied to /etc/init.d/ for starting the daemon

Set up your configure flags based on where you put the third party products. Currently we use:
 > configure --prefix=$INSROOT \
                --with-Ice=/lbt/ovms_runtime/Ice-3.4.2 \
                --with-Qt=/lbt/ovms_runtime/qt-3.3.8 \
                --with-Qwt3=/lbt/ovms_runtime/qwt-5.0.2  \
                --with-boost=/lbt/ovms_runtime/boost_1_37_0 \
                --with-boost-unit-test-framework=gcc44-mt \
                --enable-Telemetry --enable-uei  

we should run a top-level make and then make install, otherwise the ovmsrtService does not get built, because there is no installation target for that.

Also see the README file from the source area - updated for LBTO. This file contains the dependencies and simple build/test notes.


OVMS telemetry is controlled via two processes - a server, run as a daemon on the ovms host and a client that stops/starts ( pause or resume ) collection. Daily cron jobs pause telemetry in the morning and restart it in the evening.

The collection library is built on the 64-bit ovms machine in /home/ovms/telemetry and copied to the /lbt/telemetry disk.
The TCS 64-bit compiler is newer than the ovms machine, so we cannot just bring over the built files.

> ssh

[ovms@ovms]$ cd telemetry/
[ovms@ovms]$ svn export       
    ... the telemetry library is built from the branches released versions, this example is version 4.0 
[ovms@ovms]$ cd 4.0
   ... edit the Makefile to not build the tests directory since we don't need it and it is not set up to build on the ovms machine
   ... edit the collection/Makefile to have the correct path to HDF and Boost and to output the full commands (or just copy from the last version)
[ovms@ovms]$ gmake
[ovms@ovms]$ cd /lbt/telemetry
[ovms@ovms]$ cp -pr /home/ovms/telemetry/4.0/deploy 4.0
[ovms@ovms]$ rm current
[ovms@ovms]$ ln -s 4.0 current
Topic revision: r11 - 25 Mar 2020, MatthieuBec
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback