All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Yocto Linux

You'll need to complete these steps if you need to set up your board for Yocto.

The Yocto Project is an open source collaboration project that provides templates, tools and methods to help you create custom Linux-based systems for embedded products regardless of the hardware architecture.

Legato is compatible with Yocto 1.4.1.

Yocto Linux Directories
Pre-built Yocto Image
Rebuild Yocto Image
Flash Yocto Image
Custom Yocto Image

Yocto Linux Directories

Untar the file Legato-Dist-Source-mdm9x15-14.04.tar.bz2 to a directory:

$ cd <some directory>
$ tar xvjf Legato-Linux-Dist-mdm9x15-14.04.tar.bz2

These file/directories will be extracted:

  • linux-yocto-3.4.git - Linux kernel - 14.1.0.Beta.rc2
  • Legato-Yocto1_4 - Sierra Wireless specific layers
  • meta-swi - Hardware adaptations
  • meta-swi-extras - Build scripts and proprietary code

Yocto uses a layered model for its build system. In Legato, device-specific layers are meta-swi-[target] and meta-swi-bin.

Yocto 1.4.1 and poky environment documentation is available at: https://www.yoctoproject.org/documentation/archived?keys=&field_version_tid=45

Pre-built Yocto Image

The prebuilt directory contains a kernel and root file system that can be built using the command below. It's the same as what's flashed on the device, and can be used to return to a known state.

  • kernel - kernel image
  • rootfs - smallish root file system ready for basic development.

Instructions on how to flash these images to the device are given in the file README.bsp.

Rebuild Yocto Image

Instructions for rebuilding the image are contained in the file Legato-Yocto1_4/meta-swi-extras/README.build

Running the build script with no arguments will print out the help message. There is also a file called stdbuild.sh to build the images with common options. This can take a long time the first time you run it. Once the build is complete, you'll find new images in the directory:

../build/tmp/deploy/images

Links are created at the end of the build to point to the latest kernel (kernel) and root file system (rootfs)

Warning
You can’t rebuild Yocto images on Ubuntu 13.10.

Flash Yocto Image

To flash the images, the device must be in fastboot mode. From the shell prompt on the device run:

root@swi-mdm9x15:~# sys_reboot bootloader

After a few seconds, the device will enumerate as an Android Bootloader Device. You can test this on the development PC with :

dave@devpc$ fastboot devices
MDM9615

Then erase and rewrite the kernel and root filesystem partitions using the fastboot command. The partitions are called kernel and rootfs.

dave@devpc $ fastboot erase kernel
...
dave@devpc $ fastboot erase rootfs
...
dave@devpc $ fastboot flash kernel kernel
...
dave@devpc $ fastboot flash rootfs rootfs
...
dave@devpc $ fastboot reboot
rebooting...
finished. total time: 0.001s
Note
You'll need to use fastboot through the micro-USB connection.

Custom Yocto Image

Because the Legato image is a Yocto-compliant BSP, there are many options for customizing.

Here's the easy way to add some packages to the rootfs:

meta-swi-extras/meta-swi-bin/recipes/images/9615-cdp-sierra-image.inc

For more complex customizations, refer to the Yocto documentation.


Copyright (C) Sierra Wireless, Inc. 2014. All rights reserved.