legato-spm - command line tool (linux host)
- Oct 23, 2017
- Author: Sierra Wireless
Download embedded software packages from Sierra Wireless repository
legato-spm - command line tool (linux host)
Important: Download, installation and use of Legato is subject to the following Legato License and Open Source Licenses.
The legato-spm tool downloads and installs Legato Linux command line tools and embedded software packages for WP modules. It includes binaries and pre-built images (e.g., modem firmware, Toolchain, Legato Linux Distribution image and Legato Application Framework).
Installation
Ubuntu/Debian Distributions
Follow these instructions for Ubuntu/Debian distributions
Check your Ubuntu version
If you're running an Ubuntu version older than 14.10, follow these instructions to install Java 8lsb_release -d
If you're running a more recent Ubuntu version, please go to the next step
Installsudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-8-jre-headless
sudo update-alternatives --config java
legato-spmwget http://updatesite.sierrawireless.com/legato-spm/debian/legato-spm.list -O - | sudo tee /etc/apt/sources.list.d/legato-spm.list
wget http://updatesite.sierrawireless.com/legato-spm/debian/legato-spm.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install legato-spm
Alternate Distributions
- Install requirements for
legato-spmtool:openjdk-8-jre-headless- Install requirements to build Legato applications:
build-essential python-jinja2 ninja-build lib32z1 lib32ncurses5 zip autoconf automake- Download
legato-spmtool archive from this link- Extract the archive to the location of your choice (e.g.
unzip legato-spm*.zip -d $HOME/legato/spm)- Potentially add this location to your user's path (e.g.
echo 'export PATH=$HOME/legato/spm:$PATH' >> $HOME/.bashrc)
Usage
legato-spm [OPTION] ACTIONAt least one ACTION is expected:
--available, --install, --installed or --update-link
Options:
-a,--available List available packages -d,--destination <folder> location where packages are/will be installed Default location is /home/$USER/legato/packages -h,--help Display this message -i,--install Install packages -k,--sdk <sdk> When installing packages, specify the SDK type. Valid values are: - adk.64 - Application Development Kit, with native Linux 64 bits toolchain (Default for Linux 64 bits hosts) - adk.32 - Application Development Kit, with native Linux 32 bits toolchain (Default for Linux 32 bits hosts) - adk.docker - Application Development Kit, with Docker toolchain - pdk.64 - Platform Development Kit, with native Linux 64 bits toolchain - pdk.32 - Platform Development Kit, with native Linux 32 bits toolchain -l,--installed List installed packages -m,--module "<module>" When installing packages, specify a module. Valid values are: AR755X, AR865X, WP85XX, WP750X, FX30(WP85XX) -q,--quiet Hide progress messages -r,--release <release> When installing packages, specify a release. -s,--site <site> Use SITE as update site. Valid values are 'ALL', 'CURRENT' or a custom URL --update-link Update a 'latest' link to the latest installed SDK -u,--uninstall Uninstall packages (interactive package selection) -v,--verbose Display more informations --version Display legato-spm version -y,--yes Assume yes when confirmation is asked
Example commands
List latest available packages from online repository
legato-spm --available
List all available packages from online repository
legato-spm --available --site ALL
Install latest SDK version for WP85 module (and update legato.sdk.latest link)
legato-spm --install --module WP85XX --update-link
Install latest PDK version for WP85 module (including Legato Source code distribution package)
legato-spm --install --module WP85XX --sdk pdk.64
List installed packages
legato-spm --installed
Packages
These packages are installed to your ~/legato/packages directory:
legato.framework.* - Prebuilt Legato framework packages
legato.toolchain.* - GCC cross compiler Toolchains
legato.devimg.* - Images to upgrade Legato devices system software
legato.recovery.* - Tool to recover a bricked Legato device
legato.source.* - Legato source distribution package
Configure Legato Environment
Use this script to configure Legato build environment in your terminal:
source ~/legato/packages/legato.sdk.latest/resources/configlegatoenv
Your environment is now ready to build Legato apps, upgrade the device image, do device recovery, or access to Legato Source distribution archive.
Environment variables configured by this script are:
$LEGATO_ROOTRoot location for the Legato framework samples, libs, documentation and tools.
Example commands:
Open Legato documentationCreate and build Legato helloWorld applicationxdg-open $LEGATO_ROOT/Documentation/index.htmlcd /tmp
cp -a $LEGATO_ROOT/apps/sample/helloWorld .
cd helloWorld/
make wp85
$WP85_TOOLCHAIN_DIR
$WP75_TOOLCHAIN_DIRRoot location for cross compiler toolchain (required to build Legato apps)
Example commands:
Get gcc version$WP85_TOOLCHAIN_DIR/arm-poky-linux-gnueabi-gcc --version$LEGATO_DEVICE_IMAGERoot location for device image, usable to update software on a connected Legato device
Example commands:
Update software thanks to provided device imagefwupdate download $LEGATO_DEVICE_IMAGE/image.spk$LEGATO_RECOVERYPath to recovery tooling, able to perform recovery operations on a connected Legato device
Example commands:
Reset user partition on a Legato device (already switched in bootloader mode, and connected through USB)Download reference device image on a Legato device (already switched in bootloader mode, and connected through USB)$LEGATO_RECOVERY/swiflash -m WP85XX -r$LEGATO_RECOVERY/swiflash -m WP85XX -i $LEGATO_DEVICE_IMAGE/image.spk$LEGATO_SOURCEPath to Legato source distribution archive, compatible with current environment.
Note: This variable is set only if a Platform Development Kit is installed (cf--sdkoption above)
Example commands:
Check Legato source distribution archive locationls $LEGATO_SOURCE
Tags
Related items
- Legato Application Development Kit - Linux
Installation procedures for Linux host to develop Legato Applications.
- swiflash - command line tool (linux host)
Flash firmware into WP/AR module for recovery purpose