64-Bit Build Notes for OVMS Software

  • how much of this needs to go into the README file in the source area?
  • take sudo away from ovms user when done (get root password, it's not standard mtn password)
  • password is username
  • fix some of the telemetry error logging

3-June-2014

  • Stephen added the mount of the telemetry SAN disk. But, it wasn't happy until he changed owner on all the files (really just needed to be the files in the hiearchy, not old files) to match the uid of the new ovms owner/system. We were able to create files and directories here, but telemetry still complained Operation not permitted - I think this is related to the group manipulation that telemetry does, not just the file/dir creation.
  • Copied the build of the ovmsrtService over and restarted it.
  • Disabled the daemon and cron jobs on the old system.
lrwxrwxrwx. 1 root telemetry 80 Jun  3 13:55 current.ovms.internal_system_monitor.h5 -> /lbt/telemetry_data/ovms/2014/06/03/201406031357.ovms.internal_system_monitor.h5

Resuming the telemetry service
!! 06/03/14 19:29:19.723 ovmsTelemetry: error: [ERROR]: OvmsTelemtryI::telException::Failed to open file for stream internal_system_monitor because failed to create directory structure: Operation not permitted
OvmsTelemtryI::telException::Failed to open file for stream internal_system_monitor because failed to create directory structure: Operation not permitted
[ovms@ovms-test ~]$ ps -ef | grep ovms

uid=501(ovmstest) gid=100(users) groups=100(users),1000(telemetry)

[ovms@ovms-test ovms]$ id
uid=500(ovms) gid=500(ovms) groups=500(ovms),10(wheel),1000(telemetry) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

[ovms@ovms-test telemetry_data]$ ll
drwxrwxr-x. 3  501 telemetry   17 Jun  3 19:27 ovms
[ovms@ovms-test telemetry_data]$ cd ovms
[ovms@ovms-test ovms]$ ll
total 0
drwxrwxr-x. 6 501 telemetry 42 Jun  3 19:42 2014

30-May-2014

  • got the telemetry daemon to run as the ovms user by setting the "s" bit on the executable (not on the script, but on the executable)
  • had to turn off the selinux to get it to set the group correctly on the telemetry file (SH says selinux doesn't have power on nfs mounts, but we're using a local disk for testing)
    that fixed the failed to create directory structure complaint below
  • then, I got the file created fine, but it couldn't write anything to it; still complained a permissions problem, but I couldn't figure out what
    CB found that it was the disk buffer file it couldn't write - configured as disk_buffer_dir in the configuration file
[ovms@ovms-test Telemetry]$ ps -ef | grep ovms
ovms      2033     1  0 08:59 ?        00:00:00 ovmsTelemetry --daemon

Ctrl \ to abort the command.
Resuming the telemetry service
OvmsTelemtryI::telException::Failed to open file for stream internal_system_monitor because failed to create directory structure: Operation not permitted

[ovms@ovms-test 05]$ ll
total 12
drwxrwxr-x. 2 ovms telemetry 4096 May 15 15:44 15
drwxrwxr-x. 2 ovms telemetry 4096 May 28 13:50 28
drwxr-xr-x. 2 ovms ovms      4096 May 30 11:29 30

drwxrwxr-x. 5 ovms telemetry 4096 May 30 11:29 05
[ovms@ovms-test 2014]$ id
uid=500(ovms) gid=500(ovms) groups=500(ovms),10(wheel),1000(telemetry) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
[ovms@ovms-test 2014]$ groups
ovms wheel telemetry

27-28 May 2014

  • finally got all the m4 files working with the rpath specifiers so we don't have to set LD_LIBRARY_PATH for Ice, Boost, Qwt, Qt, even the OVMS library. That was a pain. It wasn't as much a problem on the old system because it found things in /usr and defaulted to that. The OVMS make structure had some bugs in using some of his configure flags.
    now things configure using just a qwt path in the configure command instead of separate commands for include and lib
  • why does the host variable come up x86_64-unknown-linux-gnu ?
  • changed the qwt installation to have lib64 instead of lib also (changed the installation, not the OVMS paths) consistent with the Ice installation
  • found the problem with the Boost test framework - the configure program is looking for the libs in a lib64 directory since the architecture is 64-bit; I moved the lib boost directory that SH installed things in to lib64
    also had to change the Makefile.am file in the test utilities area to find the boost library
  • the rpm.m4 is looking for a redhat directory in /usr/src= that's not there - what is that stuff?
    Stephen says :
That directory happens when you build a source RPM. I am not sure why

that would have been done on the old OVMS machine, but you should not rely on it being on any machine that is RPM based. See "rpmbuild" for more information about how that works, but it is usually not installed as you should only need it if you are building and distributing RPMs from a machine.
[ovmstest@ovms ~]$ ll /usr/src
total 24
drwxr-xr-x 2 root root 4096 Jan 26  2010 debug
drwxr-xr-x 3 root root 4096 Dec 23  2010 kernels
drwxr-xr-x 7 root root 4096 Dec 23  2010 redhat
[ovmstest@ovms ~]$ ll /usr/src/redhat
total 40
drwxr-xr-x 2 root root 4096 Sep  8  2010 BUILD
drwxr-xr-x 9 root root 4096 Dec 23  2010 RPMS
drwxr-xr-x 2 root root 4096 Sep  8  2010 SOURCES
drwxr-xr-x 2 root root 4096 Sep  8  2010 SPECS
drwxr-xr-x 2 root root 4096 Sep  8  2010 SRPMS

15-May-2014

  • found the linker in the powerpc cross compiler and changed the makefile in the RT area to use it and rebuilt.
    but ... it was the UEI installation that complained, not our real-time code - how do I change that to use the powerpc version??
  • Had to fix owner/group on /lbt/telemetry_data . It was owned by root, but writable by telemetry group. However, it needed to be owned by ovms. Made the telemetry_data and lower level ovms directory owned by ovms with telemetry as the group and it worked.
  • add /etc/profile.d files from old machine to set environment vars; I included Ice/Qwt to LD_LIBRARY_PATH in these files - but would like to make the make do it; files are ovms.sh and ovms.csh
  • add /lbt/UT/leap-seconds.list
  • tested with logging on in /lbt/ovms/current/etc/ovmsTelConfig.cfg - set to trace level and run manually, not through the service

Cannot connect to the UEI.

-- 05/15/14 09:14:35.167 ovmsTelemetry: [TCS_TELEMETRY]: Making a telemeter definer.
-- 05/15/14 09:14:35.167 ovmsTelemetry: [TCS_TELEMETRY]: Adding 9component definitions to the definer
-- 05/15/14 09:14:35.167 ovmsTelemetry: [DEBUG]: [TCS_TELEMETRY]: Add Telemetry sender objects to the ambassador...
ovmsTelemet!! 05/15/14 09:14:39.886 ovmsTelemetry: error: [ERROR]: OvmsTelemtryI::telException::Telemetry service is not connected to the LBT
ryClient -r
Checking connection with LBT data base...
Ctrl \ to abort the command.
Resuming the telemetry service
-- 05/15/14 09:14:43.700 ovmsTelemetry: [TCS_TELEMETRY]: Collector reset...
[INFO]: Resuming the OVMS telemetry interface
-- 05/15/14 09:14:43.736 ovmsTelemetry: [DEBUG]: Working thread Starts
-- 05/15/14 09:14:43.736 ovmsTelemetry: [DEBUG]: Initializing DataBroker...
-- 05/15/14 09:14:43.736 ovmsTelemetry: [DEBUG]: Running...
!! 05/15/14 09:14:43.736 ovmsTelemetry: error: [ERROR]: WorkerThread::Exception: [Error] DataBroker [::create()] Could not join multicast group for socket.
Telemetry Service is not connected to the LBT data baseTry resuming the telemetry service later.

this was a configuration problem. The IP address of this machine had to be set in the UEI config ( etc/ovmsUEI.cfg ):
UEI.Socket.InterfaceIP=192.168.53.60

Copied the rebuilt ovmsrtService executable to the ovms-uei box and restarted. Ran both telemetry systems. But, the files were corrupted. It didn't like both sets of data in one file. Copied the hdf files to my machine to post-process:

ovms.internal_system_monitor.h5
ovms-test.internal_system_monitor.h5
first try at running telem on new system - this is captured from both systems within a few minutes of ea other to see if the data is consistent
201405151614.ovms.internal_system_monitor.h5 corrupted, this was the above file on the new system, but then I changed the RT service and when it started writing to this file again it corrupted it.
201405152044.ovms.internal_system_monitor.h5 corrupted, this was the above file (ovms...) on the current system, but then I changed the RT service and when it started writing to this file again it corrupted it.
201405152234.ovms.internal_system_monitor.h5 new system, new RT service
201405152238.ovms.internal_system_monitor.h5 current system, new RT service
ovms.backtoold.h5 this is 201405152238 from the current system, after I went back to the old RT service - but this one is now corrupted.
ovms.backtooldRT-only.h5 deleted the 2238 file and let it create a new one after going back to the old RT service; this is ok
29-Apr-2014 from Stephen:
I installed CentOS 6.5 on the machine that used to be tel1. It is a 64-bit install.

I built the required runtimes for the OVMS to run on the machine, and stored them in "/lbt/ovms_runtime". I installed the version of telemetry that we have been using for 64-bit testing.

I then compiled and installed the version of OVMS out of trunk on that machine. The build seemed to go fine, once I figured out the switches. Those are documented in the shell script that is in the "~ovms/ovms" directory.

There is currently one user on the machine "ovms". The machine itself is currently addressable as "ovms-test.mountain.lbto.org" (192.168.53.60).

The machine has local disk mounted on "/lbt/telemetry_data/ovms" set to be writable by the "telemetry" group of which the "ovms" user is a member.

The SVN repository is https://svn.lbto.org/repos/ovms

[ovms@ovms-test config]$ grep grep libtool * control.in:Build-Depends: debhelper (>= 7), libc6-i686, locales, libasound2, python, bc,debhelper, gawk, autotools-dev, autoconf, libtool

Can almost follow the build procedure here: OVMS Installation and Administration Manual (509g501)
likewise -- should this document be updated to have new sections for LBTO specifics? Or should we just update it to be LBTO-specific?

And 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.

-rw-rw-r--. 1 ovms ovms 545220608 May 12 08:38 ueipac_toolkit-2.1.2.iso
[ovms@ovms-test uei-tools]$ sudo mkdir /mnt/uei-mount
[ovms@ovms-test uei-tools]$ sudo mount -t iso9660 -o loop ueipac_toolkit-2.1.2.iso /mnt/uei-mount
[ovms@ovms-test uei-tools]$ cd /mnt/uei-mount
[ovms@ovms-test uei-mount]$ ls
CHANGELOG      powerpc-604-linux-gnu-for-cygwin.tar.gz     README                      ueipac_toolkit-2.1.2.tgz
Documentation  powerpc-604-linux-gnu-for-linux.tar.gz      Source
INSTALL        powerpc-604-linux-gnu-for-linux-x64.tar.gz  UEIPAC Quickstart.pdf
install.sh     powerpc-604-linux-gnu-for-mingwin.zip       UEIPAC Software Manual.pdf
[ovms@ovms-test uei-mount]$ 

The install program complains on the link:
    /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

This was fixed with Stephen installing glibc.i686 because we needed a 32-bit linker. But, Stephen said the powerpc cross-compiler we have should supply a linker.
Topic revision: r14 - 13 Oct 2018, PetrKubanek
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