To run the binaries on the gateway, they have to be compiled for the correct architecture toward the matching libraries.

Use existing binaries

If you have some binaries already compiled for the ARM eabi with your own toolchain or a "standard" one, the binaries may work partially. This will depend on the library's version used by the software. In any case, we do not recommend using software compiled with another toolchain for anything other than testing.

Build your software with the LORIX OS toolchain

We provide a complete toolchain with the LORIX OS to build your applications.

To build your application, you have multiple possibilities:

  1. Download and install the toolchain on your computer
  2. Build with the toolchain in the pre-configured Docker image
  3. Build within Yocto

We recommend building with the Docker image as it is fast and simple.

Build in docker

Prerequisites

  1. Install the Docker CE Engine
  2. Test you installation with the Hello world example

Build guide

Please refer to the LORIX OS SDK Docker Hub repository : https://hub.docker.com/r/wifx/lorix-os-sdk

Install the toolchain

The toolchain can only be installed and used on Linux systems

Install

  1. Download the toolchain in the Download area.
  2. Make the installer executable:

    chmod +x lorix-os-glibc-x86_64-wifx-image-os-cortexa5hf-neon-toolchain-1.0.0.sh
    CODE
  3. Install the toolchain:

    ./lorix-os-glibc-x86_64-wifx-image-os-cortexa5hf-neon-toolchain-1.0.0.sh -d /opt/lorix-os-sdk/1.0.0
    CODE

Use

  1. Load the toolchain environment:

    source /opt/lorix-os-sdk/1.0.0/environment-setup-cortexa5hf-neon-lorixos-linux-gnueabi
    CODE
  2. Build your software

    arm-lorixos-linux-gnueabi-gcc
    make
    CODE

Build within Yocto

You can download the whole LORIX OS build system and build your application within your own meta layer. This topic is covered in the Developer's guide.

Adapt the software for LORIX OS

We recommend also doing some adaptation so that the software integrates nicely with the LORIX OS existing tools:

Log with syslogd

Syslogd is available on the system and is already used by many applications. The LORIX Manager UI can display the logs from syslog, so the logs of your software will be directly visible to the users.

About shared libraries

If your software uses external libraries, you may want to link the shared libraries of the system dynamically. This is a good option to save space on the system but you have to take extra care regarding updates.

The LORIX OS can be updated easily, and will therefore be updated by the users frequently. Keep in mind that the libraries that you link too may get updated and that their API can therefore change. If you use shared libraries, you must ensure that you have a way to update your software on the gateway when it is deployed. Otherwise, you should statically link the libraries.