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.

Linux PC/x64 – Clean Install

This procedure includes installing the full the Code Synthesis XSD tool which can be used to autogenerate some C++ files in the library. While this is not necessary to just build 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
$ git checkout master

# 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>

# Download the CodeSythesis package as a 
# .rpm or .deb file and install. Packages
# can be downloaded from:
# http://www.codesynthesis.com/products/xsd/download.xhtml 
# (For Ubuntu download the .deb package and 
# install as shown below: 
# $ sudo dpkg -i </path/to/deb/file> 
# $ sudo apt-get install -f 
# )

# Return to the atis-os-iot directory 
# if you have navigated away from it.
# 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
$ make vclean

# Build new version
$ make

# Run the output
$ ./osiotcmd