Install/Remove Legato

The following directions will guide you to set up your Linux development machine, download the Legato AF and install a build on your Target Device using the command line.

Install Linux Packages

$ sudo apt-get install -y build-essential \
                          python python-jinja2 python-pkg-resources python-git \
                          cmake git libsdl-dev diffstat texinfo gawk chrpath \
                          wget cpio bash ninja-build bc unzip libxml2-utils gcovr \
                          libcurl4-gnutls-dev zlib1g-dev libbz2-dev \
                          bsdiff libssl-dev autoconf automake iputils-ping

Optional packages: vim (or any text editor), zsh (command interpreter for shell scripting), openjdk-8-jdk (for Java support) doxygen graphviz (for doc generation) TLA toolbox (Formal specification & verification).

Install a Toolchain

If you are building the Legato AF for a SWI WP Series Device you will need to download and install a Toolchain which includes GCC and other tools needed to make a build for your Target Device.

If you are building Legato AF directly on a Raspberry Pi then no toolchain is needed and you only need to install the native GCC. If you are cross-compiling the Legato AF on a Linux machine for use on a Raspberry Pi Device, then you will need to install Raspberry Pi's toolchain.

SWI WP Series Device Toolchain

Each target maintains it's own unique toolchain. Visit to download and install the toolchain for your target.

Module Download Site
WPX5XX WPX5XX Download Page
WP76XX WP76XX Firmware Download Page
All AR Modules See your FAE to download and install the toolchain for your module

Once you've downloaded the SWI toolchain installer you may need to grant execute rights before it can be run.

$ chmod +x <toolchain>

Upon running the toolchain installer you will be prompted where you want to install the tools.


/opt/swi/y17-ext-<legato version> 

When prompted, answer "Y" to proceed with the install.

$ ./
Enter target directory for SDK (default: /opt/swi/y17-ext): /opt/swi/y17-ext-1610
You are about to install the SDK to "/opt/swi/y17-ext-1610". Proceed[Y/n]?Y
Extracting SDK...done
Setting it up...done
SDK has been successfully set up and is ready to be used.

Create a soft link from the versioned folder to /y17-ext (delete the existing soft link if needed)

$ cd /opt/swi
$ rm y-17-ext
$ ln -s y17-ext-1610 y17-ext
Each version of Legato requires its own toolchain. To support multiple versions on one host:
  • create a folder for each version
  • update the softlink "/opt/swi/y17-ext" to point to the legato version that are currently working with. To change versions update the soft link to point to the new Legato version you are working with.

Raspberry Pi Toolchain

Raspberry Pi platforms (clone from the GitHub repo):

git clone

Copy the /tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian directory to a shared location on your Linux Development Host.

Add /tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin to your $PATH

export PATH=$PATH:${PWD}/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
The 64bit Raspberry Pi toolchain is located: /tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64

Download the Source Code

To start with building Legato you first need to download or clone the source.

Download Tarball

Visit our Release Info page to download the Legato AF.

Download the Tarball and extract it to a directory on your local machine

$ mkdir legato-demo
$ mv ~/Downloads/legato-16.10.1.tar.bz2 legato-demo/
$ cd legato-demo/
$ tar -xvf legato-16.10.1.tar.bz2

Clone from GitHub

The GitHub Legato Project provides all up-to-date code development as well as official releases. To clone the latest official release clone the last release tag (e.g., -m legato/releases/16.10.1.xml), and not the master branch.

See the Releases page to list the supported releases.

Install repo:

On Ubuntu >= 16.04

$ sudo apt-get install repo

On < 16.04

$ sudo apt-get install phablet-tools


$ wget -O ~/bin/repo
$ chmod a+x ~/bin/repo

Clone a specific release:

$ mkdir workspace
$ cd workspace
$ repo init -u git:// -m legato/releases/17.07.1.xml
$ repo sync

Clone from master (latest in progress development):

$ mkdir workspace
$ cd workspace
$ repo init -u git://
$ repo sync

Directory Structure Overview

Directory Structure on your Host Machine:

Directory Description
apps Source Code for Apps
bin Created by build system and populated with executable files run on the development host that ran the build. Contains files like mksys, app and update.
build Results of a framework build. Includes build/tools and build/target.
cmake CMake scripts used by the build system.
components Platform-independent components that are used in apps.
framework Source code for the Legato framework.
targetFiles Files needed for installation on target devices.
targets All the .sinc files that are needs to build modules
platformAdaptor Components specific to specific platforms. **covered under other licenses
modules Other repositories that extend Legato.
3rdParty Third-party code that is integrated with Legato. **covered under other licenses

Tools and Make

You are now ready to work with your host and your target device.

Section Description
Tools Tools used for building/configuring/diagnosing your target or host
Make How to Make a build and Update a Target Device
Configure Sierra Wireless Module How to setup and configure a Target Device
WP Module Software Tools to install and build the Legato AF with Developer Studio on either Windows or Linux.
Sierra Wireless WP Series Software includes free development tools for use with the WP Series Devices. These tools will install an Eclipse based IDE with the toolchain, Legato AF pre-built, Legato Linux Distro and can be used either with Windows or Linux.

Uninstall Legato

To uninstall Legato from your Linux development machine, delete the directory where you extracted Legato.

Remove the /opt/swi directory and all of it contents.

Revert any changes you may have made to your .bashrc, .profile etc. that were used to set up xxxxx_TOOLCHAIN_DIR and related build environment variables.

Remove any packages (that are no longer needed) that were installed in Install Linux Packages .