Build and Install

The instructions below cover installation for either a PC/X64 running Linux (e.g. Ubuntu) or the ARM-based DragonBoard 410c running Linaro Linux. Follow the instructions appropriate for your platform.

Once installed you can test on either platform using Eclipse OM2M as described on the next page.

PC/x64 – Clean Install

This procedure includes rebuilding the C++ files using Code Synthesis XSD from the source .XSD files. While this part is not necessary to just install the library it would be needed for developers who want to make changes to the library.

# Git clone the repo to copy it to your local machine
$ git clone https://atis.codebasehq.com/atis-os-iot/atis-os-iot.git

$ cd atis-os-iot
# (start in the top level directory of the repo)

# Make sure you are in the ‘master’ branch
# The master branch should contain a working version of the software
$ git checkout master

# Install codesyntesis XSD tools from a .rpm or .deb package available from:
# http://www.codesynthesis.com/products/xsd/download.xhtml


# Install the dependencies
$ sudo apt-get update
$ sudo apt-get install libxerces-c-dev
$ sudo apt-get install libcurl4-openssl-dev

# Install a version of libssl-dev which is compatible
# with libcurl. You will also need to do this if you 
# are upgrading from a version of OS-IoT which doesn't 
# support security.
#
# Check the suggested libssl-dev packages in the libcurl 
# package with the command:
$ apt-cache depends libcurl4-openssl-dev | grep libssl
# Inspect the output of the above command. If there is
# an openssl-dev listed with a particular version number
# (e.g. libssl1.0-dev) then use this in the next command. 
# If the only package listed doesn't have a version 
# number (e.g. libssl-dev) then use this in the next 
# command.
$ sudo apt-get install <package found above - e.g. libssl1.0-dev>

# Return to the atis-os-iot directory if you have navigated
# away from it
# If you wish to rebuild the .cxx and .hxx files using
# CodeSynthesis issue the following three commands. If you
# prefer to keep the .cxx and .hxx files included in the 
# repo skip these three commands and go to the next
# step. (The ability to rebuild these files is primarily of
# interest to library developers. If you just want to use 
# the library unmodified we suggest you skip this step.)
$ cd cdt
$ ./build_command
$ cd ..

# Make the demo application
$ make

# Run the output
$ ./osiotcmd

DragonBoard – Clean Install

Command line steps to install on the Dragonboard 410C. These should also work on other small form factor boards running Debian Linux such as the RaspberryPi.

Tested on the Linaro Debian Stretch distro on Dragonboard (linaro-alip). It is reccomended to use the most recent available version of the Linaro OS.

# Git clone the repo to copy it to your local machine
$ git clone https://atis.codebasehq.com/atis-os-iot/atis-os-iot.git
$ cd atis-os-iot
# (start in the top level directory of the repo)

# Make sure you are in the ‘master’ branch
# The master branch should contain a working version of the software
$ git checkout master

# get the Codesynthesis headers
$ wget www.codesynthesis.com/download/xsd/4.0/linux-gnu/x86_64/xsd-4.0.0-x86_64-linux-gnu.tar.bz2

$ tar xvfj xsd-4.0.0-x86_64-linux-gnu.tar.bz2
$ cd xsd-4.0.0-x86_64-linux-gnu/libxsd/
$ sudo cp -r xsd /usr/local/include
# copy the headers where they can be found
# [default gcc include paths given by : $ gcc -xc++ -E -v - ]

# install the dependencies
$ sudo apt-get update
$ sudo apt-get install libxerces-c-dev
$ sudo apt-get install libcurl4-openssl-dev

# Install a version of libssl-dev which is compatible
# with libcurl. You will also need to do this if you 
# are upgrading from a version of OS-IoT which doesn't 
# support security.
#
# Check the suggested libssl-dev packages in the libcurl 
# package with the command:
$ apt-cache depends libcurl4-openssl-dev | grep libssl
# Inspect the output of the above command. If there is
# an openssl-dev listed with a particular version number
# (e.g. libssl1.0-dev) then use this in the next command. 
# If the only package listed doesn't have a version 
# number (e.g. libssl-dev) then use this in the next 
# command.
$ sudo apt-get install <package found above - e.g. libssl1.0-dev>

# back to the top level
$ cd <YOUR PATH>/atis-os-iot
$ make

# Run the output
$ ./osiotcmd

 

Update Installation (either platform)

These instructions apply if you wish to update an existing, working, installation.

# Enter the project directory
$ cd atis-os-iot

# Update the git repository from the server
$ git pull

# Abandon any local changes on your working version
$ git checkout -- .

# Make sure you are on the master branch
$ git checkout master

# Pull changes to the master branch. This
# will update your files.
$ git pull

# If you are upgrading from a version that didn't support
# security then install the compatible
# libssl-dev using the instructions in the relevant part
# of the "clean install guide".

# Clean old-build data
# You can ignore any errors reporting missing files for this step
$ make vclean

# Build new version
$ make

# Run the output
$ ./osiotcmd