- Ubuntu 12.04 or newer
- Install required packages:
$ sudo apt-get install vim expect-dev build-essential cmake coreutils curl \
fakeroot sed git-core gawk unzip wget diffstat python python-jinja2 \
python-pip python-pyparsing python-pysqlite2 python-bs4 python-xmltodict \
bison flex chrpath libgmp3-dev libmpfr-dev libreadline6-dev libtool libxml2-dev \
libxml-libxml-perl m4 clang ninja-build autoconf pkg-config doxygen graphviz
- Cross-build toolchain(s) For Sierra Wireless platforms, toolchains are available at http://source.sierrawireless.com/
Legato uses repo as it is distributed as multiple repositories.
- Install git-repo:
(on Ubuntu > 14.04)
```
$ sudo apt-get install phablet-tools
```
OR
```
$ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo```
$ chmod a+x ~/bin/repo
```
- Clone the environment:
```
$ mkdir workspace
$ cd workspace
$ repo init -u git://github.com/legatoproject/manifest
$ repo sync
```
You can also clone a specific release:
```
$ repo init -u git://github.com/legatoproject/manifest -m legato/releases/16.04.1.xml
$ repo sync
```
To install the Legato framework on your development PC,
-
clone it from GitHub or untar a release archive into a directory
-
cd into that directory
-
run
make
-
To configure your bash shell's environment for the Legato application build tools, source
bin/configlegatoenv
:$ . bin/configlegatoenv
OR, run the interactive bash shell
bin/legs
:$ bin/legs
-
To build support for cross-build targets, run
make <target>
. For example, to enable support for the Sierra Wireless AR7xxx devices, runmake ar7
. Of course, each of these depends on the cross-build tool chain for that target, so ensure that you have the appropriate tool chain installed first.If your toolchain is installed somewhere other than under
/opt/swi
, ensure that the appropriate environment variable is set to the path of the directory containing your toolchain. For example, for WP85 devices,WP85_TOOLCHAIN_DIR
must be set to the path of the directory that contains the filearm-poky-linux-gnuabi-gcc
.Following is a list of supported cross-build targets:
Target | Description | Environment variable |
---|---|---|
ar7 | Sierra Wireless AR755x module | AR7_TOOLCHAIN_DIR |
ar758x | Sierra Wireless AR758x module | AR758X_TOOLCHAIN_DIR |
ar759x | Sierra Wireless AR759x module | AR759X_TOOLCHAIN_DIR |
ar86 | Sierra Wireless AR86xx module | AR86_TOOLCHAIN_DIR |
wp85 | Sierra Wireless WP85xx module | WP85_TOOLCHAIN_DIR |
raspi | Raspberry Pi | RASPI_TOOLCHAIN_DIR |
Once you have completed the first three installation steps above, you will find a set of
HTML documentation under the "Documentation" directory. Point your web browser at
Documentation/index.html
to view it.
To uninstall Legato from your development PC:
- Delete the directory you unzipped Legato under
- Revert any changes you may have made to your
.bashrc
, etc. to set upXXX_TOOLCHAIN_DIR
environment variables.
The top level directory structure is as follows:
./apps
- contains source code for apps.
./bin
- created by build system and populated with executable files that run on the development
host (the host that ran the build).
./build
- contains the results of a framework build. Will be created by the build system.
./build/tools
- contains tools that are built and then used by the build system to build
other things.
./build/<target>
- contains the output of a build for a specific target (e.g., ./build/wp85).
./cmake
- contains CMake scripts used by the build system.
./components
- contains components providing various services.
./framework
- contains the source code for the Legato framework itself.
./targetFiles
- contains files that are for installation on target devices.
./platformAdaptor
- contains components that are adapting Legato services to a platform.
./modules
- contains other repositories that are extending Legato.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.